Fix(优惠券):[#2046,#2071]切换之后,选中效果错乱
This commit is contained in:
@@ -67,6 +67,12 @@ export default {
|
||||
computed: {
|
||||
list() {
|
||||
const temp = this.current === 0 ? this.twoList['usable'] : this.twoList['unusable']
|
||||
if (this.current === 0) {
|
||||
const localCouponId = uni.getStorageSync('couponId') || 0
|
||||
temp.map(item => {
|
||||
item.checked = localCouponId === item.id
|
||||
})
|
||||
}
|
||||
return this.$global.deepClone(temp)
|
||||
},
|
||||
canUse() {
|
||||
|
||||
@@ -432,7 +432,6 @@ export default {
|
||||
item.checked = false
|
||||
}
|
||||
})
|
||||
uni.removeStorageSync('couponId')
|
||||
} else {
|
||||
uni.removeStorageSync('couponId')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user