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 @@ - +