Ver código fonte

商品结算-运费方案修改

gcz 2 anos atrás
pai
commit
d923ac72b2
2 arquivos alterados com 18 adições e 13 exclusões
  1. 7 7
      common/config.js
  2. 11 6
      shopping/submitorder.vue

+ 7 - 7
common/config.js

@@ -12,15 +12,15 @@
 // }
 
 //64
-// let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
-// let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
-// // let staticUrl='http://res.hw.hongweisoft.com/xushuo/';
-// let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
+let baseUrl='https://xusfoodapi.hw.hongweisoft.com/appapi/app';
+let upFileUrl='http://fileupload.hw.hongweisoft.com/upload/single/minio';
+// let staticUrl='http://res.hw.hongweisoft.com/xushuo/';
+let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 //正式
-let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
-let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
-let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
+// let baseUrl='https://xusapi.gzxsjt.cn/appapi/app';
+// let upFileUrl='https://xusapi.gzxsjt.cn/thirdapi/upload/single/minio';
+// let staticUrl='https://xusapi.gzxsjt.cn/miniores/imgs/app';
 
 const commonConfig = {
 	wxAppid: '', // 测试wxAppid

+ 11 - 6
shopping/submitorder.vue

@@ -132,14 +132,14 @@
 					¥ {{totalAmount}}
 				</view>
 			</view>
-			<view class="total-item u-flex u-row-between">
+			<view class="total-item u-flex u-row-between" v-if="logisticsType!=1">
 				<view class="left">
 					运费
 					<!-- <text class="gray">总重:{{totalWeight}}</text> -->
 				</view>
 				<view class="right red">
 					<text v-if="distribution.distributionPrice">+ ¥ {{distribution.distributionPrice}}</text>
-					<text v-else>免运费</text>
+					<text v-else>{{distribution.ifDistribution!=1?'该区域不支持配送':'免运费'}}</text>
 				</view>
 			</view>
 		</view>
@@ -147,12 +147,12 @@
 			<view class="inner u-flex u-row-between">
 				<view class="left u-flex">
 					<view class="total-price">
-						待支付:<text class="red">¥ {{payAmount + distribution.distributionPrice}}</text>
+						待支付:<text class="red">¥ {{logisticsType==1?payAmount:payAmount + distribution.distributionPrice}}</text>
 					</view>
 				</view>
 				<view class="btn gray" v-if="orderTotalCredit&&userTotalCredit<orderTotalCredit">积分不够</view>
 				<view class="" v-else>
-					<view class="btn" v-if="cansubmit" @click="submitOrder">去结算</view>
+					<view class="btn" v-if="(logisticsType!=1?distribution.ifDistribution==1:true)&&cansubmit" @click="submitOrder">去结算</view>
 					<view class="btn gray" v-else>去结算</view>
 				</view>
 			</view>
@@ -244,6 +244,9 @@
 		  selectReceiveIndex: {
 		    handler: function(newValue, oldValue) {
 		      this.logisticsType = this.receiveWayList[newValue];
+			  if(this.orderInfo.goodsList.length>0){
+				  this.settlement();
+			  }
 		    },
 		    immediate: true
 		  }
@@ -338,7 +341,7 @@
 				this.settlement();
 			},
 			settlement(){
-				let orderType = 1;
+				let orderType = 1;//1,正常订单,2积分订单
 				// console.log('settlement',this.selectGoods);
 				let param = {
 					receiveId:this.receive.id
@@ -347,6 +350,7 @@
 					orderType = 2
 				}
 				param.orderType = orderType;
+				param.logisticsType = this.logisticsType;
 				param.goodsList = this.orderInfo.goodsList.map(item=>{
 					return {goodsId:item.id||item.goodsId,quantity:item.quantity}
 				});
@@ -518,9 +522,10 @@
 }
 .total{
 	.total-item{
+		padding-bottom: 30rpx;
 		&:not(:last-child){
 			margin-bottom: 30rpx;
-			padding-bottom: 30rpx;
+			
 		}
 		.right{
 			font-weight: 600;