Commit f4f8ec98 authored by lihui's avatar lihui

fix: 提示语显示问题

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