|
@@ -850,7 +850,7 @@
|
|
|
|
|
|
class HttpMgr {
|
|
|
constructor() {
|
|
|
- this.isDev = true;
|
|
|
+ this.isDev = false;
|
|
|
HttpMgr._instance = this;
|
|
|
}
|
|
|
static getInstance() {
|
|
@@ -924,6 +924,7 @@
|
|
|
httpObj.once(Laya.Event.COMPLETE, this, completeHandler);
|
|
|
httpObj.once(Laya.Event.ERROR, this, errorHandler);
|
|
|
httpObj.send(url, data, 'post', 'text', headers);
|
|
|
+ console.log('zh: http url = ' + url);
|
|
|
function errorHandler(error) {
|
|
|
if (call) {
|
|
|
call("{'msg':'Network exception','code':500}");
|
|
@@ -1353,7 +1354,7 @@
|
|
|
}
|
|
|
this.bridge.call("loginOutForApp");
|
|
|
}
|
|
|
- testPay1(token, ggSpid) {
|
|
|
+ startGgPay(token, ggSpid) {
|
|
|
if (!Laya.Browser.onAndroid) {
|
|
|
return;
|
|
|
}
|
|
@@ -1366,8 +1367,24 @@
|
|
|
spsl: 1
|
|
|
};
|
|
|
let reqData = JSON.stringify(jsonObj);
|
|
|
- console.log("zh:testPay1 ts reqData=" + reqData);
|
|
|
- this.bridge.call("testPay1", reqData);
|
|
|
+ console.log("zh:startGgPay ts reqData=" + reqData);
|
|
|
+ this.bridge.call("startGgPay", reqData);
|
|
|
+ }
|
|
|
+ testPay1ForMoNiPayOver(token, ggSpid) {
|
|
|
+ if (!Laya.Browser.onAndroid) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.initBridge()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let jsonObj = {
|
|
|
+ token: token,
|
|
|
+ ggSpid: ggSpid,
|
|
|
+ spsl: 1
|
|
|
+ };
|
|
|
+ let reqData = JSON.stringify(jsonObj);
|
|
|
+ console.log("zh:testPay1ForMoNiPayOver ts reqData=" + reqData);
|
|
|
+ this.bridge.call("testPay1ForMoNiPayOver", reqData);
|
|
|
}
|
|
|
nativeCallJs(msg) {
|
|
|
console.log("zh:nativeCallJs received data: 1111", msg);
|
|
@@ -4477,6 +4494,7 @@
|
|
|
this.n_Logout = (this.getChild("n_Logout"));
|
|
|
this.n_zhuCe = (this.getChild("n_zhuCe"));
|
|
|
this.n_dengLu = (this.getChild("n_dengLu"));
|
|
|
+ this.n_moni_pay_ok = (this.getChild("n_moni_pay_ok"));
|
|
|
}
|
|
|
}
|
|
|
ui_UIMain.URL = "ui://isxx5ak7kt443qc";
|
|
@@ -5954,25 +5972,36 @@
|
|
|
constructor(ui, index) {
|
|
|
this.index = 0;
|
|
|
this.uiIndex = 0;
|
|
|
+ this.ggSpid = "";
|
|
|
this.ui = ui;
|
|
|
this.index = index;
|
|
|
this.initData();
|
|
|
}
|
|
|
initData() {
|
|
|
- this.ui.btn_buy.onClick(this, this.buySp);
|
|
|
- this.ui.btn_buy.onClick(this, this.buyDj);
|
|
|
+ this.ui.btn_buy.onClick(this, this.gotoBuy);
|
|
|
let data = cfgTable.daoJuData[this.index + 1];
|
|
|
console.log('zh:' + JSON.stringify(data));
|
|
|
this.ui.nameTxt.text = data.spbt;
|
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
|
this.ui.n_zuanShi.text = "X" + data.zssl + "";
|
|
|
+ this.ggSpid = data.ggSpid;
|
|
|
let baseUrl = "asset/sound/ogg/";
|
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
|
}
|
|
|
- buyDj() {
|
|
|
- xGame.soundMgr.playSound(xGame.common.btnClickStr);
|
|
|
+ gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = this.ggSpid;
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
}
|
|
|
- buySp() {
|
|
|
+ gotoBuy1() {
|
|
|
+ xGame.soundMgr.playSound(xGame.common.btnClickStr);
|
|
|
let djItem = cfgTable.daoJuData[this.index + 1];
|
|
|
console.log('zh:点击购买 djItem =' + JSON.stringify(djItem));
|
|
|
let userInfo = LocalStorageManager.getItem('userInfo');
|
|
@@ -5991,7 +6020,7 @@
|
|
|
let msg = res.msg;
|
|
|
if (code == 401) {
|
|
|
Laya.LocalStorage.setItem(keyForLoginInfo, null);
|
|
|
- alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
return;
|
|
|
}
|
|
|
if (code == 200) {
|
|
@@ -6052,7 +6081,7 @@
|
|
|
let msg = res.msg;
|
|
|
if (code == 401) {
|
|
|
Laya.LocalStorage.setItem(keyForLoginInfo, null);
|
|
|
- alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
return;
|
|
|
}
|
|
|
if (code == 200) {
|
|
@@ -7048,6 +7077,18 @@
|
|
|
this.hide();
|
|
|
}
|
|
|
gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = 'com.vadltq.strike.ball.cue.noads.pack';
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gotoBuy2() {
|
|
|
let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
|
|
|
if (userInfo == null) {
|
|
|
xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
@@ -7119,6 +7160,18 @@
|
|
|
this.hide();
|
|
|
}
|
|
|
gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = 'com.vadltq.strike.ball.cue.passcard';
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gotoBuy1() {
|
|
|
let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
|
|
|
if (userInfo == null) {
|
|
|
xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
@@ -7502,11 +7555,13 @@
|
|
|
gotoRegUser() {
|
|
|
xGame.uiMgr.Show(UIReg);
|
|
|
}
|
|
|
- showFuLi() {
|
|
|
- console.log('zh:福利2');
|
|
|
+ showFuLi1() {
|
|
|
+ console.log('zh:福利1');
|
|
|
xGame.uiMgr.Show(UIFuli1);
|
|
|
+ }
|
|
|
+ showFuLi2() {
|
|
|
+ console.log('zh:福利2');
|
|
|
xGame.uiMgr.Show(UIFuli2);
|
|
|
- console.log('zh:福利2222');
|
|
|
}
|
|
|
c_btn_for_user() {
|
|
|
this.ui.n_Logout.visible = false;
|
|
@@ -7559,7 +7614,8 @@
|
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
|
- this.addUIClick(this.ui.n_fuli, this.showFuLi);
|
|
|
+ this.addUIClick(this.ui.n_fuli, this.showFuLi2);
|
|
|
+ this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
|
|
|
}
|
|
|
show(showFailWords) {
|
|
|
super.show();
|
|
@@ -7599,7 +7655,10 @@
|
|
|
console.log("zh: no firstEnter");
|
|
|
}
|
|
|
Laya.timer.once(randTime, this, () => {
|
|
|
- xGame.common.autoPopUIView();
|
|
|
+ });
|
|
|
+ Laya.timer.once(1000, this, () => {
|
|
|
+ console.log('zh: 1秒后 showFuLi1');
|
|
|
+ this.showFuLi1();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -7737,15 +7796,21 @@
|
|
|
xGame.uiMgr.Hide(UIGameEnd);
|
|
|
});
|
|
|
}
|
|
|
- startGlobal() {
|
|
|
- xGame.uiMgr.Show(UIMsg, "Coming Soon.");
|
|
|
+ start_debug_for_moni_payOk() {
|
|
|
+ console.log('zh:start_debug_for_moni_payOk 111');
|
|
|
let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
if (userInfo != null) {
|
|
|
let token = userInfo.token;
|
|
|
let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
|
|
|
- JSBridgeUtils.instance.testPay1(token, ggSpid);
|
|
|
+ JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid);
|
|
|
return;
|
|
|
}
|
|
|
+ else {
|
|
|
+ alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ startGlobal() {
|
|
|
+ xGame.uiMgr.Show(UIMsg, "Coming Soon.");
|
|
|
}
|
|
|
startWeekly() {
|
|
|
xGame.uiMgr.Show(UIMsg, "Coming Soon");
|
|
@@ -13202,6 +13267,16 @@
|
|
|
}
|
|
|
ui_Component143.URL = "ui://isxx5ak7dt0av4yn";
|
|
|
|
|
|
+ class ui_Component1_debug_pay_ok extends fgui.GComponent {
|
|
|
+ static createInstance() {
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component1_debug_pay_ok"));
|
|
|
+ }
|
|
|
+ onConstruct() {
|
|
|
+ this.n_moni_pay_ok = (this.getChild("n_moni_pay_ok"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ui_Component1_debug_pay_ok.URL = "ui://isxx5ak7e1lxv59z";
|
|
|
+
|
|
|
class ui_dh_jingbi2 extends fgui.GComponent {
|
|
|
static createInstance() {
|
|
|
return (fgui.UIPackage.createObject("game", "dh_jingbi2"));
|
|
@@ -16473,6 +16548,7 @@
|
|
|
fgui.UIObjectFactory.setExtension(ui_huihe2.URL, ui_huihe2);
|
|
|
fgui.UIObjectFactory.setExtension(ui_UIGuanYu.URL, ui_UIGuanYu);
|
|
|
fgui.UIObjectFactory.setExtension(ui_Component143.URL, ui_Component143);
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component1_debug_pay_ok.URL, ui_Component1_debug_pay_ok);
|
|
|
fgui.UIObjectFactory.setExtension(ui_dh_jingbi2.URL, ui_dh_jingbi2);
|
|
|
fgui.UIObjectFactory.setExtension(ui_dh_jingbi2_1.URL, ui_dh_jingbi2_1);
|
|
|
fgui.UIObjectFactory.setExtension(ui_dh_jingbi3.URL, ui_dh_jingbi3);
|
|
@@ -18817,7 +18893,7 @@
|
|
|
let data = res.data;
|
|
|
if (code == 401) {
|
|
|
Laya.LocalStorage.setItem(keyForLoginInfo, null);
|
|
|
- alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ console.log('zh:保存资产信息失败,请重新登录 ');
|
|
|
return;
|
|
|
}
|
|
|
if (code == 200) {
|
|
@@ -22962,25 +23038,36 @@
|
|
|
constructor(ui, index) {
|
|
|
this.index = 0;
|
|
|
this.uiIndex = 0;
|
|
|
+ this.ggSpid = "";
|
|
|
this.ui = ui;
|
|
|
this.index = index;
|
|
|
this.initData();
|
|
|
}
|
|
|
initData() {
|
|
|
- this.ui.btn_buy.onClick(this, this.buySp);
|
|
|
- this.ui.btn_buy.onClick(this, this.buyDj);
|
|
|
+ this.ui.btn_buy.onClick(this, this.gotoBuy);
|
|
|
let data = cfgTable.daoJuData[this.index + 1];
|
|
|
console.log('zh:' + JSON.stringify(data));
|
|
|
this.ui.nameTxt.text = data.spbt;
|
|
|
this.ui.n_jiaGe.text = data.spjg + "";
|
|
|
this.ui.n_zuanShi.text = "X" + data.zssl + "";
|
|
|
+ this.ggSpid = data.ggSpid;
|
|
|
let baseUrl = "asset/sound/ogg/";
|
|
|
this.ui.zsImg.url = xGame.common.getGameIconUrl(data.img);
|
|
|
}
|
|
|
- buyDj() {
|
|
|
- xGame.soundMgr.playSound(xGame.common.btnClickStr);
|
|
|
+ gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = this.ggSpid;
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
}
|
|
|
- buySp() {
|
|
|
+ gotoBuy1() {
|
|
|
+ xGame.soundMgr.playSound(xGame.common.btnClickStr);
|
|
|
let djItem = cfgTable.daoJuData[this.index + 1];
|
|
|
console.log('zh:点击购买 djItem =' + JSON.stringify(djItem));
|
|
|
let userInfo = LocalStorageManager.getItem('userInfo');
|
|
@@ -22999,7 +23086,7 @@
|
|
|
let msg = res.msg;
|
|
|
if (code == 401) {
|
|
|
Laya.LocalStorage.setItem(keyForLoginInfo, null);
|
|
|
- alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
|
return;
|
|
|
}
|
|
|
if (code == 200) {
|
|
@@ -23060,7 +23147,7 @@
|
|
|
let msg = res.msg;
|
|
|
if (code == 401) {
|
|
|
Laya.LocalStorage.setItem(keyForLoginInfo, null);
|
|
|
- alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
|
|
|
return;
|
|
|
}
|
|
|
if (code == 200) {
|
|
@@ -23675,6 +23762,18 @@
|
|
|
this.hide();
|
|
|
}
|
|
|
gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = 'com.vadltq.strike.ball.cue.noads.pack';
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gotoBuy2() {
|
|
|
let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
|
|
|
if (userInfo == null) {
|
|
|
xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
@@ -23735,6 +23834,18 @@
|
|
|
this.hide();
|
|
|
}
|
|
|
gotoBuy() {
|
|
|
+ let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
+ if (userInfo != null) {
|
|
|
+ let token = userInfo.token;
|
|
|
+ let ggSpid = 'com.vadltq.strike.ball.cue.passcard';
|
|
|
+ JSBridgeUtils.instance.startGgPay(token, ggSpid);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gotoBuy1() {
|
|
|
let userInfo = LocalStorageManager.getItem(keyForLoginInfo);
|
|
|
if (userInfo == null) {
|
|
|
xGame.uiMgr.Show(UIMsg$1, TIP_MSG_key.pleaseLoginIn);
|
|
@@ -24204,11 +24315,13 @@
|
|
|
gotoRegUser() {
|
|
|
xGame.uiMgr.Show(UIReg$1);
|
|
|
}
|
|
|
- showFuLi() {
|
|
|
- console.log('zh:福利2');
|
|
|
+ showFuLi1() {
|
|
|
+ console.log('zh:福利1');
|
|
|
xGame.uiMgr.Show(UIFuli1$1);
|
|
|
+ }
|
|
|
+ showFuLi2() {
|
|
|
+ console.log('zh:福利2');
|
|
|
xGame.uiMgr.Show(UIFuli2$1);
|
|
|
- console.log('zh:福利2222');
|
|
|
}
|
|
|
c_btn_for_user() {
|
|
|
this.ui.n_Logout.visible = false;
|
|
@@ -24261,7 +24374,8 @@
|
|
|
this.addUIClick(this.ui.n_Logout, this.Logout);
|
|
|
this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
|
|
|
this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
|
|
|
- this.addUIClick(this.ui.n_fuli, this.showFuLi);
|
|
|
+ this.addUIClick(this.ui.n_fuli, this.showFuLi2);
|
|
|
+ this.addUIClick(this.ui.n_moni_pay_ok, this.start_debug_for_moni_payOk);
|
|
|
}
|
|
|
show(showFailWords) {
|
|
|
super.show();
|
|
@@ -24301,7 +24415,10 @@
|
|
|
console.log("zh: no firstEnter");
|
|
|
}
|
|
|
Laya.timer.once(randTime, this, () => {
|
|
|
- xGame.common.autoPopUIView();
|
|
|
+ });
|
|
|
+ Laya.timer.once(1000, this, () => {
|
|
|
+ console.log('zh: 1秒后 showFuLi1');
|
|
|
+ this.showFuLi1();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -24439,15 +24556,21 @@
|
|
|
xGame.uiMgr.Hide(UIGameEnd$1);
|
|
|
});
|
|
|
}
|
|
|
- startGlobal() {
|
|
|
- xGame.uiMgr.Show(UIMsg$1, "Coming Soon.");
|
|
|
+ start_debug_for_moni_payOk() {
|
|
|
+ console.log('zh:start_debug_for_moni_payOk 111');
|
|
|
let userInfo = LocalStorageManager.getItem('userInfo');
|
|
|
if (userInfo != null) {
|
|
|
let token = userInfo.token;
|
|
|
let ggSpid = 'com.vadltq.strike.ball.cue.gem50';
|
|
|
- JSBridgeUtils.instance.testPay1(token, ggSpid);
|
|
|
+ JSBridgeUtils.instance.testPay1ForMoNiPayOver(token, ggSpid);
|
|
|
return;
|
|
|
}
|
|
|
+ else {
|
|
|
+ alert(TIP_MSG_key.pleaseLoginIn);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ startGlobal() {
|
|
|
+ xGame.uiMgr.Show(UIMsg$1, "Coming Soon.");
|
|
|
}
|
|
|
startWeekly() {
|
|
|
xGame.uiMgr.Show(UIMsg$1, "Coming Soon");
|