Commit a6c99d3e authored by lihui's avatar lihui

feat:node-problem

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