From fd9cc64bf63c2a0ce13d9c84e8c2ec773e2936b4 Mon Sep 17 00:00:00 2001 From: Wik-T <812952667@qq.com> Date: Fri, 6 Jan 2023 17:47:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E6=9C=AA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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,