Commit 189e5c8e authored by wildfirecode's avatar wildfirecode

1

parent 198ed8fb
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
window['rule'] = '1111<br>2222'; window['rule'] = '1111<br>2222';
window['projectID']='p32804e45'; window['projectID']='p32804e45';
// window.firstScene='admin'; // window.firstScene='admin';
// window.firstScene='invite'; window.firstScene='invite';
window['renderMode'] = 'webgl'; window['renderMode'] = 'webgl';
window['development'] = true; window['development'] = true;
var gameId = 1; var gameId = 1;
......
...@@ -39,13 +39,29 @@ export default class ShareDreamScene extends Scene { ...@@ -39,13 +39,29 @@ export default class ShareDreamScene extends Scene {
this['shareLayer'].visible = false; this['shareLayer'].visible = false;
}, this); }, this);
} else { } else {
let state = false;
console.log('唤起app'); console.log('唤起app');
state = true;
const url = 'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=' + encodeURIComponent(window['activeUrl']); const url = 'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=' + encodeURIComponent(window['activeUrl']);
window.location.href = url; window.location.href = url;
setTimeout(() => { let timer = setTimeout(() => {
state = false;
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.fan.asiangameshz'; window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.fan.asiangameshz';
}, 2000); }, 3000);
// 唤端成功清除定时器
document.addEventListener('visibilitychange', function () {
if (document.visibilityState === 'hidden') {
if (state) {
if (timer) {
clearTimeout(timer)
timer = null;
}
state = false;
}
}
});
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment