Task:订单提交页面优化/ 提交订单前,若在商品详情页选择了优惠券,则提交订单页面删除该按钮
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user