|
@@ -36,14 +36,16 @@
|
|
<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;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -209,7 +211,6 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
|
|
|
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
|
<script src="https://lf1-cdn-tos.bytegoofy.com/goofy/developer/jssdk/jssdk-1.0.3.js"></script>
|
|
<script src="https://lf1-cdn-tos.bytegoofy.com/goofy/developer/jssdk/jssdk-1.0.3.js"></script>
|
|
<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
|
|
<script type="text/javascript" src="jquery-1.11.0.min.js"></script>
|
|
@@ -220,7 +221,7 @@
|
|
<script type="text/javascript" src="webgl.js"></script>
|
|
<script type="text/javascript" src="webgl.js"></script>
|
|
<script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
<script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
<script type="text/javascript" src="WXdraw.js"></script>
|
|
<script type="text/javascript" src="WXdraw.js"></script>
|
|
- <script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.2/index.js"></script>
|
|
|
|
|
|
+ <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$(function () {
|
|
//手指滑动多少距离就认为是滑成功
|
|
//手指滑动多少距离就认为是滑成功
|
|
@@ -673,24 +674,7 @@
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.terminate();
|
|
decodeWoker.terminate();
|
|
webSocketWorker.terminate();
|
|
webSocketWorker.terminate();
|
|
- 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 {
|
|
|
|
- location.href = `${baseUrl}/cloud/phone/web/#/pages/index/index`
|
|
|
|
- // 动态设置有问题 https://ask.dcloud.net.cn/question/96060
|
|
|
|
- // document.addEventListener('UniAppJSBridgeReady', function() {
|
|
|
|
- // console.log(222)
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url: '/pages/index/index'
|
|
|
|
- // });
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
})
|
|
})
|
|
|
|
|
|
function handleClose() {
|
|
function handleClose() {
|
|
@@ -806,22 +790,7 @@
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.terminate();
|
|
decodeWoker.terminate();
|
|
webSocketWorker.terminate();
|
|
webSocketWorker.terminate();
|
|
- 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 {
|
|
|
|
- location.href = `${baseUrl}/cloud/phone/web/#/pages/index/index`
|
|
|
|
- // document.addEventListener('UniAppJSBridgeReady', function() {
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url: '/pages/index/index'
|
|
|
|
- // });
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
if (input[23] == 0x05) { //横竖屏标识
|
|
@@ -846,22 +815,7 @@
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.terminate();
|
|
decodeWoker.terminate();
|
|
webSocketWorker.terminate();
|
|
webSocketWorker.terminate();
|
|
- 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 {
|
|
|
|
- location.href = `${baseUrl}/cloud/phone/web/#/pages/index/index`
|
|
|
|
- // document.addEventListener('UniAppJSBridgeReady', function() {
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url: '/pages/index/index'
|
|
|
|
- // });
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1023,9 +977,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 = '';
|
|
@@ -1090,9 +1042,7 @@
|
|
} else {
|
|
} else {
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
systemBuriedPoint('激活码-强制关闭-放弃');
|
|
}
|
|
}
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
|
|
+ quit();
|
|
})
|
|
})
|
|
// 继续观看
|
|
// 继续观看
|
|
$('.looking')[0].addEventListener('click', () => {
|
|
$('.looking')[0].addEventListener('click', () => {
|
|
@@ -1152,7 +1102,7 @@
|
|
level = 0;
|
|
level = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- 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";
|
|
@@ -1167,23 +1117,30 @@
|
|
// 处理页面可见属性的改变
|
|
// 处理页面可见属性的改变
|
|
document.addEventListener("visibilitychange", function () {
|
|
document.addEventListener("visibilitychange", function () {
|
|
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.navigateTo({
|
|
|
|
- url: '/pages/index/index'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ quit();
|
|
|
|
+ wsss.close();
|
|
|
|
+ decodeWoker.postMessage('close');
|
|
|
|
+ decodeWoker.terminate();
|
|
|
|
+ webSocketWorker.terminate();
|
|
}
|
|
}
|
|
}, false);
|
|
}, false);
|
|
|
|
+
|
|
|
|
+ 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 {
|
|
|
|
+ uni.webView.navigateTo({
|
|
|
|
+ url: '/pages/index/index'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
window.onbeforeunload = function () {
|
|
window.onbeforeunload = function () {
|
|
wsss.close();
|
|
wsss.close();
|
|
decodeWoker.postMessage('close');
|
|
decodeWoker.postMessage('close');
|