This commit is contained in:
@fawn-nine
2024-07-03 16:25:22 +08:00
parent 1c20c59fda
commit 4ab1335a94
3 changed files with 22 additions and 15 deletions

View File

@@ -131,8 +131,10 @@
var that = this; var that = this;
if (this.currentTime) { if (this.currentTime) {
that.setVideoTime(); that.setVideoTime();
console.log('我是onload定义的定时');
} }
}, 60000); }, 60000);
}, },
methods: { methods: {
@@ -182,10 +184,11 @@
} }
this.options = data.currentVideo; this.options = data.currentVideo;
console.log("this.options at line 64:", this.options); console.log("this.options at line 64:", this.options);
this.videoId = this.options.video; this.videoId = this.options.video;
this.timer = setInterval(async () => { this.timer = setInterval(async () => {
var that = this; var that = this;
if (this.currentTime) { if (this.currentTime) {
console.log('我是init定义的定时');
await that.setVideoTime(); await that.setVideoTime();
} }
}, 60000); }, 60000);

View File

@@ -350,6 +350,16 @@ export default {
// this.getUserInfo() // this.getUserInfo()
// this.getCateList() // this.getCateList()
}, },
onUnload(){
console.log('页面卸载')
this.$nextTick(()=>{
this.$refs.commonVideo.handleEnd();
})
},
onHide() { onHide() {
// this.showSearchList = false // this.showSearchList = false
// this.searchList = [] // this.searchList = []

View File

@@ -25,20 +25,11 @@
<view class="sear_list" v-if="this.show==1"> <view class="sear_list" v-if="this.show==1">
<view class="flexbox" style="display: flex; flex-wrap: wrap; justify-content: space-evenly;"> <view class="flexbox" style="display: flex; flex-wrap: wrap; justify-content: space-evenly;">
<view class="bl_tioa" v-for="(item,index) in bookList" @click="onBookJump(item)"> <view class="bl_tioa" v-for="(item,index) in bookList" @click="onpageJump(item)">
<image :src="item.productImages"></image> <image :src="item.productImages"></image>
<view> <view>
<text class="bok_name">{{item.productName}}</text> <text class="bok_name">{{item.productName}}</text>
</view> </view>
<!-- <view>
<text>作者<text style="color: #333;">{{item.authorName}}</text></text>
</view>
<view>
<text>出版商<text style="color: #333;">{{item.publisherName}}</text></text>
</view>
<view>
<text style="line-height: 20rpx;">{{item.title}}</text>
</view> -->
</view> </view>
</view> </view>
@@ -230,12 +221,15 @@
}, },
// 电子书内容跳转 // 电子书内容跳转
onBookJump(e) { onpageJump(e) {
console.log(e,'e') console.log(e,'e')
uni.navigateTo({ uni.navigateTo({
// url: '../eBook/bookContent?Id=' + e.id url: '/pages/goods/index/index?id=' + e.productId
url: '../bookShop/commodityDetail?type=2&id=' + e.productId
}); });
// uni.navigateTo({
// // url: '../eBook/bookContent?Id=' + e.id
// url: '../bookShop/commodityDetail?type=2&id=' + e.productId
// });
}, },
}, },