|
@@ -35,14 +35,14 @@
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css" />
|
|
<style>
|
|
<style>
|
|
- .try-use-wrap, .buy-phone-wrap, .look-wrap{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- position: fixed;
|
|
|
|
- top: 0;
|
|
|
|
- left: 0;
|
|
|
|
- z-index: 9999;
|
|
|
|
- background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
|
+ .try-use-wrap, .buy-phone-wrap, .look-wrap {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ z-index: 9999;
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
display: none;
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -354,15 +354,7 @@
|
|
} else {
|
|
} else {
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
$.toast("画面异常,请重新进入", "text");
|
|
$.toast("画面异常,请重新进入", "text");
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
}, 3000);
|
|
}, 3000);
|
|
|
|
|
|
@@ -380,15 +372,7 @@
|
|
if (errorTime > 1000) {
|
|
if (errorTime > 1000) {
|
|
$.toast("画面异常,请重新进入", "text");
|
|
$.toast("画面异常,请重新进入", "text");
|
|
wsss.close();
|
|
wsss.close();
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
ws.addEventListener('message', function (event) {
|
|
ws.addEventListener('message', function (event) {
|
|
@@ -439,7 +423,7 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- var hidden, visibilityChange;
|
|
|
|
|
|
+ var hidden, visibilityChange;
|
|
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
|
|
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
|
|
hidden = "hidden";
|
|
hidden = "hidden";
|
|
visibilityChange = "visibilitychange";
|
|
visibilityChange = "visibilitychange";
|
|
@@ -455,21 +439,7 @@
|
|
document.addEventListener("visibilitychange", function () {
|
|
document.addEventListener("visibilitychange", function () {
|
|
console.log(document[hidden]);
|
|
console.log(document[hidden]);
|
|
if (document[hidden]) {
|
|
if (document[hidden]) {
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
- uni.webView.navigateTo({
|
|
|
|
- url: '/pages/index/index'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
}, false);
|
|
}, false);
|
|
|
|
|
|
@@ -490,6 +460,24 @@
|
|
$('.mask').hide();
|
|
$('.mask').hide();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function quit() {
|
|
|
|
+ if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
+ tt.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else if (window.__wxjs_environment === 'miniprogram') {
|
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
|
+ url: '/pages/home/home'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ document.addEventListener('UniAppJSBridgeReady', function () {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
function decodeAAC(data) {
|
|
function decodeAAC(data) {
|
|
var retPtr = Module._malloc(4 * 5 * 1024); // 接收的数据
|
|
var retPtr = Module._malloc(4 * 5 * 1024); // 接收的数据
|
|
var inputPtr = Module._malloc(4 * data.length); // 输入数据
|
|
var inputPtr = Module._malloc(4 * data.length); // 输入数据
|
|
@@ -549,15 +537,7 @@
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
ws.close();
|
|
ws.close();
|
|
wsss.close();
|
|
wsss.close();
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
@@ -927,15 +907,7 @@
|
|
clearInterval(intervaler);
|
|
clearInterval(intervaler);
|
|
ws.close();
|
|
ws.close();
|
|
wsss.close();
|
|
wsss.close();
|
|
- if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
|
|
|
|
- tt.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
})
|
|
})
|
|
|
|
|
|
function selectText(x) {
|
|
function selectText(x) {
|
|
@@ -1108,9 +1080,7 @@
|
|
$('.buy-phone-wrap').eq(0).hide();
|
|
$('.buy-phone-wrap').eq(0).hide();
|
|
if (disconnectionFlag || getDate) {//设置了断线时间,取消直接退出
|
|
if (disconnectionFlag || getDate) {//设置了断线时间,取消直接退出
|
|
systemBuriedPoint('激活码-断线-取消');
|
|
systemBuriedPoint('激活码-断线-取消');
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
|
|
+ quit();
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let pointName = '';
|
|
let pointName = '';
|
|
@@ -1157,9 +1127,7 @@
|
|
} else {
|
|
} else {
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
}
|
|
}
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
|
|
+ quit();
|
|
})
|
|
})
|
|
// 继续观看
|
|
// 继续观看
|
|
$('.looking')[0].addEventListener('click', () => {
|
|
$('.looking')[0].addEventListener('click', () => {
|