From 4ab1335a94fb9deeb6406e5b7be00983f8ce9f17 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Wed, 3 Jul 2024 16:25:22 +0800 Subject: [PATCH] 6 --- .../commonComponents/video/index.vue | 5 ++++- pages/course/chapterDetail.vue | 10 +++++++++ pages/peanut/searchFor.vue | 22 +++++++------------ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pages/component/commonComponents/video/index.vue b/pages/component/commonComponents/video/index.vue index cd779c8..429d04c 100644 --- a/pages/component/commonComponents/video/index.vue +++ b/pages/component/commonComponents/video/index.vue @@ -131,8 +131,10 @@ var that = this; if (this.currentTime) { that.setVideoTime(); + console.log('我是onload定义的定时'); } }, 60000); + }, methods: { @@ -182,10 +184,11 @@ } this.options = data.currentVideo; console.log("this.options at line 64:", this.options); - this.videoId = this.options.video; + this.videoId = this.options.video; this.timer = setInterval(async () => { var that = this; if (this.currentTime) { + console.log('我是init定义的定时'); await that.setVideoTime(); } }, 60000); diff --git a/pages/course/chapterDetail.vue b/pages/course/chapterDetail.vue index c2a2937..9a8bfb5 100644 --- a/pages/course/chapterDetail.vue +++ b/pages/course/chapterDetail.vue @@ -350,6 +350,16 @@ export default { // this.getUserInfo() // this.getCateList() }, + + onUnload(){ + console.log('页面卸载') + + this.$nextTick(()=>{ + this.$refs.commonVideo.handleEnd(); + + }) + + }, onHide() { // this.showSearchList = false // this.searchList = [] diff --git a/pages/peanut/searchFor.vue b/pages/peanut/searchFor.vue index b80463b..0118e15 100644 --- a/pages/peanut/searchFor.vue +++ b/pages/peanut/searchFor.vue @@ -25,20 +25,11 @@ - + {{item.productName}} - - + @@ -230,12 +221,15 @@ }, // 电子书内容跳转 - onBookJump(e) { + onpageJump(e) { console.log(e,'e') uni.navigateTo({ - // url: '../eBook/bookContent?Id=' + e.id - url: '../bookShop/commodityDetail?type=2&id=' + e.productId + url: '/pages/goods/index/index?id=' + e.productId }); + // uni.navigateTo({ + // // url: '../eBook/bookContent?Id=' + e.id + // url: '../bookShop/commodityDetail?type=2&id=' + e.productId + // }); }, },