|
@@ -23,6 +23,10 @@ import UIMsg from "./UIMsg";
|
|
|
import UIModeSelection from "./UIModeSelection";
|
|
|
import GlobalManager from "../utils/GlobalManager";
|
|
|
import JSBridgeUtils from "../utils/JSBridgeUtils"; // 根据你的目录结构调整路径
|
|
|
+import SkillDisplay from "./item/SkillDisplay";
|
|
|
+import UITry from "./UITry";
|
|
|
+import UIPower from "./UIPower";
|
|
|
+import UIGetAward from "./UIGetAward";
|
|
|
|
|
|
|
|
|
export default class UIMain extends UIBase {
|
|
@@ -33,20 +37,79 @@ export default class UIMain extends UIBase {
|
|
|
public firstEnter = true;
|
|
|
|
|
|
nativeCallJs(msg: string) {
|
|
|
- let t =msg;
|
|
|
- console.log("zh:ts 奖励开始发放-", t);
|
|
|
- GlobalManager.instance.callMethod(msg)
|
|
|
- // if (msg === 'Ad1') {
|
|
|
- // GlobalManager.instance.callMethod(msg)
|
|
|
- // console.log("lichao: Ad1 奖励发送成功");
|
|
|
- // } else if (msg === 'Ad2') {
|
|
|
- // console.log("lichao: Ad2 奖励发送成功");
|
|
|
- // } else if (msg === 'Ad3') {
|
|
|
- // console.log("lichao: Ad3 奖励发送成功");
|
|
|
- // } else if (msg === 'Ad4') {
|
|
|
- // console.log("lichao: Ad4 奖励发送成功");
|
|
|
- // } else if (msg === 'Ad5') {
|
|
|
- // }
|
|
|
+ let t = msg;
|
|
|
+ console.log("zh: nativeCallJs 奖励开始发放:", t);
|
|
|
+ //GlobalManager.instance.callMethod(msg)
|
|
|
+
|
|
|
+ switch (t) {
|
|
|
+ case 'qjff_chouJiang':
|
|
|
+ let dui = <UIDraw>xGame.uiMgr.getUI(UIDraw);
|
|
|
+ dui.qjff_chouJiang();
|
|
|
+ break;
|
|
|
+ case 'qjff_AD_for_uisign':
|
|
|
+ let dui2 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui2.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+ case 'qjff_AD_for_uitry':
|
|
|
+ let dui3 = <UITry>xGame.uiMgr.getUI(UITry);
|
|
|
+ dui3.qjff_AD_for_uitry();
|
|
|
+ break;
|
|
|
+ case 'qjff_AD_for_uipower':
|
|
|
+ let dui4 = <UIPower>xGame.uiMgr.getUI(UIPower);
|
|
|
+ dui4.qjff_AD_for_uipower();
|
|
|
+ break;
|
|
|
+ case 'qjff_AD_for_uigetAward':
|
|
|
+ let dui5 = <UIGetAward>xGame.uiMgr.getUI(UIGetAward);
|
|
|
+ dui5.qjff_AD_for_uigetAward();
|
|
|
+ break;
|
|
|
+ case 'qjff_AD_for_uiGameEnd':
|
|
|
+ let temp_level = Laya.LocalStorage.getItem('temp_qjff_AD_for_uiGameEnd_level');
|
|
|
+ let dui6 = <UIGameEnd>xGame.uiMgr.getUI(UIGameEnd);
|
|
|
+ dui6.qjff_AD_for_uiGameEnd(parseInt(temp_level))
|
|
|
+ break;
|
|
|
+ case '5':
|
|
|
+ let dui7 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui7.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+
|
|
|
+ case '6':
|
|
|
+ let dui8 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui8.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+ case '7':
|
|
|
+ let dui9 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui9.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+
|
|
|
+ case '5':
|
|
|
+ let dui10 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui10.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+
|
|
|
+ case '5':
|
|
|
+ let dui11 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui11.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+
|
|
|
+ case '5':
|
|
|
+ let dui12 = <UISign>xGame.uiMgr.getUI(UISign);
|
|
|
+ dui12.qjff_AD_for_uisign();
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ console.log('zh:未知的方法名字' + t)
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // if(t === 'qjff_shengJi_for_SkillDisplay'){
|
|
|
+ // const dui = new
|
|
|
+ // dui.qjff_shengJi();
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -54,6 +117,7 @@ export default class UIMain extends UIBase {
|
|
|
super();
|
|
|
}
|
|
|
protected onConstructor(): void {
|
|
|
+ console.log('zh: UIMain onConstructor');
|
|
|
this.ui = ui_UIMain.createInstance();
|
|
|
this.contentPane = this.ui;
|
|
|
this.isEject = false;
|
|
@@ -83,7 +147,7 @@ export default class UIMain extends UIBase {
|
|
|
//万宁台球
|
|
|
Moyu.setShareInfo("8Ball Fury", ["台球", "万宁", "桌球"], '2300002254');
|
|
|
|
|
|
- window['nativeCallJs'] = this.nativeCallJs.bind(this);
|
|
|
+ window['nativeCallJs'] = this.nativeCallJs.bind(this);
|
|
|
}
|
|
|
changeSecretary(curUse) {
|
|
|
let name = cfgTable.secretaryshopData[curUse + 1].spine;
|
|
@@ -268,25 +332,25 @@ export default class UIMain extends UIBase {
|
|
|
startGlobal() {
|
|
|
xGame.uiMgr.Show(UIMsg, "Coming Soon")
|
|
|
//xGame.uiMgr.Show(UITry);
|
|
|
- JSBridgeUtils.instance.showInternAd('全球');
|
|
|
+ JSBridgeUtils.instance.showInternAd('全球');
|
|
|
}
|
|
|
startWeekly() {
|
|
|
//xGame.uiMgr.Show(UIBox);
|
|
|
xGame.uiMgr.Show(UIMsg, "Coming Soon")
|
|
|
|
|
|
- //测试AD
|
|
|
- GlobalManager.instance.registerMethod('zhouSaiMonth',this.zhouSaiMonth);
|
|
|
- JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
|
|
|
+ //测试AD
|
|
|
+ GlobalManager.instance.registerMethod('zhouSaiMonth', this.zhouSaiMonth);
|
|
|
+ JSBridgeUtils.instance.showRewardAd('zhouSaiMonth');
|
|
|
}
|
|
|
|
|
|
- zhouSaiMonth(){
|
|
|
+ zhouSaiMonth() {
|
|
|
console.log('zh: zhouSaiMonth 被调用')
|
|
|
}
|
|
|
startPlaceBall() {
|
|
|
xGame.uiMgr.Show(UILevelDisplay);
|
|
|
//xGame.uiMgr.Show(UIMsg, "敬请期待~")
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
public hide(): void {
|
|
|
super.hide();
|