mp:增加【视频】消息的发送

This commit is contained in:
YunaiV 2023-01-12 19:47:25 +08:00
parent 331af28fe7
commit 7ba6a2e385
3 changed files with 25 additions and 33 deletions

View File

@ -38,7 +38,7 @@ public class MpMessageSendReqVO {
private String title;
@ApiModelProperty(value = "描述", required = true, example = "你猜")
@NotEmpty(message = "消息内容不能为空", groups = VideoGroup.class)
@NotEmpty(message = "消息描述不能为空", groups = VideoGroup.class)
private String description;
@ApiModelProperty(value = "缩略图的媒体 id", required = true, example = "qqc_2Fot30Jse-HDoZmo5RrUDijz2nGUkP")

View File

@ -28,7 +28,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="编号" align="center" prop="mediaId" />
<el-table-column label="" align="center" prop="name" />
<el-table-column label="文件名" align="center" prop="name" />
<el-table-column label="语音" align="center">
<template v-slot="scope">
<wx-voice-player :url="scope.row.url" />
@ -54,6 +54,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="编号" align="center" prop="mediaId" />
<el-table-column label="文件名" align="center" prop="name" />
<el-table-column label="标题" align="center" prop="title" />
<el-table-column label="介绍" align="center" prop="introduction" />
<el-table-column label="视频" align="center">

View File

@ -81,15 +81,16 @@
</el-dialog>
</el-row>
</el-tab-pane>
<!-- 类型 4视频 -->
<el-tab-pane name="video">
<span slot="label"><i class="el-icon-share"></i> 视频</span>
<el-row>
<el-input v-model="objData.repName" placeholder="请输入标题"></el-input>
<el-input v-model="objData.title" placeholder="请输入标题"></el-input>
<div style="margin: 20px 0;"></div>
<el-input v-model="objData.repDesc" placeholder="请输入描述"></el-input>
<el-input v-model="objData.description" placeholder="请输入描述"></el-input>
<div style="margin: 20px 0;"></div>
<div style="text-align: center;">
<a target="_blank" v-if="objData.url" :href="objData.url"><i class="icon-shipinbofang">&nbsp;播放视频</i></a>
<wx-video-player v-if="objData.url" :url="objData.url" />
</div>
<div style="margin: 20px 0;"></div>
<div style="text-align: center">
@ -161,13 +162,15 @@
import WxNews from '@/views/mp/components/wx-news/main.vue'
import WxMaterialSelect from '@/views/mp/components/wx-material-select/main.vue'
import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue';
import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue';
export default {
name: "wxReplySelect",
components: {
WxNews,
WxMaterialSelect,
WxVoicePlayer
WxVoicePlayer,
WxVideoPlayer
},
props: {
objData: { //
@ -354,27 +357,22 @@
|| this.objData.type === 'voice') {
tempObjItem.mediaId = item.mediaId
this.objData.mediaId = item.mediaId
if (item.url) {
tempObjItem.url = item.url;
this.objData.url = item.url;
} else { // 使 $delete vue
this.$delete(this.objData, 'url');
}
tempObjItem.name = item.name
this.objData.name = item.name
} else if (this.objData.type === 'video') {
// getMaterialVideo({
// mediaId:item.mediaId
// }).then(response => {
// if(response.code == 200){
// let data = response.data
// this.$set(this.objData,'repName',data.title)
// this.$set(this.objData,'repDesc',data.description)
// this.$set(this.objData,'url',data.downUrl)
// tempObjItem.repDesc = data.description
// tempObjItem.url = data.downUrl
// }
// })
tempObjItem.mediaId = item.mediaId
this.objData.mediaId = item.mediaId
tempObjItem.url = item.url;
this.objData.url = item.url;
tempObjItem.name = item.name
this.objData.name = item.name
// titleintroduction
this.objData.title = item.title
tempObjItem.title = this.objData.title
this.objData.description = item.introduction // 使 description使 introduction
tempObjItem.description = this.objData.introduction
}
//
this.tempObj.set(this.objData.type, tempObjItem)
@ -400,15 +398,8 @@
this.dialogThumbVisible = false
},
deleteObj() {
console.log('删除!');
if (this.objData.type === 'news') {
// TODO
} else if(this.objData.type === 'image'
|| this.objData.type === 'voice') {
// this.$delete(this.objData, 'url'); TODO reset
this.selectMaterial({}) //
} else if(this.objData.type === 'video') {
// TODO
}
},
getPage(page, params) {
this.tableLoading = true