1.优化未配置活动问题

dev
杨杰 2 years ago
parent fff01c8e42
commit fd9cc64bf6
  1. 5
      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,6 +416,7 @@
calculation(item) { calculation(item) {
let storetype = ''; let storetype = '';
let storeprice = ''; let storeprice = '';
if(this.storeList.discountActivity !='' && this.storeList.discountActivity !=null){
if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) { if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) {
storetype = this.storeList.discountActivity.discountType; storetype = this.storeList.discountActivity.discountType;
storeprice = this.storeList.discountActivity.discountPrice; storeprice = this.storeList.discountActivity.discountPrice;
@ -423,6 +424,8 @@
storetype = this.storeList.discountActivity.discountType; storetype = this.storeList.discountActivity.discountType;
storeprice = this.storeList.discountActivity.discountPrice; storeprice = this.storeList.discountActivity.discountPrice;
} }
}
let datas = { let datas = {
transactionPrice: item, transactionPrice: item,
storeDiscountType: storetype, storeDiscountType: storetype,

Loading…
Cancel
Save