Commit 911b16ee authored by wildfirecode's avatar wildfirecode

1

parent 311b914f
......@@ -53,7 +53,8 @@
<script>
// window['pageID'] = 'TeamShareScene';
// window['pageID'] = 'JoinShareScene';
// window['pageID'] = 'TransScene';
window['pageID'] = 'TransScene';
// window['pageID'] = 'Share2Scene';
window['TransLink']='';
window['projectId'] = "1";
window['playwayId'] = "join_1";
......
......@@ -183,6 +183,9 @@ class Main extends MainBase {
// }
Waiting.instance.hide();
if (window['pageID'] == 'Share2Scene') {
SceneCtrl.instance.change(ModuleTypes.Share2Scene);
}
if (window['pageID'] == 'JoinShareScene') {
SceneCtrl.instance.change(ModuleTypes.JoinShareScene);
}
......
......@@ -42,5 +42,25 @@ export default class JoinShareScene extends Scene {
export const deeplink = (activeUrl) => {
let state = false;
window.location.href = 'esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=' + encodeURIComponent(activeUrl);
state = true;
let timer = setTimeout(() => {
state = false;
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.fan.asiangameshz';
}, 3000);
// 唤端成功清除定时器
document.addEventListener('visibilitychange', function () {
if (document.visibilityState === 'hidden') {
if (state) {
if (timer) {
clearTimeout(timer)
timer = null;
}
state = false;
}
}
});
}
\ No newline at end of file
import Scene from "../views/Scene";
import iswx from "../iswx";
import GameConst from "../GameConst";
import { deeplink } from "./JoinShareScene";
export default class Share2Scene extends Scene {
protected get skinKey() { return 'Share2' }
......@@ -15,10 +18,15 @@ export default class Share2Scene extends Scene {
}
onTap_btn() {
if (iswx()) {
this['sharemask'].visible = true;
this['sharemask'].once(egret.TouchEvent.TOUCH_TAP,()=>{
this['sharemask'].once(egret.TouchEvent.TOUCH_TAP, () => {
this['sharemask'].visible = false;
},this);
}, this);
}else {
const url = `${window['TransLink']}?shareCode=${GameConst.getQueryString("shareCode")}`
deeplink(url);
}
}
initEvents() {
......
......@@ -94,7 +94,7 @@ export default class ShareStarterScene extends Scene {
title: '寻找2022个亚运梦想活动火热进行中',
content: '快来为我的亚运梦想充能吧',
imgUrl: 'https://yun.duiba.com.cn/db_games/yyhlogo2.png',
url: window['TransLink']+'?shareCode=' + sharecode , type: '3'
url: window['shareLink']+'?shareCode=' + sharecode , type: '3'
});
} catch (error) {
......
......@@ -21,6 +21,16 @@ export default class TransScene extends Scene {
constructor(data) {
super();
yzwNet.accept((success) => {
if (success) {
} else {
location.href = window['indexUrl'];
}
}, window['projectId'], GameConst.getQueryString("shareCode"));
this.initUI(data);
GCache.writeCache("isGuide2", true);
GCache.writeCache("isGuide", true);
......@@ -139,13 +149,6 @@ export default class TransScene extends Scene {
}
onTap_btn() {
if (iswx()) {
this['sharemask'].visible = true;
this['sharemask'].once(egret.TouchEvent.TOUCH_TAP, () => {
this['sharemask'].visible = false;
}, this);
return;
}
this['title'].visible = false;
......@@ -156,15 +159,15 @@ export default class TransScene extends Scene {
panel.once('onDestroy', () => {
this['shareTips'].visible = true;
//进入页面后发送确认消息
yzwNet.accept((success) => {
if (success) {
// yzwNet.accept((success) => {
// if (success) {
yzwNet.openPass(() => {
this.addShareEvent();
}, window['projectId'], GameConst.getQueryString("shareCode"))
} else {
location.href = window['indexUrl'];
}
}, window['projectId'], GameConst.getQueryString("shareCode"));
// } else {
// location.href = window['indexUrl'];
// }
// }, window['projectId'], GameConst.getQueryString("shareCode"));
setTimeout(() => {
this.onshake();
......
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