处理h5无痕浏览问题
This commit is contained in:
parent
ec7c3742bf
commit
421a3fe4f1
|
|
@ -2,27 +2,23 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"app-plus" :
|
"app-plus" : {
|
||||||
{
|
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"default" :
|
"default" : {
|
||||||
{
|
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"h5" :
|
"h5" : {
|
||||||
{
|
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"mp-weixin" :
|
"mp-weixin" : {
|
||||||
{
|
|
||||||
"launchtype" : "local"
|
"launchtype" : "local"
|
||||||
},
|
},
|
||||||
"provider" : "aliyun",
|
"provider" : "aliyun",
|
||||||
"type" : "uniCloud"
|
"type" : "uniCloud"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
// const ROOTPATH = "https://dj-api.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||||
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
|
||||||
|
|
||||||
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
|
||||||
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
|
||||||
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
|
||||||
|
|
||||||
const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
// const ROOTPATH1 = "http://192.168.1.5:8100/sqx_fast/"; //
|
||||||
const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
// const ROOTPATH = "http://192.168.1.5:8100/sqx_fast/"; //后台服务域名
|
||||||
const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名
|
// const ROOTPATH2 = "http://192.168.1.5:8100"; //后台服务域名
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
APIHOST: ROOTPATH,
|
APIHOST: ROOTPATH,
|
||||||
|
|
|
||||||
|
|
@ -407,9 +407,9 @@
|
||||||
if (this.videoContext) {
|
if (this.videoContext) {
|
||||||
this.videoContext.play()
|
this.videoContext.play()
|
||||||
}
|
}
|
||||||
const noBuyVideoIndex= uni.getStorageSync('noBuyVideoIndex')
|
const noBuyVideoIndex = uni.getStorageSync('noBuyVideoIndex')
|
||||||
if(noBuyVideoIndex!==null&&noBuyVideoIndex!==undefined){
|
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
|
||||||
this.noBuyVideoIndex=noBuyVideoIndex
|
this.noBuyVideoIndex = noBuyVideoIndex
|
||||||
}
|
}
|
||||||
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
|
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
|
||||||
let that = this
|
let that = this
|
||||||
|
|
@ -528,9 +528,9 @@
|
||||||
this.getMyLoveStatus()
|
this.getMyLoveStatus()
|
||||||
this.getMoneyList()
|
this.getMoneyList()
|
||||||
this.getMyMoney()
|
this.getMyMoney()
|
||||||
}else{
|
} else {
|
||||||
if(e.allId){
|
if (e.allId) {
|
||||||
const arr=e.allId.split('-')
|
const arr = e.allId.split('-')
|
||||||
this.courseId = arr[0];
|
this.courseId = arr[0];
|
||||||
if (arr[1] && arr[1] != 'null') {
|
if (arr[1] && arr[1] != 'null') {
|
||||||
this.courseDetailsId = arr[1]
|
this.courseDetailsId = arr[1]
|
||||||
|
|
@ -767,13 +767,13 @@
|
||||||
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
|
||||||
})
|
})
|
||||||
} else if (this.openWay == 1) {
|
} else if (this.openWay == 1) {
|
||||||
let paytype='h5'
|
let paytype = 'h5'
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
paytype='app'
|
paytype = 'app'
|
||||||
// #endif
|
// #endif
|
||||||
// APP支付宝支付
|
// APP支付宝支付
|
||||||
console.log('nvue payType='+paytype);
|
console.log('nvue payType=' + paytype);
|
||||||
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId+'?payType='+paytype, {}).then(ret => {
|
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId + '?payType=' + paytype, {}).then(ret => {
|
||||||
// plus.runtime.openURL(ret.data.h5Url)
|
// plus.runtime.openURL(ret.data.h5Url)
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -913,16 +913,16 @@
|
||||||
this.$refs.popuppay.open('bottom')
|
this.$refs.popuppay.open('bottom')
|
||||||
return
|
return
|
||||||
// 通过 id 获取 nvue 子窗体
|
// 通过 id 获取 nvue 子窗体
|
||||||
const subNVue = uni.getSubNVueById('pay')
|
// const subNVue = uni.getSubNVueById('pay')
|
||||||
subNVue.setStyle({
|
// subNVue.setStyle({
|
||||||
height: '350rpx',
|
// height: '350rpx',
|
||||||
})
|
// })
|
||||||
// 打开 nvue 子窗体
|
// // 打开 nvue 子窗体
|
||||||
subNVue.show('slide-in-bottom', 300, function() {
|
// subNVue.show('slide-in-bottom', 300, function() {
|
||||||
// 打开后进行一些操作...
|
// // 打开后进行一些操作...
|
||||||
//
|
// //
|
||||||
console.log('subnvue open')
|
// console.log('subnvue open')
|
||||||
});
|
// });
|
||||||
// 关闭 nvue 子窗体
|
// 关闭 nvue 子窗体
|
||||||
// subNVue.hide('fade-out', 300)
|
// subNVue.hide('fade-out', 300)
|
||||||
|
|
||||||
|
|
@ -1084,7 +1084,7 @@
|
||||||
this.countPrice = this.videoList[this.current].price
|
this.countPrice = this.videoList[this.current].price
|
||||||
this.$refs.popupPya.open('bottom')
|
this.$refs.popupPya.open('bottom')
|
||||||
this.noBuyVideoIndex = this.current
|
this.noBuyVideoIndex = this.current
|
||||||
uni.setStorageSync('noBuyVideoIndex',this.current)
|
uni.setStorageSync('noBuyVideoIndex', this.current)
|
||||||
},
|
},
|
||||||
//关闭购买弹窗
|
//关闭购买弹窗
|
||||||
closePay() {
|
closePay() {
|
||||||
|
|
@ -1281,7 +1281,7 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.noBuyVideoIndex !== null&& this.videoList[this
|
if (this.noBuyVideoIndex !== null && this.videoList[this
|
||||||
.noBuyVideoIndex].videoUrl) {
|
.noBuyVideoIndex].videoUrl) {
|
||||||
this.noBuyVideoIndex = null
|
this.noBuyVideoIndex = null
|
||||||
uni.removeStorageSync('noBuyVideoIndex')
|
uni.removeStorageSync('noBuyVideoIndex')
|
||||||
|
|
@ -1293,7 +1293,7 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/choujiang/choujiang'
|
url: '/me/choujiang/choujiang'
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.videoContext.play();
|
this.videoContext.play();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -1327,7 +1327,7 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/choujiang/choujiang'
|
url: '/me/choujiang/choujiang'
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
this.videoContext.play();
|
this.videoContext.play();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,9 @@
|
||||||
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
|
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
|
||||||
当前视频 没有播放权限
|
当前视频 没有播放权限
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin-bottom: 20rpx;">{{getRedEnvelopeTips}}</view>
|
<view class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin-bottom: 20rpx;">
|
||||||
|
{{getRedEnvelopeTips}}
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
|
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
|
||||||
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
|
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
|
||||||
|
|
@ -311,7 +313,7 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//记录未购买视频索引
|
//记录未购买视频索引
|
||||||
noBuyVideoIndex:null,
|
noBuyVideoIndex: null,
|
||||||
//奖品列表
|
//奖品列表
|
||||||
prizeList: [{
|
prizeList: [{
|
||||||
id: 'coupon88',
|
id: 'coupon88',
|
||||||
|
|
@ -580,8 +582,15 @@
|
||||||
if (e.tt_episode_id) {
|
if (e.tt_episode_id) {
|
||||||
this.tt_episode_id = e.tt_episode_id
|
this.tt_episode_id = e.tt_episode_id
|
||||||
}
|
}
|
||||||
if(e.allId){
|
if (e.allId) {
|
||||||
const arr=e.allId.split('-')
|
console.log("allId ---- ");
|
||||||
|
|
||||||
|
// 如果存在allId 并且没有登录 则表示使用无痕浏览器查看,弹出提示
|
||||||
|
if (!uni.getStorageSync('token')) {
|
||||||
|
uni.setStorageSync("isSafeView", "1")
|
||||||
|
}
|
||||||
|
|
||||||
|
const arr = e.allId.split('-')
|
||||||
this.courseId = arr[0];
|
this.courseId = arr[0];
|
||||||
if (arr[1] && arr[1] != 'null') {
|
if (arr[1] && arr[1] != 'null') {
|
||||||
this.courseDetailsId = arr[1]
|
this.courseDetailsId = arr[1]
|
||||||
|
|
@ -633,9 +642,9 @@
|
||||||
if (this.videoContext) {
|
if (this.videoContext) {
|
||||||
this.videoContext.play()
|
this.videoContext.play()
|
||||||
}
|
}
|
||||||
const noBuyVideoIndex= uni.getStorageSync('noBuyVideoIndex')
|
const noBuyVideoIndex = uni.getStorageSync('noBuyVideoIndex')
|
||||||
if(noBuyVideoIndex!==null&&noBuyVideoIndex!==undefined){
|
if (noBuyVideoIndex !== null && noBuyVideoIndex !== undefined) {
|
||||||
this.noBuyVideoIndex=noBuyVideoIndex
|
this.noBuyVideoIndex = noBuyVideoIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -693,12 +702,12 @@
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
|
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
|
||||||
if(this.courseId){
|
if (this.courseId) {
|
||||||
this.getDataList(this.courseId, this.courseDetailsId);
|
this.getDataList(this.courseId, this.courseDetailsId);
|
||||||
}
|
}
|
||||||
this.$Request.getT('app/course/getRedEnvelopeTips').then(res => {
|
this.$Request.getT('app/course/getRedEnvelopeTips').then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.getRedEnvelopeTips= res.data
|
this.getRedEnvelopeTips = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -760,7 +769,7 @@
|
||||||
/**
|
/**
|
||||||
* 获取金币比例
|
* 获取金币比例
|
||||||
*/
|
*/
|
||||||
getScale () {
|
getScale() {
|
||||||
this.$Request.getT("app/common/type/914", {}).then(res => {
|
this.$Request.getT("app/common/type/914", {}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.scale = Number(res.data.value)
|
this.scale = Number(res.data.value)
|
||||||
|
|
@ -791,7 +800,7 @@
|
||||||
this.zongPrice = this.info.price
|
this.zongPrice = this.info.price
|
||||||
this.countPrice = this.videoList[this.current].price
|
this.countPrice = this.videoList[this.current].price
|
||||||
this.showPay = true
|
this.showPay = true
|
||||||
this.noBuyVideoIndex=this.current
|
this.noBuyVideoIndex = this.current
|
||||||
},
|
},
|
||||||
// 获取收藏状态
|
// 获取收藏状态
|
||||||
getMyLoveStatus() {
|
getMyLoveStatus() {
|
||||||
|
|
@ -1052,8 +1061,8 @@
|
||||||
// #endif
|
// #endif
|
||||||
// console.log(e.detail.currentTime)
|
// console.log(e.detail.currentTime)
|
||||||
// console.log(e.detail.duration)
|
// console.log(e.detail.duration)
|
||||||
if (e.detail.currentTime > e.detail.duration*0.9) {
|
if (e.detail.currentTime > e.detail.duration * 0.9) {
|
||||||
if ( this.playFlag) {
|
if (this.playFlag) {
|
||||||
this.playFlag = false
|
this.playFlag = false
|
||||||
this.$Request.getT('app/course/viewCourse', {
|
this.$Request.getT('app/course/viewCourse', {
|
||||||
courseId: this.courseId,
|
courseId: this.courseId,
|
||||||
|
|
@ -1222,8 +1231,8 @@
|
||||||
console.log(data)
|
console.log(data)
|
||||||
// data.h5Url 跳转地址
|
// data.h5Url 跳转地址
|
||||||
this.showMoney = false //显示充值弹窗
|
this.showMoney = false //显示充值弹窗
|
||||||
uni.setStorageSync('noBuyVideoIndex',this.current)
|
uni.setStorageSync('noBuyVideoIndex', this.current)
|
||||||
this.noBuyVideoIndex=this.current
|
this.noBuyVideoIndex = this.current
|
||||||
// this.payOrder(this.ordersId, this.payMoney)
|
// this.payOrder(this.ordersId, this.payMoney)
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -1255,7 +1264,7 @@
|
||||||
// this.showPay = false
|
// this.showPay = false
|
||||||
// this.showMoney = false
|
// this.showMoney = false
|
||||||
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
|
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney);
|
||||||
} else if(type == 2){ //支付宝
|
} else if (type == 2) { //支付宝
|
||||||
this.showPay = false //关闭购买选择弹窗
|
this.showPay = false //关闭购买选择弹窗
|
||||||
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
this.payPrice = res.data.orders.payMoney //需要支付的价格
|
||||||
this.showMoney = true //显示充值弹窗
|
this.showMoney = true //显示充值弹窗
|
||||||
|
|
@ -1493,10 +1502,10 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
if(this.noBuyVideoIndex!==null){
|
if (this.noBuyVideoIndex !== null) {
|
||||||
this.noBuyVideoIndex=null
|
this.noBuyVideoIndex = null
|
||||||
return uni.navigateTo({
|
return uni.navigateTo({
|
||||||
url:'/me/choujiang/choujiang'
|
url: '/me/choujiang/choujiang'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else { //直接跳转进来的
|
} else { //直接跳转进来的
|
||||||
|
|
@ -1582,12 +1591,13 @@
|
||||||
this.zongPrice = this.info.price
|
this.zongPrice = this.info.price
|
||||||
this.countPrice = this.videoList[this.current].price
|
this.countPrice = this.videoList[this.current].price
|
||||||
this.showPay = true
|
this.showPay = true
|
||||||
this.noBuyVideoIndex=this.current
|
this.noBuyVideoIndex = this.current
|
||||||
}else{
|
} else {
|
||||||
console.log('到达判断抽奖');
|
console.log('到达判断抽奖');
|
||||||
// if (this.noBuyVideoIndex != null ) {
|
// if (this.noBuyVideoIndex != null ) {
|
||||||
console.log(this.noBuyVideoIndex);
|
console.log(this.noBuyVideoIndex);
|
||||||
if (this.noBuyVideoIndex !== null&&this.noBuyVideoIndex !== undefined&&this.noBuyVideoIndex !=='' && this.videoList[this
|
if (this.noBuyVideoIndex !== null && this.noBuyVideoIndex !==
|
||||||
|
undefined && this.noBuyVideoIndex !== '' && this.videoList[this
|
||||||
.noBuyVideoIndex].videoUrl) {
|
.noBuyVideoIndex].videoUrl) {
|
||||||
this.$Request.getT('app/discSpinning/drawCount').then(res => {
|
this.$Request.getT('app/discSpinning/drawCount').then(res => {
|
||||||
console.log('转盘抽奖次数')
|
console.log('转盘抽奖次数')
|
||||||
|
|
@ -1595,8 +1605,7 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/me/choujiang/choujiang'
|
url: '/me/choujiang/choujiang'
|
||||||
})
|
})
|
||||||
}else{
|
} else {}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
uni.removeStorageSync('noBuyVideoIndex')
|
uni.removeStorageSync('noBuyVideoIndex')
|
||||||
this.noBuyVideoIndex = null
|
this.noBuyVideoIndex = null
|
||||||
|
|
@ -1753,7 +1762,7 @@
|
||||||
this.zongPrice = this.info.price
|
this.zongPrice = this.info.price
|
||||||
this.countPrice = this.videoList[this.current].price
|
this.countPrice = this.videoList[this.current].price
|
||||||
this.showPay = true
|
this.showPay = true
|
||||||
this.noBuyVideoIndex=this.current
|
this.noBuyVideoIndex = this.current
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
//插入历史记录
|
//插入历史记录
|
||||||
|
|
@ -1796,7 +1805,7 @@
|
||||||
this.zongPrice = this.info.price
|
this.zongPrice = this.info.price
|
||||||
this.countPrice = this.videoList[this.current].price
|
this.countPrice = this.videoList[this.current].price
|
||||||
this.showPay = true
|
this.showPay = true
|
||||||
this.noBuyVideoIndex=this.current
|
this.noBuyVideoIndex = this.current
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//播放时的回掉
|
//播放时的回掉
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
||||||
// barWidth
|
// barWidth
|
||||||
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-KUAISHOU
|
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-KUAISHOU
|
||||||
// 获取胶囊按钮位置信息
|
// 获取胶囊按钮位置信息
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,15 @@
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
if (uni.getStorageSync('isSafeView')) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您正在使用无痕浏览,可能导致登录状态失效,建议切换浏览模式',
|
||||||
|
})
|
||||||
|
uni.setStorageSync("isSafeView", null)
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 注册
|
// 注册
|
||||||
register() {
|
register() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue