Commit a6c99d3e authored by lihui's avatar lihui

feat:node-problem

parent afb46957
...@@ -152,12 +152,14 @@ exports.checkActivityDetailInfo = async ctx => { ...@@ -152,12 +152,14 @@ exports.checkActivityDetailInfo = async ctx => {
// 获取自提点列表 // 获取自提点列表
exports.getPlaceList = async ctx => { exports.getPlaceList = async ctx => {
console.log("执行-------------------");
const url = `${ACTIVITY_URI}/marketing/background/take_place_list`; const url = `${ACTIVITY_URI}/marketing/background/take_place_list`;
const opts = { const opts = {
url, url,
method: "GET" method: "GET"
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
console.log("lihui", ctx.body);
}; };
// 添加自提点 // 添加自提点
......
const request = require("request"); const request = require("request");
exports.httpReq = (ctx, opts) => { exports.httpReq = (ctx, opts) => {
opts.timeout = opts.timeout || 1000; // opts.timeout = opts.timeout || 10000;
opts.timeout = 10000;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var time_start = +new Date(); var time_start = +new Date();
...@@ -18,7 +19,8 @@ exports.httpReq = (ctx, opts) => { ...@@ -18,7 +19,8 @@ exports.httpReq = (ctx, opts) => {
request(opts, (err, res, body) => { request(opts, (err, res, body) => {
console.info( console.info(
`[Api] httpReq (${opts.url}, user:[${opts.qs.op_cur_user `[Api] httpReq (${opts.url}, user:[${
opts.qs.op_cur_user
}]) spent: ${+new Date() - time_start}ms` }]) spent: ${+new Date() - time_start}ms`
); );
...@@ -31,5 +33,3 @@ exports.httpReq = (ctx, opts) => { ...@@ -31,5 +33,3 @@ exports.httpReq = (ctx, opts) => {
}); });
}); });
}; };
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
props: { props: {
editInfo: { editInfo: {
type: Object, type: Object,
required: () => {} default: () => {}
} }
}, },
data() { data() {
...@@ -91,33 +91,46 @@ export default { ...@@ -91,33 +91,46 @@ export default {
// 获取营销活动详情 // 获取营销活动详情
marketingInfoMet() { marketingInfoMet() {
console.log("执行");
let marketingId = this.$route.query.marketing_id; let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) { if (marketingId == undefined) {
return; return;
} }
this.propData = JSON.parse(localStorage.getItem("propData")); this.propData = JSON.parse(localStorage.getItem("propData"));
this.infoEditForm.title = this.propData.marketing_name; this.infoEditForm.title = this.editInfo.marketing_name;
this.infoEditForm.desc = this.propData.pindan_desc; this.infoEditForm.desc = this.editInfo.pindan_desc;
for (var i in this.propData.pindan_pic_url) { // for (var i in this.propData.pindan_pic_url) {
this.infoEditForm.picUrlList.push({ // this.infoEditForm.picUrlList.push({
url: this.propData.pindan_pic_url[i] // url: this.propData.pindan_pic_url[i]
}); // });
} // }
} }
}, },
watch: { watch: {
editInfo: function(newVal) { // editInfo: function(newVal) {
let marketingId = this.$route.query.marketing_id; // let marketingId = this.$route.query.marketing_id;
if (marketingId == undefined) { // if (marketingId == undefined) {
return; // return;
} // }
localStorage.setItem("propData", JSON.stringify(newVal)); // localStorage.setItem("propData", JSON.stringify(newVal));
// }
editInfo: {
// 监听props属性 展示自提点列表
handler: function() {
// TO DO
// console.log("watch");
// console.log("newVal:", newVal);
// console.log("oldVal:", oldVal);
this.marketingInfoMet();
},
deep: true
// immediate: true
} }
}, },
created() { created() {
this.marketingInfoMet(); // this.marketingInfoMet();
} }
}; };
</script> </script>
......
...@@ -322,10 +322,11 @@ export default { ...@@ -322,10 +322,11 @@ export default {
watch: { watch: {
spellOrderSetArr: { spellOrderSetArr: {
// 监听props属性 展示自提点列表 // 监听props属性 展示自提点列表
handler: function(newVal, oldVal) { handler: function() {
// TO DO // TO DO
console.log("newVal:", newVal); // let a = newVal;
console.log("oldVal:", oldVal); // console.log("newVal:", newVal);
// console.log("oldVal:", oldVal);
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -374,7 +375,7 @@ export default { ...@@ -374,7 +375,7 @@ export default {
let params = Object.assign(this.form, { let params = Object.assign(this.form, {
take_place_id: this.id //搜索关键词 take_place_id: this.id //搜索关键词
}); });
console.log(this.form); // console.log(this.form);
try { try {
this.pageLoading = true; this.pageLoading = true;
await ActivityService.addPlace(params); await ActivityService.addPlace(params);
...@@ -436,7 +437,7 @@ export default { ...@@ -436,7 +437,7 @@ export default {
}, },
// 复选框 // 复选框
handleSelectionChange(val) { handleSelectionChange(val) {
console.log("lihui", val); // console.log("lihui", val);
this.checkedNum = val.length; this.checkedNum = val.length;
this.multipleSelection = val; this.multipleSelection = val;
let takePlaceIds = ""; let takePlaceIds = "";
...@@ -451,7 +452,7 @@ export default { ...@@ -451,7 +452,7 @@ export default {
}, },
// 勾选某些列表的操作 // 勾选某些列表的操作
toggleSelection(rows) { toggleSelection(rows) {
console.log("liuna", rows); //console.log("liuna", rows);
if (rows) { if (rows) {
rows.forEach(row => { rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
...@@ -483,7 +484,7 @@ export default { ...@@ -483,7 +484,7 @@ export default {
if (this.$route.query.marketing_id) { if (this.$route.query.marketing_id) {
// 此时需要两份数据对比 // 此时需要两份数据对比
this.hasCheckedList = true; this.hasCheckedList = true;
console.log(this.spellOrderSetArr); // console.log(this.spellOrderSetArr);
this.checkedTakePlacelist = this.setTableListData(this.spellOrderSetArr); // 选中的自提点列表 this.checkedTakePlacelist = this.setTableListData(this.spellOrderSetArr); // 选中的自提点列表
this.toggleSelection(this.checkedTakePlacelist); this.toggleSelection(this.checkedTakePlacelist);
} }
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
/> />
<addProduc <addProduc
ref="addProduc" ref="addProduc"
v-show="active === 2" v-show="active === 3"
:editInfo="infoEditArr" :editInfo="infoEditArr"
:addProduc="addProducArr" :addProduc="addProducArr"
/> />
<spellOrderSet <spellOrderSet
ref="spellOrderSet" ref="spellOrderSet"
v-show="active === 3" v-show="active === 2"
:spellOrderSet="spellOrderSetArr" :spellOrderSet="spellOrderSetArr"
@getTakeTakePlaceListFromChild="getTakeTakePlaceListFromChild" @getTakeTakePlaceListFromChild="getTakeTakePlaceListFromChild"
/> />
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
data() { data() {
return { return {
active: 3, // 步骤条状态 active: 2, // 步骤条状态
infoEditArr: [], // 信息编辑数据 infoEditArr: [], // 信息编辑数据
addProducArr: [], // 添加商品 addProducArr: [], // 添加商品
goodsSkuIDArr: [], // 接收goods_sku_id goodsSkuIDArr: [], // 接收goods_sku_id
...@@ -88,13 +88,13 @@ export default { ...@@ -88,13 +88,13 @@ export default {
ElMessage.error("请填写商品标题"); ElMessage.error("请填写商品标题");
return; return;
} }
this.infoEditArr = { // this.infoEditArr = {
title: this.$refs.infoEdit.infoEditForm.title, // title: this.$refs.infoEdit.infoEditForm.title,
desc: this.$refs.infoEdit.infoEditForm.desc, // desc: this.$refs.infoEdit.infoEditForm.desc,
picUploadList: this.$refs.infoEdit.infoEditForm.picUploadList.join( // picUploadList: this.$refs.infoEdit.infoEditForm.picUploadList.join(
"," // ","
) // )
}; // };
this.active = 2; this.active = 2;
} else if (this.active === 2) { } else if (this.active === 2) {
if (this.$refs.addProduc.comTableData.length == 0) { if (this.$refs.addProduc.comTableData.length == 0) {
......
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