Commit c32e5dfb authored by lihui's avatar lihui

feat: merge

parents 6c39447d 12ba2c1a
......@@ -399,7 +399,7 @@ export default {
async pindanGoodsMet(otaID, goodsName) {
let params = { ota_id: otaID, goods_name: goodsName };
const res = await pindanGoods(params);
this.comLibTableData = res.list;
this.comLibTableData = res.result.list;
},
// 添加修改商品
......@@ -503,7 +503,7 @@ export default {
this.comTableData = this.addProduc;
},
},
created() {
this.getBusinessListMet();
this.marketingInfoMet();
......
......@@ -62,6 +62,8 @@ export default {
picUrlList: [] // 图片回显列表
},
propData: {},
isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload` // 金山云上传地址
};
......@@ -85,20 +87,35 @@ export default {
this.infoEditForm.picUploadList.splice(i, 1);
}
}
},
// 获取营销活动详情
marketingInfoMet() {
console.log();
this.propData = JSON.parse(localStorage.getItem("propData"));
this.infoEditForm.title = this.propData.marketing_name;
this.infoEditForm.desc = this.propData.pindan_desc;
for (var i in this.propData.pindan_pic_url) {
this.infoEditForm.picUrlList.push({
url: this.propData.pindan_pic_url[i]
});
}
}
},
watch: {
editInfo: function(newVal) {
this.infoEditForm.title = newVal.marketing_name;
this.infoEditForm.desc = newVal.pindan_desc;
for (var i in newVal.pindan_pic_url) {
this.infoEditForm.picUrlList.push({
url: newVal.pindan_pic_url[i]
});
let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) {
return;
}
localStorage.setItem("propData", JSON.stringify(newVal));
}
},
created() {}
created() {
this.marketingInfoMet();
}
};
</script>
......
......@@ -21,12 +21,13 @@
<addProduc
ref="addProduc"
v-show="active === 2"
:editInfo="testData"
:editInfo="infoEditArr"
:addProduc="addProducArr"
/>
<spellOrderSet
:spellOrderSetArr="spellOrderSetArr"
ref="spellOrderSet"
v-show="active === 3"
:spellOrderSet="spellOrderSetArr"
/>
</div>
<div class="stepsBtn">
......@@ -93,17 +94,18 @@ export default {
","
)
};
this.active = 2;
} else if (this.active === 2) {
if (this.$refs.addProduc.comTableData.length == 0) {
ElMessage.error("请至少选择一个商品");
return;
}
this.addProducArr = this.$refs.addProduc;
this.addProducArr = this.$refs.addProduc.comTableData;
this.active = 3;
} else {
this.startDate = this.$refs.spellOrderSet.startDate;
this.endDate = this.$refs.spellOrderSet.endDate;
console.log();
}
this.active++;
// this.active++;
},
// 获取营销活动详情
......@@ -119,7 +121,7 @@ export default {
const res = await marketingInfo(params);
this.infoEditArr = res.result.marketing_info;
this.addProducArr = res.result.goods_list;
this.spellOrderSetArr = res.result.take_place;
this.spellOrderSetArr = res.result.marketing_info;
},
// 取消
......@@ -128,9 +130,11 @@ export default {
},
// 确认发布
async confirmRelease() {
for (var i in this.addProducArr.comTableData) {
this.goodsSkuIDArr.push(this.addProducArr.comTableData[i].goods_sku_id);
for (var i in this.addProducArr) {
this.goodsSkuIDArr.push(this.addProducArr[i].goods_sku_id);
}
this.startDate = this.$refs.spellOrderSet.startDate;
this.endDate = this.$refs.spellOrderSet.endDate;
let params = {
marketing_id:
this.$route.query.marketing_id == undefined
......
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