Task:订单提交页面优化/ 提交订单前,若在商品详情页选择了优惠券,则提交订单页面删除该按钮

This commit is contained in:
linxi
2025-01-15 18:16:01 +08:00
parent 46b858b700
commit f19ac9ad42
3 changed files with 42 additions and 13 deletions
+17 -1
View File
@@ -4,7 +4,7 @@
<view class="popup-title bold tc v12-justify-between">
<text></text>
<text>优惠详情</text>
<u-icon name="close" color="#666" size="14" @click="close"></u-icon>
<u-icon name="close" color="#666" size="14" @click.stop="close"></u-icon>
</view>
<SubSection
:current="current"
@@ -125,6 +125,10 @@ export default {
currentPrice: {
default: 0,
type: Number
},
id: {
type: Number,
default: 0
}
},
data() {
@@ -137,6 +141,17 @@ export default {
},
}
},
watch: {
id: {
immediate: true,
handler(value) {
console.log('couponId', value);
if(value) {
this.selectCoupon(value)
}
}
}
},
computed: {
list() {
const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
@@ -197,6 +212,7 @@ export default {
if (this.current === 1) return
uni.setStorageSync('couponId', this.couponId)
this.$emit('change', this.selectItem || {})
this.$emit('ok', this.couponId)
}
}
}