Commit f4f8ec98 authored by lihui's avatar lihui

fix: 提示语显示问题

parent 1472c5c9
<template> <template>
<div class="infoEditing"> <div class="infoEditing">
{{ picSubmitList.length }}
<el-form ref="infoEditForm" :model="infoEditForm" label-width="80px"> <el-form ref="infoEditForm" :model="infoEditForm" label-width="80px">
<el-form-item label="标题:"> <el-form-item label="标题:">
<el-input v-model="infoEditForm.title" maxlength="30"></el-input> <el-input v-model="infoEditForm.title" maxlength="30"></el-input>
...@@ -61,33 +62,31 @@ export default { ...@@ -61,33 +62,31 @@ export default {
title: "", // 标题 title: "", // 标题
desc: "", // 介绍 desc: "", // 介绍
picUploadList: [], // 上传详情图片列表 picUploadList: [], // 上传详情图片列表
picUrlList: [], // 图片回显列表 picUrlList: [] // 图片回显列表
picSubmitList: [] // 发布功能需要的图片列表
}, },
picSubmitList: [], // 发布功能需要的图片列表
propData: {}, propData: {},
isShowPopver: false, // 是否展示图片框 isShowPopver: false, // 是否展示图片框
uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址 uploadUrl: `${GOODS_URI}/ksy/ks3apiunencrypt/ks3api_upload`, // 金山云上传地址
hideUpload: false, hideUpload: false,
limitCount: "9" limitCount: 9
}; };
}, },
watch: { watch: {
infoEditArr: { infoEditArr: {
// 监听props属性 展示自提点列表 // 监听props属性 展示自提点列表
handler: function(newVal) { handler: function(newVal) {
console.log(99);
if (this.$route.query.marketing_id) { if (this.$route.query.marketing_id) {
this.propData = newVal; this.propData = newVal;
this.infoEditForm.title = this.propData.marketing_name; this.infoEditForm.title = this.propData.marketing_name;
this.infoEditForm.desc = this.propData.pindan_desc; this.infoEditForm.desc = this.propData.pindan_desc;
// console.log(newVal.pindan_pic_url.length); for (var i in this.propData.pindan_pic_url) {
// console.log(oldVal); this.infoEditForm.picUrlList.push({
if (newVal.pindan_pic_url) { url: this.propData.pindan_pic_url[i]
for (var i in this.propData.pindan_pic_url) { });
this.infoEditForm.picUrlList.push({ this.picSubmitList.push({
url: this.propData.pindan_pic_url[i] url: this.propData.pindan_pic_url[i]
}); });
}
} }
} }
}, },
...@@ -110,25 +109,19 @@ export default { ...@@ -110,25 +109,19 @@ export default {
// 图片上传成功时 // 图片上传成功时
handleDetailSuccess(res) { handleDetailSuccess(res) {
this.infoEditForm.picUploadList.push(res.result.image_id); // 上传成功图片的id this.infoEditForm.picUploadList.push(res.result.image_id); // 上传成功图片的id
// this.infoEditForm.picUrlList.push({ this.picSubmitList.push({
// // 回显图片列表 // 发布功能需要的图片列表
// url: res.result.url url: res.result.url
// }); });
}, },
// 图片删除后 // 图片删除后
removeDetailFiles(file, fileList) { removeDetailFiles(file, fileList) {
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid == file.uid) { if (fileList[i].uid == file.uid) {
this.infoEditForm.picUrlList.splice(i, 1); this.picSubmitList.splice(i, 1);
} }
} }
// for (let i = 0; i < fileList.length; i++) {
// if (fileList[i].uid == file.uid) {
// this.infoEditForm.picUploadList.splice(i, 1);
// }
// }
}, },
// 获取营销活动详情 // 获取营销活动详情
......
...@@ -266,7 +266,9 @@ export default { ...@@ -266,7 +266,9 @@ export default {
{ required: true, message: "请输入自提点名称", trigger: "blur" }, { required: true, message: "请输入自提点名称", trigger: "blur" },
{ min: 0, max: 30, message: "长度在 0 到 30 个字符", trigger: "blur" } { min: 0, max: 30, message: "长度在 0 到 30 个字符", trigger: "blur" }
], ],
location: [{ required: true, message: "请输入位置", trigger: "blur" }], location: [
{ required: true, message: "请输入位置", trigger: "change" }
],
address: [ address: [
{ required: true, message: "请输入详细地址", trigger: "blur" } { required: true, message: "请输入详细地址", trigger: "blur" }
], ],
......
...@@ -131,13 +131,16 @@ export default { ...@@ -131,13 +131,16 @@ export default {
// 确认发布 // 确认发布
async confirmRelease() { async confirmRelease() {
let list = this.$refs.infoEdit.infoEditForm.picUrlList.map(item => { function getUrlParms(path, name) {
console.log(item); var reg = new RegExp("(^|\\?|&)" + name + "=([^&]*)(\\s|&|$)", "i");
return item.url; if (reg.test(path)) return unescape(RegExp.$2.replace(/\+/g, " "));
return "";
}
let list = this.$refs.infoEdit.picSubmitList.map(item => {
let rs = getUrlParms(item.url, "url");
return rs;
}); });
console.log(list);
let picList = list.join(","); let picList = list.join(",");
console.log(this.$refs.infoEdit.infoEditForm.picUrlList);
for (var i in this.addProducArr) { for (var i in this.addProducArr) {
this.goodsSkuIDArr.push(this.addProducArr[i].goods_sku_id); this.goodsSkuIDArr.push(this.addProducArr[i].goods_sku_id);
} }
......
...@@ -12,10 +12,9 @@ const headerConfig = [ ...@@ -12,10 +12,9 @@ const headerConfig = [
path: "/op/groupmeal/newOrderManagement" path: "/op/groupmeal/newOrderManagement"
}, },
{ {
path: '/op/groupmeal/distrib', path: "/op/groupmeal/distrib",
name: '配送员管理' name: "配送员管理"
}, }
]; ];
export default headerConfig; export default headerConfig;
\ No newline at end of file
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