Feat(寻看点):增加逻辑判断,如果不是点击进入则强制跳转至首页

This commit is contained in:
lifizer
2025-03-06 09:49:24 +08:00
parent 0fdee74098
commit ed9ae77ead
3 changed files with 16 additions and 8 deletions
@@ -18,12 +18,16 @@ export default {
pageKeyId: ''
}
},
onReady: function(res) {
onReady(res) {
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen();
},
onLoad:function(e){
this.curPlayVideoUrl = e.videoUrl
onLoad(options) {
if (!options.click) {
uni.switchTab({ url: '/pages/home/index' })
return
}
this.curPlayVideoUrl = options.videoUrl
const id = options.id
this.pageKeyId = `findVideo_videoId_${id}`
},
@@ -51,7 +51,11 @@ export default {
pageKeyId: Object.freeze('findVideoList')
}
},
onLoad() {
onLoad(options) {
if (!options.click) {
uni.switchTab({ url: '/pages/home/index' })
return
}
this.getType()
this.fetchList()
},
@@ -94,7 +98,7 @@ export default {
})
},
goDetail(item) {
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id)
this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1')
}
}
}