1.优化未配置活动问题

dev
杨杰 2 years ago
parent fff01c8e42
commit fd9cc64bf6
  1. 17
      pages/index/index.vue

@ -9,7 +9,7 @@
<view class="width40w mart10 line1"></view> <view class="width40w mart10 line1"></view>
</view> </view>
<!-- 商家优惠 --> <!-- 商家优惠 -->
<view class="height50 width100 mart10 backcorfff"> <view class="height50 width100 mart10 backcorfff" v-if="storeList.discountActivity !== '' && storeList.discountActivity !== null">
<view class="width50 flleft fcor666 font16 alijusstart" style="padding-left: 5%;"> <view class="width50 flleft fcor666 font16 alijusstart" style="padding-left: 5%;">
门店优惠 门店优惠
</view> </view>
@ -416,13 +416,16 @@
calculation(item) { calculation(item) {
let storetype = ''; let storetype = '';
let storeprice = ''; let storeprice = '';
if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) { if(this.storeList.discountActivity !='' && this.storeList.discountActivity !=null){
storetype = this.storeList.discountActivity.discountType; if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) {
storeprice = this.storeList.discountActivity.discountPrice; storetype = this.storeList.discountActivity.discountType;
}else{ storeprice = this.storeList.discountActivity.discountPrice;
storetype = this.storeList.discountActivity.discountType; }else{
storeprice = this.storeList.discountActivity.discountPrice; storetype = this.storeList.discountActivity.discountType;
storeprice = this.storeList.discountActivity.discountPrice;
}
} }
let datas = { let datas = {
transactionPrice: item, transactionPrice: item,
storeDiscountType: storetype, storeDiscountType: storetype,

Loading…
Cancel
Save