Commit b836fa79 by 李伟康

commit

1 parent f6c2130b
...@@ -134,17 +134,15 @@ export default { ...@@ -134,17 +134,15 @@ export default {
this.modalStatus = !this.modalStatus this.modalStatus = !this.modalStatus
if (this.modalStatus) this.getCouponList(() => { if (this.modalStatus) this.getCouponList(() => {
let { couponList, selectedList, tabIndex } = this let { couponList, selectedList, tabIndex } = this
if (selectedList.length) { this.chooseItems = JSON.parse(JSON.stringify(selectedList))
this.chooseItems = JSON.parse(JSON.stringify(selectedList)) couponList.length && couponList.map(e => {
couponList.map(e => { selectedList.map(i => {
selectedList.map(i => { if (i.couponId == e.id) {
if (i.couponId == e.id) { e.active = true
e.active = true if (tabIndex == 0) e.num = i.couponAmount || 1
if (tabIndex == 0) e.num = i.couponAmount || 1 }
}
})
}) })
} })
}) })
}, },
getCouponList (callBack) { getCouponList (callBack) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!