From 78da791d4c590dde3a6a8f5c4814047294c8ea83 Mon Sep 17 00:00:00 2001 From: owen Date: Tue, 26 Sep 2023 23:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E4=BC=98=E6=83=A0=E5=88=B8=E9=A2=86=E5=8F=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/couponListWindow/index.vue | 2 +- pages/goods_details/index.vue | 4 ++-- pages/index/index.vue | 3 ++- pages/users/order_confirm/index.vue | 4 ++-- pages/users/user_get_coupon/index.vue | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/couponListWindow/index.vue b/components/couponListWindow/index.vue index bdf5d4c8..272de737 100644 --- a/components/couponListWindow/index.vue +++ b/components/couponListWindow/index.vue @@ -80,7 +80,7 @@ methods: { close: function() { this.type = 1 - this.$emit('ChangCouponsClone'); + this.$emit('ChangCouponsClose'); }, /** * 选择优惠劵 diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index 72bb29cb..f507036d 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -226,7 +226,7 @@ @@ -837,7 +837,7 @@ /** * 关闭优惠劵弹窗 */ - ChangCouponsClone: function() { + ChangCouponsClose: function() { this.$set(this.coupon, 'coupon', false) }, /** diff --git a/pages/index/index.vue b/pages/index/index.vue index 36433900..e658c242 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -394,7 +394,8 @@ */ getCoupon: function(id, index) { CouponApi.takeCoupon(id).then(res => { - this.$set(this.couponList[index], 'takeStatus', true); + // 设置已领取,即不能再领取 + this.$set(this.couponList[index], 'takeStatus', res.data !== true); this.$util.Tips({ title: '领取成功' }); diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index da92dbe0..9a7f2f6f 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -139,7 +139,7 @@ { - // todo 会导致take_limit_count失效 - this.couponsList[index].takeStatus = true; + // 设置已领取,即不能再领取 + this.couponsList[index].takeStatus = res.data !== true; this.$set(this, 'couponsList', this.couponsList); this.$util.Tips({ title: '领取成功'