From 26b6c141410412ce08d54fa094962ee9305728ca Mon Sep 17 00:00:00 2001 From: linxi Date: Fri, 14 Mar 2025 10:57:20 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3358=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=95=86=E8=AF=A6=E9=A1=B5?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=BC=B9=E7=AA=97=E2=80=94=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CouponsPopup.vue | 3 ++- pages/order/OrderSubmission/index.vue | 3 ++- pages/shop/GoodsCon/index.vue | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/components/CouponsPopup.vue b/components/CouponsPopup.vue index 2c213c3..ebd0171 100644 --- a/components/CouponsPopup.vue +++ b/components/CouponsPopup.vue @@ -204,13 +204,14 @@ export default { selectCoupon(id) { this.couponId = id this.selectItem = this.list.find(e => e.id === id) || {} - this.$emit('max', this.selectItem) + // this.$emit('select', this.selectItem) this.list.map(item => { item.checked = id === item.id }) }, setCoupon() { if (this.current === 1) return + console.log(this.current, '====1======='); uni.setStorageSync('couponId', this.couponId) this.$emit('change', this.selectItem || {}) this.$emit('ok', this.couponId) diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index 6d883a9..af82d04 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -388,7 +388,8 @@ export default { this.computedPrice('shipping_type'); }, async couponId(value) { - this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === value) + this.couponIndex = this.couponList['usable']?.findIndex(item => item.id === +value) + this.couponTitle = this.couponList['usable']?.[this.couponIndex]?.couponTitle await this.computedPrice('couponId') } }, diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 6530d41..1bcba3f 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -192,7 +192,13 @@ - +