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