dzduole 1 dia atrás
pai
commit
e69fef113b

+ 15 - 2
client/laya/bin/js/bundle.js

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

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 1 - 1
client/laya/src/core/mgrs/HttpMgr.ts

@@ -53,7 +53,7 @@ export class HttpMgr {
 
 
 
-    private isDev: boolean = false;//是否是开发环境
+    private isDev: boolean = true;//是否是开发环境
     public getReqData() {
         let reqData = JSON.stringify({
             gameName: "TQ",

+ 3 - 0
client/laya/src/ui/UIMain.ts

@@ -197,6 +197,9 @@ export default class UIMain extends UIBase {
             LocalStorageManager.removeItem(keyForLoginInfo);
             this.freshUser();
         }
+        //必须要调用APP退出登录
+        JSBridgeUtils.instance.loginOutForApp();
+        
     }
     gotoLogin() {
         xGame.uiMgr.Show(UILogin);

+ 13 - 0
client/laya/src/utils/JSBridgeUtils.ts

@@ -251,6 +251,19 @@ export default class JSBridgeUtils {
     //------------------网络判断 end 
 
 
+    /**
+     * 退出APP  里的缓存
+     * @returns 
+     */
+    public loginOutForApp():void{
+        if (!Laya.Browser.onAndroid) {
+            return;
+        }
+        if (!this.initBridge()) {
+            return;
+        }
+        this.bridge.call("loginOutForApp");
+    }
     public testPay1(token: string, ggSpid: string): void {
         if (!Laya.Browser.onAndroid) {
             return;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff