Commit eedb2334 by test

欢迎语模板BUG修复

1 parent bee4f39d
......@@ -227,7 +227,6 @@
},
watch: {
baseData (val) {
console.log(2222)
if (val.welcomeMsg) {
this.form = val
}
......@@ -422,8 +421,6 @@
this.welcomeMsgError = ''
}
const checkMaterialResult = this.validateMaterial()
console.log(this.form)
if (checkMaterialResult) {
let goto = true
this.form.materialMsgList.forEach((dd) => {
......@@ -442,6 +439,7 @@
}
}
})
this.$forceUpdate()
if (goto) {
// this.msgInfo('校验通过')
this.$emit('submit', this.form)
......
......@@ -30,10 +30,7 @@
id: '',
welcomeMsgTplType: '',
welcomeMsg: '',
picUrl: '',
applet: [],
imageText: [],
userIds: ''
materialMsgList: []
},
// 遮罩层
loading: false,
......@@ -46,6 +43,7 @@
this.form.id = this.$route.query.id
let data = JSON.parse(localStorage.getItem('obj'))
this.form = Object.assign(this.form, data)
this.form.welcomeMsgTplType = this.form.welcomeMsgTplType.toString()
this.name = this.form.welcomeMsgTplType === '1' ? '活码' : this.form.welcomeMsgTplType === '2' ? '员工' : '入群'
this.type = this.form.id ? '编辑' : '新建'
this.$route.meta.title = (this.form.id ? '编辑' : '新建') + '欢迎语'
......@@ -107,6 +105,18 @@
// getPreview(this.form.id).then(({ data }) => {
this.materialData = this.form
console.log(this.materialData)
this.materialData.users = []
if (this.materialData.userIds) {
let name = this.materialData.userNames.split(',')
this.materialData.userIds.split(',').forEach((ddd, index) => {
let obj = {
useUserId: ddd,
userName: name[index]
}
this.materialData.users.push(obj)
})
}
console.log(this.materialData.users)
this.materialData.materialMsgList = []
let img = []
let imgText = []
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!