|
@@ -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);
|
|
|
});
|
|
|
},
|