From be80b22a4a0fcd33e1b17ebdb86eba91cc7de4d2 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期三, 02 七月 2025 18:59:06 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- pages/video/video-play.vue | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pages/video/video-play.vue b/pages/video/video-play.vue index c11b7d2..cb2bb48 100644 --- a/pages/video/video-play.vue +++ b/pages/video/video-play.vue @@ -331,7 +331,8 @@ pageNumber: 1, pageSize: 10, authorId: '', - videoFrom: '' + videoFrom: '', + keyword: '' }, marginBottom: 0, // 搴曢儴瀹夊叏鍖哄煙 windowHeight: 0 // 鍙娇鐢ㄥ睆骞曢珮搴� @@ -350,6 +351,7 @@ }, onUnload() { uni.removeStorageSync("playInfo"); + uni.removeStorageSync("searchPlayInfo"); }, onReady() { @@ -357,11 +359,11 @@ onLoad(option) { this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom this.windowHeight = uni.getSystemInfoSync().windowHeight - const playInfo = uni.getStorageSync("playInfo", playInfo); + const playInfo = uni.getStorageSync("playInfo"); + const searchPlayInfo = uni.getStorageSync("searchPlayInfo"); if(playInfo) { this.currentIndex = playInfo.playIndex; this.videoList = playInfo.videoList; - console.log("鎷垮埌鏁版嵁浜�",playInfo); this.videoQuery.pageNumber = playInfo.pageNumber; this.videoNoMore = playInfo.nomore; this.videoQuery.authorId = option.authorId; @@ -371,6 +373,18 @@ const videoContext = uni.createVideoContext(`video${this.currentIndex}`, this); videoContext.play() }) + } else if (searchPlayInfo) { // 鎼滅储椤佃烦杞繃鏉ョ殑鏁版嵁鐣ユ湁涓嶅悓 + this.currentIndex = searchPlayInfo.playIndex; + this.videoList = searchPlayInfo.videoList; + this.videoQuery.pageNumber = searchPlayInfo.pageNumber; + this.videoNoMore = searchPlayInfo.nomore; + this.videoQuery.keyword = searchPlayInfo.keyword; + this.videoQuery.videoFrom = option.videoFrom; + this.currentVideoIsPlaying = true; + this.$nextTick(() => { + const videoContext = uni.createVideoContext(`video${this.currentIndex}`, this); + videoContext.play() + }) } else { this.videoQuery.videoFrom = 'recommend'; this.loadVideos(); -- Gitblit v1.8.0