From ddfd93ec1de37a1af2b83782be9734e27931c14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Thu, 26 Feb 2026 15:54:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/plugins/video/detail/detail.vue | 16 +++++++++------- pages/plugins/video/search/search-record.vue | 13 ++++++++++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pages/plugins/video/detail/detail.vue b/pages/plugins/video/detail/detail.vue index ee9d17dd..ebd3ced0 100644 --- a/pages/plugins/video/detail/detail.vue +++ b/pages/plugins/video/detail/detail.vue @@ -350,9 +350,6 @@ params: app.globalData.launch_params_handle(params), }); }, - onShow() { - this.init(); - }, onHide() { // 清理定时器 if (this.video_switch_debounce_timer) { @@ -365,6 +362,7 @@ this.cleanup_all_videos(); }, mounted() { + this.init(); // #ifdef H5 // 添加全局点击事件监听 document.addEventListener('click', this.handle_global_click); @@ -422,10 +420,10 @@ this.setData({ header_padding_left: padding_left, menu_button_info: menu_button_info, - current_video_id: this.params.id, + current_video_id: isEmpty(this.current_video_id) ? this.params.id : this.current_video_id, }); - this.get_video_detail(this.params.id); + this.get_video_detail(this.current_video_id); }, // 获取视频详情 get_video_detail(id) { @@ -544,7 +542,9 @@ this.display_video_list.forEach((item, index) => { this.create_video_contexts[index] = uni.createVideoContext(`video_${index}`, this); //#ifdef H5 - this.video_contexts[index] = document.getElementById(`video_${index}`).querySelector('video'); + if (document.getElementById(`video_${index}`) != null) { + this.video_contexts[index] = document.getElementById(`video_${index}`).querySelector('video'); + } //#endif }); @@ -1095,7 +1095,9 @@ const data = res.data; if (data.code == 0) { const new_data = data.data; - if (new_data.data.length > 0) { + if (comment.page == 0) { + comment.sub_comments = new_data.data; + } else if (new_data.data.length > 0) { comment.sub_comments.push(...new_data.data); } comment.page = new_data.page; diff --git a/pages/plugins/video/search/search-record.vue b/pages/plugins/video/search/search-record.vue index 52bb7afc..d1a9c8be 100644 --- a/pages/plugins/video/search/search-record.vue +++ b/pages/plugins/video/search/search-record.vue @@ -17,6 +17,10 @@ + + 历史记录 + 清除记录 + @@ -25,7 +29,7 @@ -