Commit 1c12dd31 by chenxin

fix: card 微盟code

parent c1dd3e65
......@@ -122,7 +122,7 @@ export default {
wmShopIds: [], // 保存过的店铺id不能重复选择
countFlag: 0, // 微盟店铺 0不能使用 1只能添加1条 2能添加多条
weimobShopList: [], // 微盟店铺list
weimobDemoCodeList: [] // 保存的微盟店铺以及对应的微盟券号 {pid:xxxx,card:xxxx,loading:false, cardList: [], save: false, name: ''}
weimobDemoCodeList: [{ pid: '', card: '', loading: false, cardList: [], save: false, cardName: '' }] // 保存的微盟店铺以及对应的微盟券号 {pid:xxxx,card:xxxx,loading:false, cardList: [], save: false, name: ''}
};
},
watch: {
......@@ -295,10 +295,15 @@ export default {
}
// 微盟券号 -- 复制不赋值
if (card.cardApplyChannel.indexOf('WMmicroMall') !== -1 && card.weimobDemoCode && this.isAdd && this.isInfo) {
if (card.cardApplyChannel.indexOf('WMmicroMall') !== -1 && card.weimobDemoCode && (this.isAdd || this.isInfo || this.isEdit)) {
console.log(card.weimobDemoCode);
this.weimobDemoCodeList = JSON.parse(card.weimobDemoCode).map(v => {
return { pid: v.pid, card: v.card, loading: false, cardList: [{ cardTemplateId: v.card, name: v.name }], save: true, name: v.name };
});
if (!this.weimobDemoCodeList.length) {
// 如果可以保存微盟券号但是微盟券号为[]
this.addWmShop();
}
}
// 微盟适用商品
......@@ -771,7 +776,6 @@ export default {
// 获取微盟店铺列表
getListEntepriseWeimobShop() {
listEntepriseWeimobShop().then(res => {
this.weimobDemoCodeList = [{ pid: '', card: '', loading: false, cardList: [], save: false, cardName: '' }];
this.countFlag = res.result.countFlag || 0;
this.weimobShopList = res.result.dataList || [];
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment