Fix(优惠券):[#2046,#2071]切换之后,选中效果错乱

This commit is contained in:
lifizer
2024-07-24 22:43:06 +08:00
parent 5b1b1f1c69
commit f9be8af78f
2 changed files with 6 additions and 1 deletions
+6
View File
@@ -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() {
-1
View File
@@ -432,7 +432,6 @@ export default {
item.checked = false
}
})
uni.removeStorageSync('couponId')
} else {
uni.removeStorageSync('couponId')
}