修复抽奖不跳转问题

This commit is contained in:
2024-12-09 15:06:11 +08:00
parent 85e1b96557
commit 608c7b1678
2 changed files with 19 additions and 9 deletions

View File

@@ -1111,7 +1111,6 @@
this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this.videoContextId, this);
console.log('走更新了')
this.$nextTick(() => {
//播放当前的
this.videoContext.play();
@@ -1173,6 +1172,7 @@
//菜单数组
this.meunList = arr;
console.log(type)
console.log('this.noBuyVideoIndex',this.noBuyVideoIndex)
if (type == true) { //购买视频后返回的
console.log('购买视频后返回的')
let courseDetailsIds = this.videoList[this.current].courseDetailsId;
@@ -1193,13 +1193,14 @@
if(this.noBuyVideoIndex!==null){
this.noBuyVideoIndex=null
this.videoContext.stop()
return uni.navigateTo({
uni.navigateTo({
url:'/me/choujiang/choujiang'
})
}
console.log('this.noBuyVideoIndex',this.noBuyVideoIndex)
} else { //直接跳转进来的
this.videoList = this.meunList
this.$nextTick(() => {
let indexss = indexs > 0 ? indexs : 0
//滚动到记录视频的位置(如果有记录)
@@ -1207,13 +1208,23 @@
console.log(indexs, '有记录吗?')
this.goListPosition(this.videoList[indexs].courseDetailsId)
}
console.log('this.noBuyVideoIndex',this.noBuyVideoIndex)
if(this.noBuyVideoIndex!==null){
uni.navigateTo({
url:'/me/choujiang/choujiang'
})
}
if (this.videoList[indexss].videoUrl) { //有播放权限
let numIdCurr = this.videoList[indexss].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this
.videoContextId,
this);
this.videoContext.play();
if(this.noBuyVideoIndex!=null){
this.noBuyVideoIndex=null
}else{
this.videoContext.play();
}
} else { //没有播放权限打开购买弹窗
this.openPay()
}