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

View File

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

View File

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