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