修改h5为有抽奖机会就跳转

This commit is contained in:
YeMingfei666 2024-12-16 18:05:39 +08:00
parent cfaadad802
commit 0c0a30e85a
1 changed files with 21 additions and 20 deletions

View File

@ -703,6 +703,7 @@
// #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
if (this.courseId) {
console.log('has this.courseId getDataList()');
this.getDataList(this.courseId, this.courseDetailsId);
}
this.$Request.getT('app/course/getRedEnvelopeTips').then(res => {
@ -1232,7 +1233,6 @@
// data.h5Url
this.showMoney = false //
uni.setStorageSync('noBuyVideoIndex', this.current)
this.noBuyVideoIndex = this.current
// this.payOrder(this.ordersId, this.payMoney)
// #ifdef APP
uni.navigateTo({
@ -1579,6 +1579,24 @@
}
}
console.log('到达判断抽奖');
// if (this.noBuyVideoIndex != null ) {
console.log(this.noBuyVideoIndex);
console.log(this.videoList);
if (this.noBuyVideoIndex !== null && this.noBuyVideoIndex !==
undefined && this.noBuyVideoIndex !== '' ) {
console.log('获取转盘抽奖次数')
this.$Request.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数',res.count)
if (res.count >= 1) {
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
} else {}
})
uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null
}
let numIdCurr = this.videoList[0].courseDetailsId
this.videoContextId = 'myVideo' + numIdCurr
this.$forceUpdate()
@ -1592,25 +1610,8 @@
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex = this.current
} else {
console.log('到达判断抽奖');
// if (this.noBuyVideoIndex != null ) {
console.log(this.noBuyVideoIndex);
if (this.noBuyVideoIndex !== null && this.noBuyVideoIndex !==
undefined && this.noBuyVideoIndex !== '' && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.$Request.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
if (res.count >= 1) {
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
} else {}
})
uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null
}
}
}
})