mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
mp:增加【视频】消息的发送
This commit is contained in:
parent
331af28fe7
commit
7ba6a2e385
@ -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")
|
||||||
|
@ -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">
|
||||||
|
@ -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"> 播放视频</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)
|
// title、introduction
|
||||||
// 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') {
|
this.selectMaterial({}) // 选择一个空的素材
|
||||||
// TODO 芋艿,待实现
|
|
||||||
} else if(this.objData.type === 'image'
|
|
||||||
|| this.objData.type === 'voice') {
|
|
||||||
this.selectMaterial({}) // 选择一个空的素材
|
|
||||||
} else if(this.objData.type === 'video') {
|
|
||||||
// TODO 芋艿,待实现
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getPage(page, params) {
|
getPage(page, params) {
|
||||||
this.tableLoading = true
|
this.tableLoading = true
|
||||||
|
Loading…
Reference in New Issue
Block a user