Commit ae80296f by 前端

修复营销素材提交bug

1 parent 39d22557
......@@ -429,7 +429,7 @@ export default {
if (!imgHtml && !videoHtml) params.materialType = 5
if (imgHtml && imgHtml.length && !videoHtml && !html.length) params.materialType = 6
if (this.materialAddForm.vedioUrl && !this.materialAddForm.imageUrlList.length) params.materialType = 4
if (this.materialAddForm.imageUrlList.length) params.materialType = 3
if (this.materialAddForm.imageUrlList && this.materialAddForm.imageUrlList.length) params.materialType = 3
this.textBoxContent = encodeURIComponent(this.textBoxContent)
params.materialUrl = this.textBoxContent
}
......
......@@ -556,13 +556,13 @@ export default {
let videoHtml = html.match(/<video.*?(?:>|\/>)/g)
if (imgHtml) {
let imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
item.materialContentRpcResponse.materialUrl = imgSrc[1]
item.materialContentRpcResponse.materialUrl = imgSrc? imgSrc[1] :''
item.urlType = 'img'
item.imgCount = imgHtml.length
}
if (videoHtml) {
let videoSrc = videoHtml[0].match('<video[^<>]*? src="([^<>]*?)"')
item.materialContentRpcResponse.materialUrl = videoSrc[1]
item.materialContentRpcResponse.materialUrl = videoSrc ? videoSrc[1] :''
item.urlType = 'video'
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!