diff --git a/yudao-ui-admin/src/views/mp/components/wx-reply/main.vue b/yudao-ui-admin/src/views/mp/components/wx-reply/main.vue
index 682edcd48..7b64e15be 100644
--- a/yudao-ui-admin/src/views/mp/components/wx-reply/main.vue
+++ b/yudao-ui-admin/src/views/mp/components/wx-reply/main.vue
@@ -111,7 +111,7 @@
- {{newsType == '1' ? '选择已发布图文' : '选择草稿箱图文'}}
+ {{newsType === '1' ? '选择已发布图文' : '选择草稿箱图文'}}
@@ -125,18 +125,11 @@
-
+
-
+
本地上传
素材库选择
@@ -147,15 +140,15 @@
-
+
-
+
-
+
-
+
@@ -165,7 +158,7 @@
import WxNews from '@/views/mp/components/wx-news/main.vue'
// import WxMaterialSelect from '@/components/wx-material-select/main.vue'
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue';
- import {getAccessToken, getToken} from '@/utils/auth'
+ import {getAccessToken} from '@/utils/auth'
export default {
name: "wxReplySelect",
@@ -349,30 +342,26 @@
// 创建 tempObjItem 对象,并设置对应的值
let tempObjItem = {}
-
- // tempObjItem.repMediaId = item.mediaId // TODO 芋艿:应该可以注释吧?
- // tempObjItem.content = item.content // TODO 芋艿:应该可以注释吧?
-
- // this.objData.repMediaId = item.mediaId
- this.objData.mediaId = item.mediaId
- this.objData.content = item.content
- if (this.objData.type === 'music') {
- tempObjItem.repThumbMediaId = item.mediaId
- tempObjItem.repThumbUrl = item.url
- this.objData.repThumbMediaId = item.mediaId
- this.objData.repThumbUrl = item.url
- this.dialogThumbVisible = false // TODO 芋艿:这里为什么单独写???
- } else{
- tempObjItem.type = this.objData.type;
+ tempObjItem.type = this.objData.type;
+ if (this.objData.type === 'music') { // 音乐需要特殊处理,因为选择的是图片的缩略图
+ tempObjItem.thumbMediaId = item.mediaId
+ this.objData.thumbMediaId = item.mediaId
+ tempObjItem.thumbMediaUrl = item.url
+ this.objData.thumbMediaUrl = item.url
+ // title、introduction、musicUrl、hqMusicUrl
+ tempObjItem.title = this.objData.title
+ tempObjItem.introduction = this.objData.introduction
+ tempObjItem.musicUrl = this.objData.musicUrl
+ tempObjItem.hqMusicUrl = this.objData.hqMusicUrl
+ } else if (this.objData.type === 'image'
+ || this.objData.type === 'voice') {
tempObjItem.mediaId = item.mediaId;
- tempObjItem.url = item.url;
- // tempObjItem.repName = item.name
- // tempObjItem.url = item.url
- // this.objData.repName = item.name
this.objData.mediaId = item.mediaId
+ tempObjItem.url = item.url;
this.objData.url = item.url
- }
- if(this.objData.type == 'video'){
+ // tempObjItem.repName = item.name
+ // this.objData.repName = item.name
+ } else if (this.objData.type === 'video') {
// getMaterialVideo({
// mediaId:item.mediaId
// }).then(response => {
@@ -407,6 +396,7 @@
this.dialogImageVisible = false
this.dialogVoiceVisible = false
this.dialogVideoVisible = false
+ this.dialogThumbVisible = false
},
deleteObj() {
if (this.objData.type === 'news') {
@@ -417,8 +407,6 @@
this.$delete(this.objData, 'mediaId')
} else if(this.objData.type === 'video') {
// TODO 芋艿,待实现
- } else if(this.objData.type === 'music') {
- // TODO 芋艿,待实现
}
},
getPage(page, params) {