Commit a893135a by xinla

素材修改

1 parent 3e395116
......@@ -140,21 +140,23 @@
</div>
<!-- 选择素材弹窗 -->
<!-- 文本 -->
<SelectMaterial
v-if="activeName === '0'"
:key="0"
:visible.sync="dialogVisibleSelectMaterial"
type="4"
@success="submitSelectMaterial"
@success="(data) => submitSelectMaterial(data, 4)"
>
</SelectMaterial>
<!-- 图片 -->
<SelectMaterial
v-else
:key="1"
:visible.sync="dialogVisibleSelectMaterial"
type="0"
@success="submitSelectMaterial"
@success="(data) => submitSelectMaterial(data, 0)"
>
</SelectMaterial>
......@@ -299,17 +301,17 @@ export default {
})
},
// 选择素材确认按钮
submitSelectMaterial(text, image, file) {
text &&
text.id &&
!this.form.materialIdList.includes(text.id) &&
this.form.materialIdList.push(text.id) &&
this.textMaterialList.push(text)
image &&
image.id &&
!this.form.materialIdList.includes(image.id) &&
this.form.materialIdList.push(image.id) &&
this.imageMaterialList.push(image)
submitSelectMaterial(data, type) {
data.id &&
!this.form.materialIdList.includes(data.id) &&
this.form.materialIdList.push(data.id)
type == 4 && this.textMaterialList.push(data)
type == 0 && this.imageMaterialList.push(data)
// !this.form.materialIdList.includes(image.id) &&
// this.form.materialIdList.push(image.id) &&
this.$refs.form.validateField('content')
},
// 选择客户群聊确认
......
......@@ -210,7 +210,7 @@ export default {
this.dialogVisibleAvatar = true
},
// 选择素材确认按钮
submitSelectMaterial(text, image, file) {
submitSelectMaterial(image) {
this.form.headImageUrl = image.materialUrl
// this.form.imageMessage._materialName = image.materialName
}
......
......@@ -310,7 +310,7 @@ export default {
this.msgSuccess('删除成功')
})
},
submitSelectMaterial(text, image, file) {
submitSelectMaterial(image) {
if (this.isBackgroundImage) {
this.form.mediaId = image.id
this.form.backgroundImgPath = image.materialUrl
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!