diff --git a/pages/index/index.vue b/pages/index/index.vue index b08ee95..369df2a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -9,7 +9,7 @@ - + 门店优惠 @@ -415,14 +415,17 @@ //计算价格 calculation(item) { let storetype = ''; - let storeprice = ''; - if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) { - storetype = this.storeList.discountActivity.discountType; - storeprice = this.storeList.discountActivity.discountPrice; - }else{ - storetype = this.storeList.discountActivity.discountType; - storeprice = this.storeList.discountActivity.discountPrice; + let storeprice = ''; + if(this.storeList.discountActivity !='' && this.storeList.discountActivity !=null){ + if (item >= this.storeList.discountActivity.discountCondition && this.storeList.discountActivity.discountType == 1) { + storetype = this.storeList.discountActivity.discountType; + storeprice = this.storeList.discountActivity.discountPrice; + }else{ + storetype = this.storeList.discountActivity.discountType; + storeprice = this.storeList.discountActivity.discountPrice; + } } + let datas = { transactionPrice: item, storeDiscountType: storetype,