dzduole 1 week ago
parent
commit
3d8f0bc806
64 changed files with 461 additions and 212 deletions
  1. 8 10
      art/fgui/.objs/workspace.json
  2. 2 2
      art/fgui/assets/game/UIMsg/Component59.xml
  3. 1 1
      art/fgui/assets/game/UISecretary/UIShop/component/daoJuDisplay.xml
  4. 1 1
      art/fgui/assets/game/UISign/component/SignNormal.xml
  5. BIN
      art/fgui/assets/game/font/arial.ttf
  6. BIN
      art/fgui/assets/game/font/arialbd.ttf
  7. BIN
      art/fgui/assets/game/font/arialbi.ttf
  8. BIN
      art/fgui/assets/game/font/ariali.ttf
  9. BIN
      art/fgui/assets/game/font/ariblk.ttf
  10. BIN
      client/laya/bin/asset/fgui/game.obj
  11. BIN
      client/laya/bin/font/arial.ttf
  12. BIN
      client/laya/bin/font/arialbd.ttf
  13. BIN
      client/laya/bin/font/arialbi.ttf
  14. BIN
      client/laya/bin/font/ariali.ttf
  15. BIN
      client/laya/bin/font/ariblk.ttf
  16. 159 93
      client/laya/bin/js/bundle.js
  17. 0 0
      client/laya/bin/js/bundle.js.map
  18. BIN
      client/laya/laya/assets/font/arial.ttf
  19. BIN
      client/laya/laya/assets/font/arialbd.ttf
  20. BIN
      client/laya/laya/assets/font/arialbi.ttf
  21. BIN
      client/laya/laya/assets/font/ariali.ttf
  22. BIN
      client/laya/laya/assets/font/ariblk.ttf
  23. 25 9
      client/laya/src/GameInit.ts
  24. 26 7
      client/laya/src/Main.ts
  25. 4 1
      client/laya/src/core/mgrs/HttpMgr.ts
  26. 26 16
      client/laya/src/data/DataMgr.ts
  27. 73 1
      client/laya/src/fgui/core/UIBase.ts
  28. 1 1
      client/laya/src/fgui/core/UIMgr.ts
  29. 1 0
      client/laya/src/ui/UIAddCoin.ts
  30. 3 1
      client/laya/src/ui/UIAddProp.ts
  31. 1 0
      client/laya/src/ui/UIBox.ts
  32. 4 2
      client/laya/src/ui/UIDraw.ts
  33. 2 0
      client/laya/src/ui/UIFireworks.ts
  34. 2 0
      client/laya/src/ui/UIFlyEft.ts
  35. 4 2
      client/laya/src/ui/UIFuli1.ts
  36. 4 2
      client/laya/src/ui/UIFuli2.ts
  37. 30 13
      client/laya/src/ui/UIGame.ts
  38. 3 1
      client/laya/src/ui/UIGameEnd.ts
  39. 2 0
      client/laya/src/ui/UIGetAward.ts
  40. 1 0
      client/laya/src/ui/UIGuanYu.ts
  41. 1 0
      client/laya/src/ui/UIInvitation.ts
  42. 5 4
      client/laya/src/ui/UILevelDisplay.ts
  43. 20 19
      client/laya/src/ui/UILevelProp.ts
  44. 4 2
      client/laya/src/ui/UILoading.ts
  45. 2 1
      client/laya/src/ui/UILogin.ts
  46. 7 5
      client/laya/src/ui/UIMain.ts
  47. 2 0
      client/laya/src/ui/UIMatching.ts
  48. 2 0
      client/laya/src/ui/UIModeSelection.ts
  49. 2 0
      client/laya/src/ui/UIMsg.ts
  50. 2 0
      client/laya/src/ui/UIPower.ts
  51. 2 0
      client/laya/src/ui/UIRanking.ts
  52. 1 0
      client/laya/src/ui/UIReg.ts
  53. 2 0
      client/laya/src/ui/UIRepentProp.ts
  54. 2 0
      client/laya/src/ui/UIRodMethod.ts
  55. 2 0
      client/laya/src/ui/UISecretary.ts
  56. 3 2
      client/laya/src/ui/UIShop.ts
  57. 2 1
      client/laya/src/ui/UISign.ts
  58. 1 0
      client/laya/src/ui/UISkill.ts
  59. 1 1
      client/laya/src/ui/UITips.ts
  60. 3 2
      client/laya/src/ui/UITry.ts
  61. 1 0
      client/laya/src/ui/UIVideoShare.ts
  62. 1 0
      client/laya/src/ui/UIWordsList.ts
  63. 6 6
      client/laya/src/ui/item/BallRodDisplay.ts
  64. 4 6
      client/laya/src/ui/item/DaoJuDisplay.ts

+ 8 - 10
art/fgui/.objs/workspace.json

@@ -7,24 +7,22 @@
     "/"
   ],
   "libview.iconScale": 0,
-  "doc.openedDocs": [
-    "ui://isxx5ak7im8nv59o",
-    "ui://isxx5ak7im8nv59n",
-    "ui://isxx5ak7im8nv59g",
-    "ui://isxx5ak7im8nv59h",
-    "ui://isxx5ak7xs1r47l",
-    "ui://isxx5ak7xs1r482"
-  ],
+  "doc.openedDocs": [],
   "test.device": "Huawei Mate20 Pro",
   "canvasColor": 10066329,
   "auxline2": true,
-  "doc.activeDoc": "ui://isxx5ak7xs1r482",
   "libview.twoColumn": false,
   "libview.expandedNodes": [
     "isxx5ak7",
     "/",
     "isxx5ak7",
-    "/font/"
+    "/UISecretary/",
+    "isxx5ak7",
+    "/UISecretary/UIFuli/",
+    "isxx5ak7",
+    "/UISecretary/UIShop/",
+    "isxx5ak7",
+    "/UIUser/"
   ],
   "auxline1": true,
   "snapToGrid": true,

+ 2 - 2
art/fgui/assets/game/UIMsg/Component59.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="524,44">
   <displayList>
-    <image id="n3_hkrz" name="n3" src="hkrz3rb" fileName="UIGame/asset/yy_db1.png" xy="-63,-3" pivot="0.5,0.5" size="650,55" alpha="0.6">
+    <image id="n3_hkrz" name="n3" src="hkrz3rb" fileName="UIGame/asset/yy_db1.png" xy="-63,-4" pivot="0.5,0.5" size="650,55" alpha="0.6">
       <relation target="n1_hkrz" sidePair="width-width,center-center,middle-middle"/>
     </image>
-    <text id="n1_hkrz" name="msgTxt" xy="262,23" pivot="0.5,0.5" anchor="true" size="562,34" font="Arial" fontSize="24" color="#ffffff" align="center" vAlign="middle" leading="0" bold="true" strokeColor="#000000" singleLine="true" text="对手开球成对手对手开=开=开=开=开=开=开=开=开="/>
+    <text id="n1_hkrz" name="msgTxt" xy="262,22" pivot="0.5,0.5" anchor="true" size="562,34" font="Arial" fontSize="24" color="#ffffff" align="center" vAlign="middle" leading="0" bold="true" strokeColor="#000000" singleLine="true" text="对手开球成对手对手开=开=开=开=开=开=开=开=开="/>
   </displayList>
   <transition name="t0" autoPlay="true">
     <item time="0" type="Alpha" target="n1_hkrz" tween="true" startValue="0" endValue="1" duration="12"/>

+ 1 - 1
art/fgui/assets/game/UISecretary/UIShop/component/daoJuDisplay.xml

@@ -2,7 +2,7 @@
 <component size="543,200" bgColorEnabled="true">
   <displayList>
     <image id="n6_so7l" name="n6" src="so7lv594" fileName="UISecretary/UIShop/asset/daoju/gf_k1.png" xy="1,0" size="543,200"/>
-    <text id="n7_so7l" name="n_jiaGe" xy="377,45" size="63,42" fontSize="30" color="#ffff00" align="center" vAlign="middle" bold="true" strokeColor="#000000" text="0.99"/>
+    <text id="n7_so7l" name="n_jiaGe" xy="377,45" size="80,42" fontSize="30" color="#ffff00" align="center" vAlign="middle" bold="true" strokeColor="#000000" text="$0.99"/>
     <text id="n8_so7l" name="n_zuanShi" xy="175,88" size="58,42" fontSize="30" color="#ffffff" align="center" bold="true" strokeColor="#000000" text="X50"/>
     <component id="n10_so7l" name="btn_buy" src="so7lv596" fileName="UISecretary/UIShop/component/btn_buy.xml" xy="290,103"/>
     <text id="n11_so7l" name="nameTxt" xy="12,2" size="321,33" fontSize="23" color="#ffffff" vAlign="middle" autoSize="none" bold="true" text="DAOJU NAME"/>

+ 1 - 1
art/fgui/assets/game/UISign/component/SignNormal.xml

@@ -9,7 +9,7 @@
     <text id="n9_bf9j" name="titleTxt" xy="48,0" pivot="0.5,0.5" size="51,29" font="Arial" fontSize="20" color="#ffffff" align="center" vAlign="middle" vars="true" bold="true" strokeColor="#000000" text="Day1"/>
     <image id="n8_bf9j" name="n8" src="bf9jv4jr" fileName="UISign/asset/qd_3.png" xy="0,30" size="148,161"/>
     <loader id="n10_bf9j" name="myIcon" xy="-6,12" pivot="0.5,0.5" size="160,160" scale="0.7,0.7" url="ui://isxx5ak7ehtov4gt" align="center" vAlign="middle" fill="scale" shrinkOnly="true"/>
-    <text id="n11_bf9j" name="numTxt" xy="59,152" size="30,32" fontSize="22" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" text="88">
+    <text id="n11_bf9j" name="numTxt" xy="59,152" size="28,32" fontSize="22" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" text="88">
       <relation target="" sidePair="center-center"/>
     </text>
     <image id="n12_bf9j" name="n12" src="bf9jv4jq" fileName="UISign/asset/qd_2.png" xy="0,30" size="148,161">

BIN
art/fgui/assets/game/font/arial.ttf


BIN
art/fgui/assets/game/font/arialbd.ttf


BIN
art/fgui/assets/game/font/arialbi.ttf


BIN
art/fgui/assets/game/font/ariali.ttf


BIN
art/fgui/assets/game/font/ariblk.ttf


BIN
client/laya/bin/asset/fgui/game.obj


BIN
client/laya/bin/font/arial.ttf


BIN
client/laya/bin/font/arialbd.ttf


BIN
client/laya/bin/font/arialbi.ttf


BIN
client/laya/bin/font/ariali.ttf


BIN
client/laya/bin/font/ariblk.ttf


File diff suppressed because it is too large
+ 159 - 93
client/laya/bin/js/bundle.js


File diff suppressed because it is too large
+ 0 - 0
client/laya/bin/js/bundle.js.map


BIN
client/laya/laya/assets/font/arial.ttf


BIN
client/laya/laya/assets/font/arialbd.ttf


BIN
client/laya/laya/assets/font/arialbi.ttf


BIN
client/laya/laya/assets/font/ariali.ttf


BIN
client/laya/laya/assets/font/ariblk.ttf


+ 25 - 9
client/laya/src/GameInit.ts

@@ -34,7 +34,7 @@ export function getGameResList() {
         { url: "asset/fgui/game_atlas0_3.png", type: Laya.Loader.IMAGE },
         { url: "asset/fgui/game_atlas10.png", type: Laya.Loader.IMAGE },
         //
-       // { url: "asset/fgui/game_atlas_kupwv4tc.png", type: Laya.Loader.IMAGE },
+        // { url: "asset/fgui/game_atlas_kupwv4tc.png", type: Laya.Loader.IMAGE },
         //
         { url: "asset/fgui/game_atlas_n43d3v3.png", type: Laya.Loader.IMAGE },
         { url: "asset/fgui/game_atlas_n43d3v4.png", type: Laya.Loader.IMAGE },
@@ -43,8 +43,8 @@ export function getGameResList() {
         { url: "asset/fgui/game_atlas_p4tr42b.png", type: Laya.Loader.IMAGE },
         { url: "asset/fgui/game_atlas_p4tr42c.png", type: Laya.Loader.IMAGE },
         { url: "asset/fgui/game_atlas_p4tr42e.png", type: Laya.Loader.IMAGE },
-       // { url: "asset/fgui/game_atlas_p7rrv4r8.png", type: Laya.Loader.IMAGE },
-      //  { url: "asset/fgui/game_atlas_p7rrv4rq.png", type: Laya.Loader.IMAGE },
+        // { url: "asset/fgui/game_atlas_p7rrv4r8.png", type: Laya.Loader.IMAGE },
+        //  { url: "asset/fgui/game_atlas_p7rrv4rq.png", type: Laya.Loader.IMAGE },
         //
         { url: "asset/fgui/game_atlas_rz5r457.jpg", type: Laya.Loader.IMAGE },
         //
@@ -54,17 +54,26 @@ export function getGameResList() {
         { url: "asset/fgui/game_atlas_wehi3uc.jpg", type: Laya.Loader.IMAGE },
         //
         //加载json
-       // { url: "res/json/npc.json", type: Laya.Loader.JSON },
-       // { url: "res/json/classicCfg.json", type: Laya.Loader.JSON },
-      //  { url: "res/json/levelCfg.json", type: Laya.Loader.JSON },
-      //  { url: "res/json/placeBallCfg.json", type: Laya.Loader.JSON },
+        // { url: "res/json/npc.json", type: Laya.Loader.JSON },
+        // { url: "res/json/classicCfg.json", type: Laya.Loader.JSON },
+        //  { url: "res/json/levelCfg.json", type: Laya.Loader.JSON },
+        //  { url: "res/json/placeBallCfg.json", type: Laya.Loader.JSON },
 
         { url: "res/font/arial.ttf", type: Laya.Loader.FONT },
     ]
 }
 function initCallback() {
     window["DataMgr"] = DataMgr;
-    
+
+    // try {
+
+    //     Laya.loader.load("res/font/arial.ttf", Laya.Handler.create(this, this.onFontLoaded));
+    //     console.log("zh: gameInit.ts  constructor加载arial字体成功");
+    // } catch (error) {
+    //     console.log("zh: gameInit.ts  constructor加载arial字体失败");
+    // }
+
+
     DataMgr.Init();
     Moyu.init(getPlat(), this, () => {
         DataMgr.isNewDay();
@@ -82,7 +91,14 @@ function initCallback() {
     //加载loading界面
     xGame.uiMgr.Show(UILoading)
 }
-
+function onFontLoaded(): void {
+    try {
+        Laya.Text.defaultFont = "arial";
+        console.log("zh: onFontLoaded 设置arial字体成功");
+    } catch (error) {
+        console.log("zh: constructor onFontLoaded加载arial字体失败");
+    }
+}
 
 export function loadSubRes(callback) {
     var tab = ["asset", "res", "spine"];

+ 26 - 7
client/laya/src/Main.ts

@@ -1,20 +1,20 @@
 import GameConfig from "./GameConfig";
 import { appInit } from "./GameInit";
 import { xGame } from "./xGame";
-import NetCheckTool from "./utils/NetCheckTool"; 
+import NetCheckTool from "./utils/NetCheckTool";
 class Main {
 	constructor() {
 		//根据IDE设置初始化引擎		
-		if (window["Laya3D"]) 
-			Laya3D.init(GameConfig.width, GameConfig.height,null,Laya.Handler.create(this,this.initMain));
+		if (window["Laya3D"])
+			Laya3D.init(GameConfig.width, GameConfig.height, null, Laya.Handler.create(this, this.initMain));
 		else {
 			Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]);
 			this.initMain();
 		}
 
-	
+
 	}
-	initMain(){
+	initMain() {
 		Laya["Physics"] && Laya["Physics"].enable();
 		Laya["DebugPanel"] && Laya["DebugPanel"].enable();
 		Laya.stage.scaleMode = GameConfig.scaleMode;
@@ -30,12 +30,31 @@ class Main {
 		if (GameConfig.stat) Laya.Stat.show();
 		Laya.alertGlobalError(true);
 
+		this.loadFont();
 		//激活资源版本控制,version.json由IDE发布功能自动生成,如果没有也不影响后续流程
 		Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION);
+		// 实例化NetCheckExample类来检测网络状态
+		// new NetCheckTool();
 
 
-			       // 实例化NetCheckExample类来检测网络状态
-       // new NetCheckTool();
+	}
+	loadFont() {
+		try {
+			Laya.loader.load("res/font/arial.ttf", Laya.Handler.create(this, this.onFontLoaded));
+			console.log("zh: constructor加载arial字体成功1");
+		} catch (error) {
+			console.log("zh: constructor加载arial字体失败1");
+		}
+	}
+	private onFontLoaded(): void {
+		try {
+			Laya.Text.defaultFont = "Arial";//仅这样设置无效
+			//this.ui.myNode.conditionTxt.font = "arial";Arial
+			
+			console.log("zh: onFontLoaded 设置arial字体成功1");
+		} catch (error) {
+			console.log("zh: constructor onFontLoaded加载arial字体失败1");
+		}
 	}
 
 	onVersionLoaded(): void {

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

@@ -71,6 +71,9 @@ export class HttpMgr {
         if (isDev) {
             urlTop = "http://192.168.1.13:8090/";
             urlMid = urlTop + "api/";
+            console.log('zh:TEST环境')
+        }else{
+             console.log('zh:SC环境')
         }
         let url = urlMid + reqUrl;
         if (reqUrl == "registerForApp" || reqUrl == "loginForApp") {
@@ -109,7 +112,7 @@ export class HttpMgr {
         httpObj.once(Laya.Event.ERROR, this, errorHandler);
         // httpObj.send(url, data, 'post', 'text', ["Content-Type", "application/json; charset=UTF-8"]);
         httpObj.send(url, data, 'post', 'text', headers);
-        console.log('zh: http url = ' + url)
+        //console.log('zh: http url = ' + url)
         function errorHandler(error): void {
             if (call) {
                 call("{'msg':'Network exception','code':500}");//固定

+ 26 - 16
client/laya/src/data/DataMgr.ts

@@ -2,7 +2,7 @@ import { CHANGE_SECRETARY, COIN_CHANGE, DIAMOND_CHANGE, POWER_CHANGE, keyForLogi
 import { xGame } from "../xGame";
 import { GameData, ItemData, UserData, Diy2025GameData } from "./Data"
 import { LocalStorageManager } from "../utils/LocalStorageManager";
-
+import UIMsg from "../ui/UIMsg";
 //import { LocalStorageManager } from "../utils/LocalStorageManager";
 
 export default class DataMgr {
@@ -347,7 +347,7 @@ export default class DataMgr {
         }
         this.userData.coin = val;
         this.saveUserData();
-        console.log('zh:通知更新金币变化'+val);
+        console.log('zh:通知更新金币变化' + val);
         xGame.eventMgr.event(COIN_CHANGE);
     }
 
@@ -399,7 +399,7 @@ export default class DataMgr {
         }
         this.userData.diamond = val;
         this.saveUserData();
-         console.log('zh:通知更新钻石变化'+val);
+        console.log('zh:通知更新钻石变化' + val);
         xGame.eventMgr.event(DIAMOND_CHANGE);
     }
 
@@ -808,7 +808,7 @@ export default class DataMgr {
                 let code = res.code;
                 let data = res.data;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     console.log('zh:保存资产信息失败,请重新登录    ')
                     //alert(TIP_MSG_key.pleaseLoginIn);
                     //import UIMsg from "./UIMsg";
@@ -833,13 +833,18 @@ export default class DataMgr {
 
     /**
      * 获取用户资产信息,此次应该会被经常调用,所以后期需要挪走到模块中
+     * @param winTip  如果发生错误或者异常是否显示提示信息
      * 
      */
-    public static getUserZiChanInfo() {
-        console.log('zh:开始获取用户资产信息');
+    public static getUserZiChanInfo(winTip: boolean = false) {
+        console.log('zh:getUserZCI');
         const userInfoData = Laya.LocalStorage.getItem(keyForLoginInfo);
-        if (userInfoData == null) {
-            //alert('Please log in.');
+        console.log('zh:userInfoData=' + userInfoData)
+        if (userInfoData == null || userInfoData == "" || userInfoData === "null") {
+            if (winTip) {
+                xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+            }
+            Laya.LocalStorage.removeItem(keyForLoginInfo);
             return;
         }
         let reqData = xGame.httpMgr.getReqData();
@@ -849,10 +854,10 @@ export default class DataMgr {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    alert(TIP_MSG_key.pleaseLoginIn);
-                    //import UIMsg from "./UIMsg";
-                    //xGame.uiMgr.Show(UIMsg, msg)
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
+                    if (winTip) {
+                        xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn);
+                    }
                     return;
                 }
                 if (code == 200) {
@@ -873,15 +878,20 @@ export default class DataMgr {
                     }
 
                 } else {
-                     console.log("zh:更新用户资产信息error"+msg);
-                    alert(msg);
+                    console.log("zh:更新用户资产信息error" + msg);
+                    if (winTip) {
+                        xGame.uiMgr.Show(UIMsg, msg);
+                    }
                 }
                 // if (Laya.Browser.onAndroid) {
                 //     JSBridgeUtils.instance.showToast2(msg);
                 // }
             } catch (error) {
                 console.log('error=' + error);
-                alert(error);
+                if (winTip) {
+                    alert(error);
+                }
+
             } finally {
                 console.log("zh:更新用户资产信息结束");
             }
@@ -929,7 +939,7 @@ export default class DataMgr {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     //  xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }

+ 73 - 1
client/laya/src/fgui/core/UIBase.ts

@@ -37,11 +37,26 @@ export default class UIBase extends fairygui.Window {
     }
     /**UI创建时必须的操作统一放这里,比如fgui的creatInstance */
     protected onConstructor(): void {
+        try {
+            Laya.loader.load("res/font/arial.ttf", Laya.Handler.create(this, this.onFontLoadedForBase));
+            console.log("zh: base加载arial字体成功");
+        } catch (error) {
+            console.log("zh: base加载arial字体失败");
+        }
+    }
+    private onFontLoadedForBase(): void {
+        try {
+            Laya.Text.defaultFont = "arial";//仅这样设置无效
+            //this.ui.myNode.xxxxxx.font = "arial";
+            console.log("zh: base 设置arial字体成功");
+        } catch (error) {
+            console.log("zh: base 设置arial字体失败");
+        }
     }
     protected onInit(): void {
         // this.modal = true;
         if (!!this.contentPane) {
-          
+
             this.contentPane.setSize(fairygui.GRoot.inst.width, fairygui.GRoot.inst.height);
         }
         this.setPivot(0.5, 0.5, false);
@@ -200,6 +215,60 @@ export default class UIBase extends fairygui.Window {
     }
 
     protected refresh(): void { }
+
+    /**
+     * 设置UI中所有文本组件的字体
+     * --------------------@param fontName 字体名称,默认为"arial"
+     * @param root UI根组件,如果不传则使用this.contentPane
+     */
+    public setGlobalFont(root?: fairygui.GComponent) {
+        try {
+            console.log('zh: setGlobalFont start');
+            let fontName: string = "arial";
+            const setFont = (obj: fairygui.GObject) => {
+                if (obj instanceof fairygui.GTextField) {
+                    obj.font = fontName;
+                }
+                if (obj instanceof fairygui.GComponent) {
+                    for (let i = 0; i < obj.numChildren; i++) {
+                        setFont(obj.getChildAt(i));
+                    }
+                    // console.log('zh: setFont count=' + obj.numChildren);
+                }
+            };
+            // 如果没有指定根组件,则使用contentPane
+            const rootNode = root || this.contentPane;
+            if (rootNode) {
+                setFont(rootNode); // 传入根UI组件
+            }
+        } catch (error) {
+            console.log('zh: setGlobalFont error=' + error);
+        } finally {
+            console.log('zh: setGlobalFont end');
+        }
+
+    }
+
+
+    /**
+     *  在UI初始化完成后调用
+     */
+    // public setGlobalFont(fontName: string = "arial", obj: fgui.GObject) {
+    //     console.log('zh: 递归遍历所有GTextField组件2');
+    //     const setFont = (obj: fgui.GObject) => {
+    //         if (obj instanceof fgui.GTextField) {
+    //             obj.font = fontName;
+    //         }
+    //         if (obj instanceof fgui.GComponent) {
+    //             for (let i = 0; i < obj.numChildren; i++) {
+    //                 setFont(obj.getChildAt(i));
+    //                 console.log('zh: setFont=' + i);
+    //             }
+    //         }
+    //     };
+    //     setFont(obj); // 传入根UI组件
+    // }
+
     public addUIClick(obj, func, arr = null) {
         obj.onClick(this, func, arr);
         obj.onClick(this, this.playBtnSound);
@@ -211,4 +280,7 @@ export default class UIBase extends fairygui.Window {
         xGame.soundMgr.playSound(xGame.common.btnClickStr);
     }
 
+
+
+
 }

+ 1 - 1
client/laya/src/fgui/core/UIMgr.ts

@@ -49,7 +49,7 @@ export default class UIMgr {
 
 	public init(): void {
 		this.setStage(Laya.stage);
-		fairygui.UIConfig.defaultFont = "微软雅黑";
+		fairygui.UIConfig.defaultFont ="arial"; //"微软雅黑";
 		fairygui.UIConfig.modalLayerColor = "rgba(29, 22, 22, 0.9)";
 		fairygui.UIConfig.packageFileExtension = "obj";
 		fairygui.UIConfig.bringWindowToFrontOnClick = false;

+ 1 - 0
client/laya/src/ui/UIAddCoin.ts

@@ -24,6 +24,7 @@ export default class UIAddCoin extends UIBase {
     public show(): void {
         super.show();
         this.ui.t0.play();
+         this.setGlobalFont(this.ui)
     }
     videoAddCoin() {
 

+ 3 - 1
client/laya/src/ui/UIAddProp.ts

@@ -47,6 +47,8 @@ export default class UIAddProp extends UIBase {
         //
         this.ui.myNode.node1.c1.selectedIndex = Moyu.isTT ? 0 : 1;
         PlatMgr.showInsert(true);
+
+        this.setGlobalFont(this.ui)
     }
     public closeSelf() {
         this.hide();
@@ -292,7 +294,7 @@ export default class UIAddProp extends UIBase {
         }
         if (skill && !skill.isHide) xGame.uiMgr.Hide(UISkill);
         if (uigame && !uigame.isHide) xGame.uiMgr.Hide(UIGame);
-        //
+
         if (level && !level.isHide) {
             //不做操作
         }

+ 1 - 0
client/laya/src/ui/UIBox.ts

@@ -50,6 +50,7 @@ export default class UIBox extends UIBase {
         Laya.timer.once(500, this, () => {
             this.ui.t1.play();
         })
+         this.setGlobalFont(this.ui)
     }
     public hide() {
         Laya.timer.clearAll(this);

+ 4 - 2
client/laya/src/ui/UIDraw.ts

@@ -51,8 +51,10 @@ export default class UIDraw extends UIBase {
         }
         PlatMgr.showRateBanner();
 
-       // this.ui.n1.visible = true;
-        this.ui.n_zzq_bj.url ='res/qd_bg.jpg';// xGame.common.getGameIconUrl("turntable_bj");
+        // this.ui.n1.visible = true;
+        this.ui.n_zzq_bj.url = 'res/qd_bg.jpg';// xGame.common.getGameIconUrl("turntable_bj");
+
+        this.setGlobalFont(this.ui)
     }
     public hide() {
         Laya.timer.clearAll(this);

+ 2 - 0
client/laya/src/ui/UIFireworks.ts

@@ -19,6 +19,8 @@ export default class UIFireworks extends UIBase {
         //     this.hide();
         //     //
         // }))
+
+         this.setGlobalFont(this.ui)
     }
 }
 UIFireworks.uiName = "UIFireworks";

+ 2 - 0
client/laya/src/ui/UIFlyEft.ts

@@ -40,6 +40,8 @@ export default class UIFlyEft extends UIBase {
         this.runFly(edPos, callback);
         //文字特效
         this.runWorlds(stPos, num);
+
+         this.setGlobalFont(this.ui)
     }
     updateUI(type) {
         let temp;

+ 4 - 2
client/laya/src/ui/UIFuli1.ts

@@ -33,6 +33,8 @@ export default class UIFuli1 extends UIBase {
         this.x = (Laya.stage.width - this.width) / 2;
         this.y = (Laya.stage.height - this.height) / 2;
         this.ui.n2.txt_price.text = "$" + this.jiage;
+
+         this.setGlobalFont(this.ui)
     }
 
     closeSelf() {
@@ -69,7 +71,7 @@ export default class UIFuli1 extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     alert(TIP_MSG_key.loginTimeOut);
                     xGame.uiMgr.Show(UIMsg, msg)
                     return;
@@ -77,7 +79,7 @@ export default class UIFuli1 extends UIBase {
                 if (code == 200) {
                     xGame.uiMgr.Show(UIMsg, msg)
                     DataMgr.loadUserSpOrderForAd();
-                    DataMgr.getUserZiChanInfo();
+                    DataMgr.getUserZiChanInfo(false);
                     this.closeSelf();
                 } else {
                     xGame.uiMgr.Show(UIMsg, msg)

+ 4 - 2
client/laya/src/ui/UIFuli2.ts

@@ -34,6 +34,8 @@ export default class UIFuli2 extends UIBase {
         this.x = (Laya.stage.width - this.width) / 2;
         this.y = (Laya.stage.height - this.height) / 2;
         this.ui.n2.txt_price.text = "$" + this.jiage;
+
+         this.setGlobalFont(this.ui)
     }
     closeSelf() {
         DataMgr.loadUserSpOrderForAd();
@@ -68,7 +70,7 @@ export default class UIFuli2 extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                     Laya.LocalStorage.removeItem(keyForLoginInfo);
                     alert(TIP_MSG_key.loginTimeOut);
                     xGame.uiMgr.Show(UIMsg, msg)
                     return;
@@ -77,7 +79,7 @@ export default class UIFuli2 extends UIBase {
 
                     xGame.uiMgr.Show(UIMsg, msg)
                     DataMgr.loadUserSpOrderForAd();
-                    DataMgr.getUserZiChanInfo();
+                    DataMgr.getUserZiChanInfo(false);
                     this.closeSelf();
                 } else {
                     xGame.uiMgr.Show(UIMsg, msg)

+ 30 - 13
client/laya/src/ui/UIGame.ts

@@ -119,9 +119,9 @@ export class UIGame extends UIBase {
         let index = DataMgr.getCurBallRod();
         let data = cfgTable.ballrodData[index + 1];
         let gan_url = xGame.common.getGameIconUrl(data.img);
-        console.log('zh:getGanZiImg gan_url==' + gan_url);
+        //console.log('zh:getGanZiImg gan_url==' + gan_url);
         this.ui.powerNode.showImg.url = gan_url;
-        console.log('zh:修改杆子图标O  K');
+        // console.log('zh:修改杆子图标O  K');
     }
 
 
@@ -145,9 +145,9 @@ export class UIGame extends UIBase {
                 //延长辅助线
                 xGame.common.longHelpLine = true;
                 xGame.common.d2World.getHelpLine();
-                //
+
                 Moyu.sendDataEvent("guideNum");
-                //
+
             }
             else {
                 // 不做操作退出
@@ -185,19 +185,16 @@ export class UIGame extends UIBase {
         xGame.common.gameUI.ui.whiteAni.visible = false;
         this.ui.powerEft.visible = false;
         this.ui.colorNode.visible = false;
-        //
-        this.updateHead();
-
-
 
+        this.updateHead();
         let curUse = DataMgr.getCurBallRod();
-        console.log('zh:UIGame 选择的球杆234 = ' + curUse);
+        //  console.log('zh:UIGame 选择的球杆234 = ' + curUse);
         this.getGanZiImg();
 
-
-
         //console.log("持续播放");
         //xGame.soundMgr.playSound("bjyy1", 0);
+
+        this.setGlobalFont(this.ui)
     }
 
     public updateSelf() {
@@ -239,12 +236,12 @@ export class UIGame extends UIBase {
             xGame.common.d3World.tableSrc.gameObj.transform.localPositionY = 0;
             switch (xGame.common.gameMode) {
                 case GameMode.classic:
-                    /// alert("经典模式")
+
                     xGame.common.d3World.d3Hand.gameObj.active = true;
                     this.playPutBallD3Ani();
                     break;
                 case GameMode.bigMove:
-                    //  alert("大招模式")
+
                     this.enterGame();
                     //播放分数动画
                     Laya.timer.once(500, this, () => {
@@ -784,5 +781,25 @@ export class UIGame extends UIBase {
         this.hideBallUI();
         xGame.common.gameMgr.gamePause = true;
     }
+
+
+
+    // /**
+    //  *  在UI初始化完成后调用
+    //  */
+    // public setGlobalFont_test(fontName: string="Arial") {
+    //     // 递归遍历所有GTextField组件
+    //     const setFont = (obj: fgui.GObject) => {
+    //         if (obj instanceof fgui.GTextField) {
+    //             obj.font = fontName;
+    //         }
+    //         if (obj instanceof fgui.GComponent) {
+    //             for (let i = 0; i < obj.numChildren; i++) {
+    //                 setFont(obj.getChildAt(i));
+    //             }
+    //         }
+    //     };
+    //     setFont(this.ui); // 传入根UI组件
+    // }
 }
 UIGame.uiName = "UIGame";

+ 3 - 1
client/laya/src/ui/UIGameEnd.ts

@@ -481,6 +481,8 @@ export default class UIGameEnd extends UIBase {
             DataMgr.setClassicTimes();
 
         }
+
+         this.setGlobalFont(this.ui)
     }
 
 
@@ -538,7 +540,7 @@ export default class UIGameEnd extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }

+ 2 - 0
client/laya/src/ui/UIGetAward.ts

@@ -43,6 +43,8 @@ export default class UIGetAward extends UIBase {
         this.ui.myList.numItems = arr.length;
         //
         xGame.soundMgr.playSound("getaward");
+
+         this.setGlobalFont(this.ui)
     }
     updateSelf(index, obj: ui_AwardItem) {
         let temp: AwardType = this.awardArr[index];

+ 1 - 0
client/laya/src/ui/UIGuanYu.ts

@@ -19,6 +19,7 @@ export default class UIGuanYu extends UIBase {
             this.hide();
             //
         }))
+        this.setGlobalFont(this.ui)
     }
 }
 UIGuanYu.uiName = "UIGuanYu";

+ 1 - 0
client/laya/src/ui/UIInvitation.ts

@@ -21,6 +21,7 @@ export default class UIInvitation extends UIBase {
     }
     public show(): void {
         super.show();
+        this.setGlobalFont(this.ui)
     }
     public enterGame() {
         xGame.common.gameMode = GameMode.classic;

+ 5 - 4
client/laya/src/ui/UILevelDisplay.ts

@@ -14,7 +14,7 @@ export default class UILevelDisplay extends UIBase {
     public levelItemArr: Array<PutBallLevelDisplay>;
     public constructor() {
         super();
-       
+
     }
     public onConstructor(): void {
         this.ui = ui_UILevelDisplay.createInstance();
@@ -28,12 +28,12 @@ export default class UILevelDisplay extends UIBase {
         let levelNum = xGame.cfgMgr.getMaxPlaceBall();
         //console.log("zh:levelNum", levelNum);
 
-       //let f = DataMgr.getPlaceBallLevelList();
-       //console.log("zh:f", f)
+        //let f = DataMgr.getPlaceBallLevelList();
+        //console.log("zh:f", f)
 
         // let  pbd  =  cfgTable.placeballData;
         // console.log( "zh:pbd", pbd)
-      
+
 
 
         this.myList.itemRenderer = Laya.Handler.create(this, this.levelItemRender, null, false);
@@ -49,6 +49,7 @@ export default class UILevelDisplay extends UIBase {
         super.show();
         this.updateLevel();
         this.scrollToPlace();
+        this.setGlobalFont(this.ui)
     }
     updateLevel() {
         let temp: PutBallLevelDisplay;

+ 20 - 19
client/laya/src/ui/UILevelProp.ts

@@ -27,28 +27,24 @@ export default class UILevelProp extends UIBase {
     public showItemArr: Array<ShowItem> = [];
     public constructor() {
         super();
+        // try {
+        //     Laya.loader.load("res/font/arial.ttf", Laya.Handler.create(this, this.onFontLoaded));
+        //     console.log("zh: constructor加载arial字体成功");
+        // } catch (error) {
+        //     console.log("zh: constructor加载arial字体失败");
+        // }
 
-        try {
-            Laya.loader.load("res/font/arial.fnt", Laya.Handler.create(this, this.onFontLoaded));
-
-            console.log("zh: constructor加载arial字体成功");
-        } catch (error) {
-            console.log("zh: constructor加载arial字体失败");
-        }
-
-
-    }
-    private onFontLoaded(): void {
-        try {
-            
-            Laya.Text.defaultFont = "arial";
-            this.ui.myNode.conditionTxt.font = "arial";
-            console.log("zh: onFontLoaded 设置arial字体成功");
-        } catch (error) {
-            console.log("zh: constructor onFontLoaded加载arial字体失败");
-        }
 
     }
+    // private onFontLoaded(): void {
+    //     try {
+    //         Laya.Text.defaultFont = "arial";//仅这样设置无效
+    //         this.ui.myNode.conditionTxt.font = "arial";
+    //         console.log("zh: onFontLoaded 设置arial字体成功");
+    //     } catch (error) {
+    //         console.log("zh: constructor onFontLoaded加载arial字体失败");
+    //     }
+    // }
     public onConstructor(): void {
         this.ui = ui_UILevelProp.createInstance();
         this.contentPane = this.ui;
@@ -56,6 +52,7 @@ export default class UILevelProp extends UIBase {
         this.addUIClick(this.ui.closeBtn, this.hide);
         this.moneyNode = new MoneyNode(this.ui.moneyNode);
         this.addUIClick(this.ui.myNode.startBtn, this.startGame);
+
     }
     public show(level): void {
         super.show();
@@ -68,6 +65,8 @@ export default class UILevelProp extends UIBase {
         this.moneyNode.ui.c1.selectedIndex = 2;
         this.moneyNode.checkPowerTime();
         this.moneyNode.powerChange();
+        //   this.setGlobalFont("arial", this.ui);
+        this.setGlobalFont(this.ui)
     }
     //展示关卡预览图
     showPreView() {
@@ -217,5 +216,7 @@ export default class UILevelProp extends UIBase {
     public hide() {
         super.hide();
     }
+
+
 }
 UILevelProp.uiName = "UILevelProp";

+ 4 - 2
client/laya/src/ui/UILoading.ts

@@ -22,7 +22,7 @@ export default class UILoading extends UIBase {
     finishD3: boolean = false;
     public constructor() {
         super();
-        
+
     }
     protected onConstructor(): void {
         this.ui = ui_UILoading.createInstance();
@@ -47,6 +47,8 @@ export default class UILoading extends UIBase {
         console.log('zh:加载分包资源')
         loadSubRes(this.subResProgress.bind(this))
         this.ui.txtLoad.text = "Loading..."
+
+        this.setGlobalFont(this.ui)
     }
     public subResProgress(pro, finish) {
         this.curNum = pro;
@@ -122,7 +124,7 @@ export default class UILoading extends UIBase {
                 this.openLoading = false;
                 Laya.timer.once(300, this, () => {
                     xGame.common.d3Scene.active = false;
-                   MoyuMgr.showAgree(enterGame);
+                    MoyuMgr.showAgree(enterGame);
                 })
             }
         }

+ 2 - 1
client/laya/src/ui/UILogin.ts

@@ -28,6 +28,7 @@ export default class UILogin extends UIBase {
         // 自定义居中逻辑
         this.x = (Laya.stage.width - this.width) / 2;
         this.y = (Laya.stage.height - this.height) / 2;
+        this.setGlobalFont(this.ui)
     }
     closeSelf() {
         this.hide();
@@ -69,7 +70,7 @@ export default class UILogin extends UIBase {
                         xGame.uiMgr.Show(UIMsg, msg)
 
                         DataMgr.loadUserSpOrderForAd();
-                        DataMgr.getUserZiChanInfo();
+                        DataMgr.getUserZiChanInfo(false);
 
 
                         xGame.eventMgr.event(LOGIN_IN);

+ 7 - 5
client/laya/src/ui/UIMain.ts

@@ -113,7 +113,7 @@ export default class UIMain extends UIBase {
             //当APP中购买成功之后,需要回调这里,然后通知更新用户资产信息
             case 'app_sign_for_buyProduct_onSuccess':
                 console.log('zh:收到APP通知,需要更新用户游戏资产信息app_sign_for_buyProduct_onSuccess ');
-                DataMgr.getUserZiChanInfo();
+                DataMgr.getUserZiChanInfo(false);
 
                 break;
             case '222axxxxxx':
@@ -183,7 +183,7 @@ export default class UIMain extends UIBase {
         }
         this.onGetUserInfo();
         if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
-            DataMgr.getUserZiChanInfo();
+            DataMgr.getUserZiChanInfo(false);
         }
 
         this.ui.n83.visible = false;
@@ -320,7 +320,7 @@ export default class UIMain extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                     Laya.LocalStorage.removeItem(keyForLoginInfo);
                     xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }
@@ -491,6 +491,8 @@ export default class UIMain extends UIBase {
                 this.showFuLiSp7();
             })
         }
+
+         this.setGlobalFont(this.ui)
     }
     checkActive(show) {
         //console.log("是否处于最外层",show);
@@ -767,11 +769,11 @@ export default class UIMain extends UIBase {
         console.log('zh:5秒后更新用户信息');
         // Laya.timer.once(5000, this, () => {
         //     console.log('zh:5秒over 更新用戶資產信息')
-        //     DataMgr.getUserZiChanInfo();
+        //     DataMgr.getUserZiChanInfo22();
         // });
         setTimeout(() => {
             // console.log('setTimeout 5秒over 執行');
-            DataMgr.getUserZiChanInfo();
+            DataMgr.getUserZiChanInfo(true);
         }, 5000);
 
 

+ 2 - 0
client/laya/src/ui/UIMatching.ts

@@ -78,6 +78,8 @@ export default class UIMatching extends UIBase {
             }
             ))
         }));
+
+         this.setGlobalFont(this.ui)
     }
     initSkillData() {
         this.skillSelectData = [];

+ 2 - 0
client/laya/src/ui/UIModeSelection.ts

@@ -42,6 +42,8 @@ export default class UIModeSelection extends UIBase {
         super.show();
         this.ui.t0.play();
         this.callback = callback;
+
+        this.setGlobalFont(this.ui)
     }
     updateSelf() {
         let cfg = cfgTable.modeselectData;

+ 2 - 0
client/laya/src/ui/UIMsg.ts

@@ -19,6 +19,8 @@ export default class UIMsg extends UIBase {
             this.hide();
             callback && callback();
         }), 1000)
+
+        this.setGlobalFont(this.ui)
     }
 }
 UIMsg.uiName = "UIMsg";

+ 2 - 0
client/laya/src/ui/UIPower.ts

@@ -23,6 +23,8 @@ export default class UIPower extends UIBase {
     public show(): void {
         super.show();
         this.ui.t0.play();
+        
+        this.setGlobalFont(this.ui)
     }
     public videoGetPower() {
         console.log('zh:qjff_AD_for_uipower')

+ 2 - 0
client/laya/src/ui/UIRanking.ts

@@ -53,6 +53,8 @@ export default class UIRanking extends UIBase {
                 DataMgr.upRankData();
             });
         }
+
+         this.setGlobalFont(this.ui)
     }
 
 

+ 1 - 0
client/laya/src/ui/UIReg.ts

@@ -26,6 +26,7 @@ export default class UIReg extends UIBase {
         // 自定义居中逻辑
         this.x = (Laya.stage.width - this.width) / 2;
         this.y = (Laya.stage.height - this.height) / 2;
+         this.setGlobalFont(this.ui)
     }
     closeSelf() {
         this.hide();

+ 2 - 0
client/laya/src/ui/UIRepentProp.ts

@@ -47,6 +47,8 @@ export default class UIRepentProp extends UIBase {
         }
         //
         xGame.common.gameMgr.gamePause = true;
+
+        this.setGlobalFont(this.ui)
     }
     hideSelf() {
         xGame.common.gameMgr.gamePause = false;

+ 2 - 0
client/laya/src/ui/UIRodMethod.ts

@@ -36,6 +36,8 @@ export default class UIRodMethod extends UIBase {
         this.moveDest.x=this.centerPos.x-xGame.common.rodOffest.x;
         this.moveDest.y=this.centerPos.y-xGame.common.rodOffest.y;
         this.setDot();
+
+         this.setGlobalFont(this.ui)
     }
     setDot()
     {

+ 2 - 0
client/laya/src/ui/UISecretary.ts

@@ -33,6 +33,8 @@ export default class UISecretary extends UIBase {
         super.show();
         this.ui.t0.play();
         this.updateData();
+
+         this.setGlobalFont(this.ui)
     }
     addSecretarySpine(node: fgui.GLoader, spineName) {
         if (spineName == "mishu") {        

+ 3 - 2
client/laya/src/ui/UIShop.ts

@@ -69,8 +69,7 @@ export default class UIShop extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    //import UIMsg from "./UIMsg";
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }
@@ -101,6 +100,8 @@ export default class UIShop extends UIBase {
         this.switchBtn("");
         this.playSecretaryIdle();
         this.updateBallRod();
+
+         this.setGlobalFont(this.ui)
     }
     test123() {
         console.log('zh:test123   ')

+ 2 - 1
client/laya/src/ui/UISign.ts

@@ -44,6 +44,7 @@ export default class UISign extends UIBase {
         this.playSecretaryIdle();
         this.updateSign();
         this.ui.n_zzq_bj.url = 'res/qd_bg.jpg';// xGame.common.getGameIconUrl("turntable_bj");
+        this.setGlobalFont(this.ui)
     }
     initSignItem() {
         this.signArr = [];
@@ -226,7 +227,7 @@ export default class UISign extends UIBase {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }

+ 1 - 0
client/laya/src/ui/UISkill.ts

@@ -62,6 +62,7 @@ export default class UISkill extends UIBase {
             this.displayList[index].checkTry();
 
         }
+         this.setGlobalFont(this.ui)
     }
     getSkillItemByUIIndex(cur) {
         for (let index = 0; index < this.displayList.length; index++) {

+ 1 - 1
client/laya/src/ui/UITips.ts

@@ -40,7 +40,7 @@ export default class UITips extends UIBase {
             default:
                 break;
         }
-        //
+        this.setGlobalFont(this.ui)
     }
     public clickLeftBtn() {
         this.hide();

+ 3 - 2
client/laya/src/ui/UITry.ts

@@ -35,6 +35,7 @@ export default class UITry extends UIBase {
         //
         xGame.common.gameMgr.gamePause = true;
         //
+        this.setGlobalFont(this.ui)
     }
     updateTime() {
         if (this.closeTime > 1) {
@@ -64,8 +65,8 @@ export default class UITry extends UIBase {
                 return;
             }
         }
-        
-        
+
+
         if (JSBridgeUtils.instance.showRewardAd('qjff_AD_for_uitry')) {
 
         } else {

+ 1 - 0
client/laya/src/ui/UIVideoShare.ts

@@ -46,6 +46,7 @@ export default class UIVideoShare extends UIBase {
         this.awardNum = times == 0 ? 2000 : 200;
         this.ui.myNode.awardNode.coinTxt.text = "x" + this.awardNum + "";
         //
+         this.setGlobalFont(this.ui)
     }
     checkShareState() {
         if (PlatMgr.forceShare == 0) {

+ 1 - 0
client/laya/src/ui/UIWordsList.ts

@@ -24,6 +24,7 @@ export default class UIWordsList extends UIBase {
     }
     public show(): void {
         super.show();
+        this.setGlobalFont(this.ui)
     }
     initTalkList() {
         this.ui.wordsList.itemRenderer = Laya.Handler.create(this, this.renderTalkItem, null, false);

+ 6 - 6
client/laya/src/ui/item/BallRodDisplay.ts

@@ -37,11 +37,11 @@ export default class BallRodDisplay {
         }
     }
     updateSelf() {
-        console.log('zh:updateSelf -------------- ')
+      ///  console.log('zh:updateSelf -------------- ')
         let get = DataMgr.getBallRod(this.index);
         if (get == null) get = 1;
         let curUse = DataMgr.getCurBallRod();
-        console.log('zh:updateSelf 选择的球杆 = ' + curUse);
+        //console.log('zh:updateSelf 选择的球杆 = ' + curUse);
         if (get) {
             //已获得
             if (curUse == this.index) {
@@ -121,14 +121,14 @@ export default class BallRodDisplay {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    alert(TIP_MSG_key.loginTimeOut);
-                    xGame.uiMgr.Show(UIMsg, msg)
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
+                 
+                    xGame.uiMgr.Show(UIMsg, TIP_MSG_key.loginTimeOut)
                     return;
                 }
                 if (code == 200) {
                     xGame.uiMgr.Show(UIMsg, msg)
-                    DataMgr.getUserZiChanInfo();
+                    DataMgr.getUserZiChanInfo(false);
                 } else {
                     xGame.uiMgr.Show(UIMsg, msg)
                 }

+ 4 - 6
client/laya/src/ui/item/DaoJuDisplay.ts

@@ -24,9 +24,9 @@ export default class DaoJuDisplay {
     public initData() {
         this.ui.btn_buy.onClick(this, this.gotoBuy);
         let data = cfgTable.daoJuData[this.index + 1];
-        console.log('zh:' + JSON.stringify(data))
+        //console.log('zh:' + JSON.stringify(data))
         this.ui.nameTxt.text = data.spbt;
-        this.ui.n_jiaGe.text = data.spjg + "";
+        this.ui.n_jiaGe.text = "$" + data.spjg + "";
         this.ui.n_zuanShi.text = "X" + data.zssl + "";
 
         this.ggSpid = data.ggSpid;
@@ -75,16 +75,14 @@ export default class DaoJuDisplay {
                 let code = res.code;
                 let msg = res.msg;
                 if (code == 401) {
-                    Laya.LocalStorage.setItem(keyForLoginInfo, null);
-                    //  alert(TIP_MSG_key.pleaseLoginIn);
-                    //import UIMsg from "./UIMsg";
+                    Laya.LocalStorage.removeItem(keyForLoginInfo);
                     xGame.uiMgr.Show(UIMsg, TIP_MSG_key.pleaseLoginIn)
                     return;
                 }
                 if (code == 200) {
                     xGame.uiMgr.Show(UIMsg, msg)
                     //之后开始重新从服务器获取用户资产信息
-                    DataMgr.getUserZiChanInfo();
+                    DataMgr.getUserZiChanInfo(false);
                 } else {
                     xGame.uiMgr.Show(UIMsg, msg)
                 }

Some files were not shown because too many files changed in this diff