From f9be8af78febbfbfedde8ecdf0f558051a78e02f Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Wed, 24 Jul 2024 22:43:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix(=E4=BC=98=E6=83=A0=E5=88=B8):[#2046,#2071]?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=B9=8B=E5=90=8E=EF=BC=8C=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E6=95=88=E6=9E=9C=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CouponsPopup.vue | 6 ++++++ pages/order/OrderSubmission/index.vue | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/CouponsPopup.vue b/components/CouponsPopup.vue index bacc4f7..c33589e 100644 --- a/components/CouponsPopup.vue +++ b/components/CouponsPopup.vue @@ -67,6 +67,12 @@ export default { computed: { list() { const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable'] + if (this.current === 0) { + const localCouponId = uni.getStorageSync('couponId') || 0 + temp.map(item => { + item.checked = localCouponId === item.id + }) + } return this.$global.deepClone(temp) }, canUse() { diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index 55b5a10..baee8b0 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -432,7 +432,6 @@ export default { item.checked = false } }) - uni.removeStorageSync('couponId') } else { uni.removeStorageSync('couponId') }