zhaoyun 14 цаг өмнө
parent
commit
03cd63ef3d

+ 4 - 0
mer_uniapp/pages/goods/components/checkDelivery/index.vue

@@ -66,6 +66,10 @@
 					{
 						title:'到店自提',
 						shippingType: 2
+					},
+					{
+						title:'骑手配送',
+						shippingType: 4
 					}
 				],
 				radioIndex:0,

+ 3 - 3
mer_uniapp/pages/goods/order_confirm/index.vue

@@ -118,9 +118,9 @@
 							</view>
 						</view>
 					</view>
-					<view v-show="(item.shippingType === 1 || item.shippingType === 3|| item.shippingType === 4) && !orderType" class='item acea-row row-between-wrapper'>
-						<view><text v-if="item.shippingType === 4 || item.shippingType === 1">打包费</text></view>
-						<view v-if='(!item.packingFee || item.packingFee == 0)&& (item.shippingType === 4 || item.shippingType === 1)' class="noCoupon">免打包费</view>
+					<view v-show="!orderType" class='item acea-row row-between-wrapper'>
+						<view><text v-if="item.shippingType === 4 ||item.shippingType === 2|| item.shippingType === 1">打包费</text></view>
+						<view v-if='(!item.packingFee || item.packingFee == 0)&& (item.shippingType === 4 ||item.shippingType === 2|| item.shippingType === 1)' class="noCoupon">免打包费</view>
 						<view v-else class='money'>¥{{item.packingFee}}</view>
 					</view>
 					<view v-show="item.shippingType === 3 || item.shippingType === 4" class='item acea-row row-between-wrapper'>

+ 1 - 1
mer_uniapp/pages/index/index.vue

@@ -128,7 +128,7 @@
 					</view>
 
 					<view style="margin-top: 10rpx;display: flex;align-items: center;">
-						<text class="goods-info">起送 ¥ {{item.perCapita==null?0:item.perCapita}}</text>
+						<text class="goods-info">起送 ¥ {{item.deliveryFee==null?0:item.deliveryFee}}</text>
 						<text v-if="item.isFreeDeliverFee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
 						<view v-if="item.isFreeDeliverFee && item.freeDeliverFee>0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
 							{{item.freeDeliverFee}}</view>

+ 4 - 3
mer_uniapp/pages/merchant/home/index.vue

@@ -130,11 +130,11 @@
 					<image src="/static/img/ic-shopping-cart.png" class="cart-img" @tap="openCart"></image>
 					<view class="tag" v-if="cart.length > 0">{{ getCartGoodsNumber }}</view>
 				</view>
-				<view style="font-weight: 500;font-size: 27rpx;color: #999999;" class="price" v-if="cart.length === 0">配送费2元</view>
+				<view style="font-weight: 500;font-size: 27rpx;color: #999999;" class="price" v-if="cart.length === 0">配送费{{merchanInfo.riderDeliveryFee}}元</view>
 				<view style="font-weight: 600;font-size: 27rpx;color: #FFFFFF;" class="price" v-else>¥{{ getCartGoodsPrice || 0 }}</view>
 				<button :style="{backgroundColor: disabledPay ? '#000' : ''}" type="primary" class="pay-btn bg-color" @tap="toPay"
 				 :disabled="disabledPay">
-					{{ disabledPay ? `差${spread}元起送` : '去结算' }}
+					{{ disabledPay ? (spread==0?``:`差${spread}元起送`) : '去结算' }}
 				</button>
 			</view>
 			<!-- 购物车栏 end -->
@@ -438,7 +438,7 @@
 				return this.cart.reduce((acc, cur) => acc + cur.number * cur.price, 0)
 			},
 			disabledPay() { //是否达到起送价
-				return this.orderType == 'takeout' && (this.getCartGoodsPrice < this.store.min_price) ? true : false
+				return this.orderType == 'takeout' &&  (this.getCartGoodsPrice==0 || this.getCartGoodsPrice < this.store.min_price) ? true : false
 			},
 			spread() { //差多少元起送
 				if (this.orderType != 'takeout') return
@@ -461,6 +461,7 @@
 			getMerchantInfoData() {
 				getMerchantInfo(this.merId).then(res => {
 					this.merchanInfo = res.data
+					this.store.min_price= res.data.merDeliveryFee;
 					this.$store.commit('MERCHANTJINFO', res.data);
 				});
 			},

+ 1 - 1
mer_uniapp/pages/takeout/index.vue

@@ -86,7 +86,7 @@
 						</view>
 
 						<view style="margin-top: 10rpx;display: flex;align-items: center;">
-							<text class="goods-info">起送 ¥ {{item.perCapita==null?0:item.perCapita}}</text>
+							<text class="goods-info">起送 ¥ {{item.deliveryFee==null?0:item.deliveryFee}}</text>
 							<text v-if="item.isFreeDeliverFee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
 							<view v-if="item.isFreeDeliverFee && item.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
 								{{item.freeDeliverFee}}</view>