From 32f152cc271ca4e0beab230fae5d6f8b6151cfe1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 12 Jan 2023 09:06:25 +0800 Subject: [PATCH] =?UTF-8?q?mp=EF=BC=9A=E6=94=AF=E6=8C=81=20wx-reply=20?= =?UTF-8?q?=E5=8F=91=E9=80=81=E9=9F=B3=E4=B9=90=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/mp/components/wx-reply/main.vue | 66 ++++++++----------- 1 file changed, 27 insertions(+), 39 deletions(-) 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) {