|
@@ -850,6 +850,7 @@
|
|
|
|
|
|
class HttpMgr {
|
|
class HttpMgr {
|
|
constructor() {
|
|
constructor() {
|
|
|
|
+ this.isDev = true;
|
|
HttpMgr._instance = this;
|
|
HttpMgr._instance = this;
|
|
}
|
|
}
|
|
static getInstance() {
|
|
static getInstance() {
|
|
@@ -879,12 +880,13 @@
|
|
getReqData() {
|
|
getReqData() {
|
|
let reqData = JSON.stringify({
|
|
let reqData = JSON.stringify({
|
|
gameName: "TQ",
|
|
gameName: "TQ",
|
|
- gameUserName: "zhangSan"
|
|
|
|
|
|
+ gameUserName: "zhangSan",
|
|
|
|
+ isDev: this.isDev
|
|
});
|
|
});
|
|
return reqData;
|
|
return reqData;
|
|
}
|
|
}
|
|
sendPost2025(reqUrl, data, call) {
|
|
sendPost2025(reqUrl, data, call) {
|
|
- let isDev = false;
|
|
|
|
|
|
+ let isDev = this.isDev;
|
|
let urlTop = "https://api.kessongame.site/";
|
|
let urlTop = "https://api.kessongame.site/";
|
|
let urlMid = urlTop + "prod-api/api/";
|
|
let urlMid = urlTop + "prod-api/api/";
|
|
if (isDev) {
|
|
if (isDev) {
|
|
@@ -1342,6 +1344,15 @@
|
|
}
|
|
}
|
|
this.bridge.call("showToast2", msg);
|
|
this.bridge.call("showToast2", msg);
|
|
}
|
|
}
|
|
|
|
+ loginOutForApp() {
|
|
|
|
+ if (!Laya.Browser.onAndroid) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!this.initBridge()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.bridge.call("loginOutForApp");
|
|
|
|
+ }
|
|
testPay1(token, ggSpid) {
|
|
testPay1(token, ggSpid) {
|
|
if (!Laya.Browser.onAndroid) {
|
|
if (!Laya.Browser.onAndroid) {
|
|
return;
|
|
return;
|
|
@@ -7483,6 +7494,7 @@
|
|
LocalStorageManager.removeItem(keyForLoginInfo);
|
|
LocalStorageManager.removeItem(keyForLoginInfo);
|
|
this.freshUser();
|
|
this.freshUser();
|
|
}
|
|
}
|
|
|
|
+ JSBridgeUtils.instance.loginOutForApp();
|
|
}
|
|
}
|
|
gotoLogin() {
|
|
gotoLogin() {
|
|
xGame.uiMgr.Show(UILogin);
|
|
xGame.uiMgr.Show(UILogin);
|
|
@@ -24184,6 +24196,7 @@
|
|
LocalStorageManager.removeItem(keyForLoginInfo);
|
|
LocalStorageManager.removeItem(keyForLoginInfo);
|
|
this.freshUser();
|
|
this.freshUser();
|
|
}
|
|
}
|
|
|
|
+ JSBridgeUtils.instance.loginOutForApp();
|
|
}
|
|
}
|
|
gotoLogin() {
|
|
gotoLogin() {
|
|
xGame.uiMgr.Show(UILogin$1);
|
|
xGame.uiMgr.Show(UILogin$1);
|