Commit 04d35a7c by 姜鹏凯

Merge branch 'develop'

2 parents 0b691bed b4565d9e
......@@ -753,12 +753,16 @@ export function setAttachments(list) {
list.forEach((dd) => {
if (dd.msgType === 'image') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '0',
materialUrl: dd.picUrl
}
arr.push(obj)
} else if (dd.msgType === 'video') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '2',
materialUrl: dd.fileUrl,
coverUrl: dd.picUrl,
......@@ -768,6 +772,8 @@ export function setAttachments(list) {
arr.push(obj)
} else if (dd.msgType === 'file') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '3',
materialUrl: dd.fileUrl,
digest: dd.description,
......@@ -776,12 +782,16 @@ export function setAttachments(list) {
arr.push(obj)
} else if (dd.msgType === 'text') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '4',
content: dd.content
}
arr.push(obj)
} else if (dd.msgType === 'link') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '9',
content: dd.content,
coverUrl: dd.picUrl,
......@@ -792,6 +802,8 @@ export function setAttachments(list) {
} else if (dd.msgType === 'miniprogram') {
let ff = {
mediaType: '11',
materialName: dd.title,
id: dd.materialId,
digest: dd.appId,
materialName: dd.title,
coverUrl: dd.picUrl,
......@@ -800,6 +812,8 @@ export function setAttachments(list) {
arr.push(ff)
} else if (dd.msgType === 'news') {
let ff = {
materialName: dd.title,
id: dd.materialId,
mediaType: '12',
digest: dd.description,
materialUrl: dd.fileUrl,
......@@ -810,6 +824,8 @@ export function setAttachments(list) {
arr.push(ff)
} else if (dd.msgType === 'posters') {
let obj = {
materialName: dd.title,
id: dd.materialId,
mediaType: '5',
materialUrl: dd.fileUrl,
materialName: dd.title
......
......@@ -301,11 +301,11 @@
if (val.templateInfo) {
this.form.templateInfo = val.templateInfo
this.form.attachments = val.attachments
if (this.form.templateInfo) {
// this.form.templateInfo = this.baseData.templateInfo
this.talkForm = this.form
this.talkList = this.form.attachments
}
// if (this.form.templateInfo) {
// this.form.templateInfo = this.baseData.templateInfo
this.talkForm = this.form
this.talkList = this.form.attachments
// }
this.$forceUpdate()
}
},
......@@ -342,6 +342,9 @@
let arr = []
this.talkList.forEach((item) => {
let attachments = {}
attachments.title = item.materialName
attachments.realType = +item.mediaType
attachments.materialId = item.id //素材
switch (item.mediaType) {
case '0':
// 图片
......@@ -353,7 +356,6 @@
attachments.picUrl = item.coverUrl
attachments.fileUrl = item.materialUrl
attachments.description = item.digest
attachments.title = item.materialName
attachments.msgType = 'video'
break
case '3':
......@@ -361,7 +363,6 @@
attachments.picUrl = this.filPicType(item.materialUrl)
attachments.fileUrl = item.materialUrl
attachments.description = item.digest
attachments.title = item.materialName
attachments.msgType = 'file'
break
case '4':
......@@ -379,15 +380,16 @@
attachments.content = item.content
attachments.picUrl = item.coverUrl
attachments.linkUrl = item.materialUrl
attachments.title = item.materialName
attachments.msgType = 'link'
if (this.otherType === 3) {
attachments.materialName = item.materialName
}
break
case '11':
// 小程序
attachments.picUrl = item.coverUrl
attachments.fileUrl = item.materialUrl
attachments.appId = item.digest
attachments.title = item.materialName
attachments.msgType = 'miniprogram'
break
case '12':
......@@ -396,7 +398,6 @@
attachments.description = item.digest
attachments.content = item.content
attachments.picUrl = item.coverUrl
attachments.title = item.materialName
attachments.msgType = 'news'
break
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!