处理h5无痕浏览问题

This commit is contained in:
GYJ
2024-12-14 11:09:58 +08:00
parent ec7c3742bf
commit 421a3fe4f1
6 changed files with 114 additions and 102 deletions

View File

@@ -407,9 +407,9 @@
if (this.videoContext) {
this.videoContext.play()
}
const noBuyVideoIndex= uni.getStorageSync('noBuyVideoIndex')
if(noBuyVideoIndex!==null&&noBuyVideoIndex!==undefined){
this.noBuyVideoIndex=noBuyVideoIndex
const noBuyVideoIndex = uni.getStorageSync('noBuyVideoIndex')
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
this.noBuyVideoIndex = noBuyVideoIndex
}
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
let that = this
@@ -528,19 +528,19 @@
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}else{
if(e.allId){
const arr=e.allId.split('-')
} else {
if (e.allId) {
const arr = e.allId.split('-')
this.courseId = arr[0];
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
}
},
methods: {
@@ -767,13 +767,13 @@
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
})
} else if (this.openWay == 1) {
let paytype='h5'
let paytype = 'h5'
// #ifdef APP
paytype='app'
paytype = 'app'
// #endif
// APP支付宝支付
console.log('nvue payType='+paytype);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId+'?payType='+paytype, {}).then(ret => {
console.log('nvue payType=' + paytype);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
// plus.runtime.openURL(ret.data.h5Url)
uni.navigateTo({
@@ -913,16 +913,16 @@
this.$refs.popuppay.open('bottom')
return
// 通过 id 获取 nvue 子窗体
const subNVue = uni.getSubNVueById('pay')
subNVue.setStyle({
height: '350rpx',
})
// 打开 nvue 子窗体
subNVue.show('slide-in-bottom', 300, function() {
// 打开后进行一些操作...
//
console.log('subnvue open')
});
// const subNVue = uni.getSubNVueById('pay')
// subNVue.setStyle({
// height: '350rpx',
// })
// // 打开 nvue 子窗体
// subNVue.show('slide-in-bottom', 300, function() {
// // 打开后进行一些操作...
// //
// console.log('subnvue open')
// });
// 关闭 nvue 子窗体
// subNVue.hide('fade-out', 300)
@@ -1084,7 +1084,7 @@
this.countPrice = this.videoList[this.current].price
this.$refs.popupPya.open('bottom')
this.noBuyVideoIndex = this.current
uni.setStorageSync('noBuyVideoIndex',this.current)
uni.setStorageSync('noBuyVideoIndex', this.current)
},
//关闭购买弹窗
closePay() {
@@ -1280,9 +1280,9 @@
}
})
})
if (this.noBuyVideoIndex !== null&& this.videoList[this
.noBuyVideoIndex].videoUrl) {
if (this.noBuyVideoIndex !== null && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.noBuyVideoIndex = null
uni.removeStorageSync('noBuyVideoIndex')
this.videoContext.stop()
@@ -1293,7 +1293,7 @@
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
}else{
} else {
this.videoContext.play();
}
})
@@ -1312,7 +1312,7 @@
console.log('this.noBuyVideoIndex', this.noBuyVideoIndex)
if (this.videoList[indexss].videoUrl) { //有播放权限
console.log('有播放权限进入是否抽取转盘判断')
console.log('有播放权限进入是否抽取转盘判断')
let numIdCurr = this.videoList[indexss].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this
@@ -1327,7 +1327,7 @@
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
}else{
} else {
this.videoContext.play();
}
})