From 2f2497270a1fe357a6ec46921401962261ab60cd Mon Sep 17 00:00:00 2001 From: linxi Date: Thu, 19 Sep 2024 18:00:55 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=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=E7=BB=93=E7=AE=97=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9B=B4=E6=8E=A5=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=8F=AF=E7=94=A8=E5=87=8F=E5=85=8D=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E6=9C=80=E5=A4=A7=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CouponsPopup.vue | 2 ++ pages/order/OrderSubmission/index.vue | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/CouponsPopup.vue b/components/CouponsPopup.vue index 62b9045..b4c5795 100644 --- a/components/CouponsPopup.vue +++ b/components/CouponsPopup.vue @@ -159,7 +159,9 @@ export default { largOne() { if(this.list[this.maxIndex]) { this.selectCoupon(this.list[this.maxIndex].id) + uni.setStorageSync('couponId', this.list[this.maxIndex].id) } + this.$emit('max', this.list[this.maxIndex] || {}) return this.list[this.maxIndex] || {} } diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index 7afe4ea..3ed599e 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -109,7 +109,7 @@ - + {{ couponList.usable.length === 0 ? '无' : '去选择' }} @@ -252,6 +252,7 @@ :two-list="couponList" @change="changeCoupons" :currentPrice="force2Decimal(orderPrice.totalPrice)" + @max="couponMax" :show-tab="false" /> @@ -417,6 +418,10 @@ export default { }, methods: { isNullOrEmpty, + couponMax(e) { + this.couponTitle = e.couponTitle + this.couponId = uni.getStorageSync('couponId') || 0 + }, showStoreList() { this.$store.commit("get_to", "orders"); this.$yrouter.push({ @@ -769,7 +774,7 @@ export default { }, // v9-2 changeCoupons(item) { - + if(!item) return if (this.couponList.usable.length === 0) return this.show = !this.show this.couponId = uni.getStorageSync('couponId') || 0