Commit b4a0e5ed by 杨明

fixed

1 parent 454c684d
......@@ -220,7 +220,7 @@ export default {
}
},
computed: {
...mapState('marketing', ['packageList', 'subscribe', 'activityInfo'])
...mapState('marketing', ['packageList', 'subscribe', 'activityInfo', 'process'])
},
methods: {
...mapActions('marketing', ['setPackage', 'setProcess']),
......@@ -248,7 +248,8 @@ export default {
// if (this.currentIndex == 1) this.carTableParams.checkSelectVal = carList
// if (this.currentIndex == 3) this.serviceTableParams.checkSelectVal = serviceList
},
getGiftList(val) {
getGiftList(val, status) {
console.log(status, 'status')
const { merchantId } = this
let params = {
merchantId,
......@@ -256,6 +257,15 @@ export default {
}
this.$apis.giftBag.packageList(params).then(res => {
this.giftList = res || []
if (status === 'add') {
this.giftValue = this.giftList.find(item => item.name == '自定义套餐')?.id
this.setProcess({
1: {
...this.process[1],
giftId: this.giftValue
}
})
}
})
},
calcCarValue(scope) {
......@@ -390,7 +400,7 @@ export default {
this.$apis.giftBag.packageAdd(params).then(res => {
if (res) {
this.giftVisible = false
this.getGiftList(this.subscribe)
this.getGiftList(this.subscribe, params.id ? '' : 'add')
}
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!