From 02e9cfa313c6011c8e05ebdd5063b800ae650f49 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 12 Jan 2026 17:46:15 +0800 Subject: [PATCH] =?UTF-8?q?chore(=E7=94=B5=E5=AD=90=E5=90=8D=E7=89=87):=20?= =?UTF-8?q?=20=E6=94=AF=E6=8C=81=E7=82=B9=E5=87=BB=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=8F=B7=E8=A7=86=E9=A2=91=EF=BC=8C=E8=A7=82=E7=9C=8B=E6=AC=A1?= =?UTF-8?q?=E6=95=B0+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components-diy/diy-channel-list.vue | 6 +++++- components-diy/diy-channel-video.vue | 10 +++++++--- pages_tool/contact/contact.vue | 18 ++++++++++++++++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/components-diy/diy-channel-list.vue b/components-diy/diy-channel-list.vue index 13b97c9..beb41b5 100644 --- a/components-diy/diy-channel-list.vue +++ b/components-diy/diy-channel-list.vue @@ -225,6 +225,10 @@ export default { promiseCallback: async (event, handler, awaitedResult) => { if (!awaitedResult) return; try { + // 发送视频被点击播放事件 + this.$emit('channel-video-click-play', item); + console.log('播放视频:', item); + // #ifdef MP-WEIXIN // 在微信小程序环境中调用视频播放接口 await wechatChannelUtil.playVideo(item); @@ -233,7 +237,7 @@ export default { // #ifndef MP-WEIXIN // 在非微信小程序环境中,直接触发事件 this.$emit('video-play', item); - // #endif + // #endif } catch (err) { console.error('打开视频号失败', err); } diff --git a/components-diy/diy-channel-video.vue b/components-diy/diy-channel-video.vue index 94a4d28..00183c6 100644 --- a/components-diy/diy-channel-video.vue +++ b/components-diy/diy-channel-video.vue @@ -25,7 +25,7 @@ - + @@ -180,8 +180,12 @@ export default { finderUserName: this.finderUserName } console.log('playload', playload); - this.$emit('video-play', playload); - // #endif + this.$emit('video-play', playload); + // #endif + + // #ifdef H5 + this.$emit('video-play', this.value); + // #endif } } }; diff --git a/pages_tool/contact/contact.vue b/pages_tool/contact/contact.vue index 06e5518..6a6a86a 100644 --- a/pages_tool/contact/contact.vue +++ b/pages_tool/contact/contact.vue @@ -101,8 +101,8 @@ + list: channelList, + }" @channel-video-click-play="onChannelVideoClickPlay"/> @@ -289,6 +289,20 @@ export default { shareUtil.shareFile(file); }, + onChannelVideoClickPlay(item) { + this.$api.sendRequest({ + url: '/api/member/incrementChannelViewCount', + data: { + channel_id: item.channelId + }, + success: res => { + + }, + fail: res => { + } + }); + }, + // 播放视频 playVideo(video) { // 实现视频播放逻辑