提交 40eb9cc5 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 3b1e337f
......@@ -295,11 +295,13 @@ export default {
}
const param = {}
const tamp = []
const tamp2 = []
const tamp3 = []
param.name = this.form.step1
param.group_id = this.form.step2
this.form.step3.map(item => {
if (id) {
tamp.push({
if (id && this.form.tempGroup.find(items => { return items.channel === parseInt(item) })) {
tamp3.push({
id: this.form.tempGroup.find(items => { return items.channel === parseInt(item) }).id,
channel: item,
title: this.formAll[content[item]].title,
......@@ -313,10 +315,17 @@ export default {
desc: this.formAll[content[item]].content,
payload: this.formAll[content[item]].content
})
tamp2.push({
channel: item,
title: this.formAll[content[item]].title,
desc: this.formAll[content[item]].content,
payload: this.formAll[content[item]].content
})
}
})
if (id) {
param.update_templates = tamp
param.update_templates = tamp3
param.add_templates = tamp2
api
.editTemp(id, param)
.then(response => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论