From a94c9d2c2114765c2f8c8c336c03aa736b01dc77 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Mon, 21 Oct 2024 16:52:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/orderCoupon.vue | 4 ++-- pages/goods/order/index.vue | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/orderCoupon.vue b/components/orderCoupon.vue index 171d822..9cd3332 100644 --- a/components/orderCoupon.vue +++ b/components/orderCoupon.vue @@ -26,7 +26,7 @@ - + 不可用 @@ -130,7 +130,7 @@ }, // 选择优惠券 choseYouhui(e) { - if(this.list[e].couponEntity.useLevel > this.sumMeony ){ + if(this.list[e].canUse == 0 ){ return } console.log('选中优惠券e', e); diff --git a/pages/goods/order/index.vue b/pages/goods/order/index.vue index 92d4ee3..1c04d1b 100644 --- a/pages/goods/order/index.vue +++ b/pages/goods/order/index.vue @@ -714,6 +714,11 @@ } if (res.code == 0) { console.log("可用优惠券列表", res); + res.couponHistoryList.forEach( item =>{ + if(item.couponEntity.useLevel > this.totalPrice){ + item.canUse = 0 + } + }) this.couponHistoryList = res.couponHistoryList } this.$forceUpdate();