dzduole 3 days ago
parent
commit
247e478851
32 changed files with 669 additions and 198 deletions
  1. 2 3
      art/fgui/.objs/metas/37nctnhw/jvenv4eg.info
  2. 3 0
      art/fgui/.objs/metas/isxx5ak7/bobav57u.info
  3. 11 4
      art/fgui/.objs/metas/isxx5ak7/kt443qc.info
  4. 0 5
      art/fgui/.objs/metas/isxx5ak7/s46iv4f1.info
  5. 9 18
      art/fgui/.objs/workspace.json
  6. BIN
      art/fgui/assets/game/UIMoyu/asset/input.png
  7. 2 2
      art/fgui/assets/game/UISecretary/UIShop/component/Component58_11.xml
  8. 7 1
      art/fgui/assets/game/UISecretary/UIShop/component/Component_daoju.xml
  9. 13 13
      art/fgui/assets/game/UIUser/UILogin.xml
  10. 15 14
      art/fgui/assets/game/UIUser/UIReg.xml
  11. 1 1
      art/fgui/assets/game/UIUser/component/Button_login.xml
  12. 2 2
      art/fgui/assets/game/UIUser/component/Component_goto.xml
  13. 11 6
      art/fgui/assets/game/package.xml
  14. BIN
      client/laya/bin/asset/fgui/game.obj
  15. BIN
      client/laya/bin/asset/fgui/game_atlas0.png
  16. BIN
      client/laya/bin/asset/fgui/game_atlas0_1.png
  17. BIN
      client/laya/bin/asset/fgui/game_atlas0_2.png
  18. 441 71
      client/laya/bin/js/bundle.js
  19. 0 0
      client/laya/bin/js/bundle.js.map
  20. 3 3
      client/laya/src/core/mgrs/HttpMgr.ts
  21. 4 0
      client/laya/src/data/Define.ts
  22. 1 0
      client/laya/src/fgui/core/UIBase.ts
  23. 2 2
      client/laya/src/fgui/res/game/gameBinder.ts
  24. 0 15
      client/laya/src/fgui/res/game/ui_Component_close.ts
  25. 2 0
      client/laya/src/fgui/res/game/ui_Component_daoju.ts
  26. 17 0
      client/laya/src/fgui/res/game/ui_Component_dl_zc.ts
  27. 11 9
      client/laya/src/fgui/res/game/ui_UILogin.ts
  28. 7 0
      client/laya/src/fgui/res/game/ui_UIMain.ts
  29. 17 15
      client/laya/src/fgui/res/game/ui_UIReg.ts
  30. 15 0
      client/laya/src/ui/UILogin.ts
  31. 70 14
      client/laya/src/ui/UIMain.ts
  32. 3 0
      client/laya/src/ui/UIReg.ts

+ 2 - 3
art/fgui/.objs/metas/37nctnhw/jvenv4eg.info

@@ -7,12 +7,11 @@
     "n38_xe62": {
       "collapsed": true
     },
-    "n45_xe62": {
+    "n46_xe62": {
       "hidden": true
     },
     "n34_xe62": {
-      "hidden": true,
-      "collapsed": true
+      "hidden": true
     }
   }
 }

+ 3 - 0
art/fgui/.objs/metas/isxx5ak7/bobav57u.info

@@ -0,0 +1,3 @@
+{
+  "adaptiveTest": true
+}

+ 11 - 4
art/fgui/.objs/metas/isxx5ak7/kt443qc.info

@@ -5,18 +5,25 @@
       "locked": true,
       "hidden": true
     },
-    "n83_jpsz": {
+    "n84_jpsz": {
       "hidden": true
     },
-    "n84_jpsz": {
+    "n77_vhzh": {
+      "collapsed": true,
+      "locked": true,
       "hidden": true
     },
     "n48_hxtr": {
       "locked": true,
       "hidden": true
     },
-    "n77_vhzh": {
-      "locked": true,
+    "n45_ixm4": {
+      "collapsed": true
+    },
+    "n46_ixm4": {
+      "collapsed": true
+    },
+    "n83_jpsz": {
       "hidden": true
     }
   },

+ 0 - 5
art/fgui/.objs/metas/isxx5ak7/s46iv4f1.info

@@ -1,9 +1,4 @@
 {
-  "objectStatus": {
-    "n0_s46i": {
-      "locked": true
-    }
-  },
   "adaptiveTest": true,
   "fitScreen": "FitSize"
 }

+ 9 - 18
art/fgui/.objs/workspace.json

@@ -7,35 +7,26 @@
     "/"
   ],
   "libview.iconScale": 0,
-  "doc.openedDocs": [
-    "ui://isxx5ak7bobav57v"
-  ],
+  "doc.openedDocs": [],
   "test.device": "Huawei Mate20 Pro",
   "canvasColor": 10066329,
   "auxline2": true,
-  "doc.activeDoc": "ui://isxx5ak7bobav57v",
   "libview.twoColumn": false,
   "libview.expandedNodes": [
     "isxx5ak7",
     "/",
     "isxx5ak7",
-    "/UIMain/",
-    "isxx5ak7",
-    "/UIMsg/",
-    "isxx5ak7",
-    "/UIPower/",
-    "isxx5ak7",
-    "/UITips/",
-    "isxx5ak7",
-    "/UITips/component/",
-    "isxx5ak7",
     "/UIUser/",
     "isxx5ak7",
-    "/UIUser/asset/",
+    "/UIUser/__示意图/",
     "isxx5ak7",
-    "/UIUser/component/",
-    "isxx5ak7",
-    "/__示意图/"
+    "/UIUser/asset/",
+    "37nctnhw",
+    "/",
+    "37nctnhw",
+    "/UIMoyu/",
+    "37nctnhw",
+    "/compontent/"
   ],
   "auxline1": true,
   "snapToGrid": true,

BIN
art/fgui/assets/game/UIMoyu/asset/input.png


+ 2 - 2
art/fgui/assets/game/UISecretary/UIShop/component/Component58_11.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="616,637" designImageLayer="1">
-  <controller name="c1" alias="qiuGan" pages="0,球杆,1,道具" selected="0"/>
+  <controller name="c1" alias="qiuGan" pages="0,球杆,1,道具" selected="1"/>
   <displayList>
     <image id="n23_qlo0" name="n23" src="qlo041k" fileName="UISkill/asset/qq_dtd.png" xy="0,0" size="616,637"/>
     <image id="n41_9d32" name="n41" src="qlo041j" fileName="UISkill/asset/qq_dtd2.png" xy="560,0" size="56,636" alpha="0.4">
@@ -15,7 +15,7 @@
       <item/>
       <item/>
     </list>
-    <component id="n46_nmu9" name="djList" src="nmu9v57t" fileName="UISecretary/UIShop/component/Component_daoju.xml" xy="12,11">
+    <component id="n46_nmu9" name="djList" src="nmu9v57t" fileName="UISecretary/UIShop/component/Component_daoju.xml" xy="5,8">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay2 controller="c1" pages="" condition="0"/>
     </component>

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

@@ -1,4 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="541,615">
-  <displayList/>
+  <displayList>
+    <list id="n0_d6k9" name="n0" xy="15,29" size="507,571" overflow="scroll">
+      <item title="1111" name="111"/>
+      <item title="2222" name="222"/>
+      <item title="333" name="333"/>
+    </list>
+  </displayList>
 </component>

+ 13 - 13
art/fgui/assets/game/UIUser/UILogin.xml

@@ -3,18 +3,18 @@
   <displayList>
     <graph id="n18_p8p3" name="n18" xy="0,0" size="1334,750" alpha="0.6" type="rect" fillColor="#ff000000"/>
     <image id="n7_nnz5" name="n7" src="hgftv582" fileName="UIUser/asset/bg.png" xy="127,86" size="1027,518" alpha="0.63"/>
-    <text id="n0_nnz5" name="n0" xy="305,109" size="674,69" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="登录" input="true"/>
-    <component id="n3_nnz5" name="btn_login" src="nnz5v587" fileName="UIUser/component/Button_login.xml" xy="404,623"/>
-    <component id="n4_nnz5" name="closeBtn" src="hgftv580" fileName="UIUser/component/Component_close.xml" xy="1118,8"/>
-    <text id="n5_nnz5" name="n5" xy="222,230" size="135,39" fontSize="28" color="#ffffff" align="center" text="Account:"/>
-    <text id="n6_nnz5" name="n6" xy="208,371" size="128,39" fontSize="28" color="#ffffff" align="center" text="Password"/>
-    <graph id="n10_nnz5" name="n10" xy="391,192" size="482,100" type="rect"/>
-    <graph id="n12_nnz5" name="n12" xy="395,319" size="478,100" type="rect"/>
-    <component id="n15_nnz5" name="btn_gotoReg" src="nnz5v589" fileName="UIUser/component/Component_goto.xml" xy="676,618" controller="c1,1"/>
-    <text id="n16_nnz5" name="lab_tip" xy="346,441" size="600,58" visible="false" fontSize="28" color="#ffffff" align="center" autoSize="none" text="提示:休息休息"/>
-    <text id="n13_nnz5" name="txt_ua" xy="406,204" size="461,73" fontSize="28" align="center" vAlign="middle" autoSize="none" bold="true" text="" input="true" maxLength="20"/>
-    <text id="n14_nnz5" name="txt_up" xy="405,337" size="461,73" fontSize="28" align="center" vAlign="middle" autoSize="none" bold="true" text="" input="true" maxLength="20" password="true"/>
-    <component id="n17_p8p3" name="closeBtn" src="xs1r483" fileName="UILevelProp/component/Component86.xml" xy="1085,232"/>
-    <text id="n20_p8p3" name="n20" xy="472,540" size="346,42" fontSize="30" color="#00ff00" align="center" vAlign="middle" autoSize="none" bold="true" text="aaa" input="true" maxLength="10"/>
+    <component id="n3_nnz5" name="btn_login" src="nnz5v587" fileName="UIUser/component/Button_login.xml" xy="370,517"/>
+    <text id="n5_nnz5" name="n5" xy="336,232" size="135,39" fontSize="28" color="#ffffff" align="center" text="Account:"/>
+    <text id="n6_nnz5" name="n6" xy="336,345" size="136,39" fontSize="28" color="#ffffff" align="center" text="Password:"/>
+    <component id="n15_nnz5" name="btn_gotoReg" src="nnz5v589" fileName="UIUser/component/Component_goto.xml" xy="726,510" controller="c1,1"/>
+    <text id="n16_nnz5" name="lab_tip" xy="370,427" size="600,58" visible="false" fontSize="28" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="提示:休息休息"/>
+    <component id="n17_p8p3" name="closeBtn" src="xs1r483" fileName="UILevelProp/component/Component86.xml" xy="1097,91"/>
+    <image id="n25_d6k9" name="n25" src="p8p3v58d" fileName="UIUser/asset/input.png" xy="549,216" size="466,65" group="n26_d6k9"/>
+    <text id="n13_nnz5" name="txt_ua" xy="556,223" size="453,52" group="n26_d6k9" fontSize="35" align="center" vAlign="middle" leading="0" letterSpacing="2" autoSize="none" bold="true" text="" input="true" maxLength="20"/>
+    <group id="n26_d6k9" name="n26" xy="549,216" size="466,65"/>
+    <image id="n27_d6k9" name="n27" src="p8p3v58d" fileName="UIUser/asset/input.png" xy="549,331" size="466,65" group="n28_d6k9"/>
+    <text id="n14_nnz5" name="txt_up" xy="556,338" size="452,54" group="n28_d6k9" fontSize="35" color="#0000ff" align="center" vAlign="middle" leading="0" letterSpacing="2" autoSize="none" bold="true" text="" input="true" maxLength="20" password="true"/>
+    <group id="n28_d6k9" name="n28" xy="549,331" size="466,65"/>
+    <text id="n29_d6k9" name="n29" xy="492,119" size="350,42" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="Login"/>
   </displayList>
 </component>

+ 15 - 14
art/fgui/assets/game/UIUser/UIReg.xml

@@ -1,20 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1334,750" designImageLayer="1">
   <displayList>
-    <image id="n9_hgft" name="n9" src="hgftv582" fileName="UIUser/asset/bg.png" xy="-1,-1" size="1334,750"/>
-    <component id="n8_hgft" name="closeBtn" src="hgftv580" fileName="UIUser/component/Component_close.xml" xy="1198,1"/>
-    <component id="n13_hgft" name="btn_reg" src="bobav57y" fileName="UIUser/component/Button_reg.xml" xy="325,451" size="241,75"/>
-    <text id="n14_nnz5" name="n14" xy="406,188" size="220,42" fontSize="30" autoSize="none" text="Account"/>
-    <text id="n15_nnz5" name="n15" xy="406,256" size="220,42" fontSize="30" autoSize="none" text="Password"/>
-    <graph id="n27_nnz5" name="n27" xy="680,189" size="240,50" type="rect"/>
-    <text id="n26_nnz5" name="n26" xy="330,55" size="674,42" fontSize="30" align="center" vAlign="middle" autoSize="none" text="注册账号" input="true"/>
-    <text id="n28_nnz5" name="txt_ua" xy="689,192" size="215,42" fontSize="30" autoSize="none" text="" input="true"/>
-    <graph id="n29_nnz5" name="n29" xy="682,256" size="240,50" type="rect"/>
-    <text id="n30_nnz5" name="txt_up1" xy="694,260" size="197,42" fontSize="30" autoSize="none" text="" input="true"/>
-    <graph id="n32_nnz5" name="n32" xy="663,343" size="240,50" type="rect"/>
-    <text id="n33_nnz5" name="txt_up2" xy="675,349" size="199,42" fontSize="30" autoSize="none" text="" input="true"/>
-    <text id="n34_nnz5" name="n34" xy="407,335" size="220,42" fontSize="30" autoSize="none" text="确认密码"/>
+    <graph id="n38_d6k9" name="n38" xy="0,0" size="1334,750" alpha="0.6" type="rect" fillColor="#ff000000"/>
+    <image id="n9_hgft" name="n9" src="hgftv582" fileName="UIUser/asset/bg.png" xy="252,101" size="830,584"/>
+    <component id="n13_hgft" name="btn_reg" src="bobav57y" fileName="UIUser/component/Button_reg.xml" xy="406,463" size="241,75"/>
+    <text id="n14_nnz5" name="n14" xy="329,197" size="220,42" fontSize="30" autoSize="none" text="Account"/>
+    <text id="n15_nnz5" name="n15" xy="333,275" size="220,42" fontSize="30" autoSize="none" text="Password"/>
+    <text id="n34_nnz5" name="n34" xy="332,357" size="220,42" fontSize="30" autoSize="none" text="确认密码"/>
+    <component id="n36_nnz5" name="btn_gotoLogin" src="nnz5v589" fileName="UIUser/component/Component_goto.xml" xy="688,462" controller="c1,3"/>
+    <component id="n37_d6k9" name="closeBtn" src="xs1r483" fileName="UILevelProp/component/Component86.xml" xy="1274,-1"/>
+    <text id="n39_d6k9" name="n39" xy="605,32" size="124,42" fontSize="30" color="#ffffff" align="center" bold="true" text="注册账号"/>
+    <image id="n40_d6k9" name="n40" src="p8p3v58d" fileName="UIUser/asset/input.png" xy="608,187" size="409,65"/>
+    <text id="n28_nnz5" name="txt_ua" xy="616,192" size="398,52" fontSize="30" align="center" vAlign="middle" autoSize="none" bold="true" text="" input="true"/>
+    <image id="n41_d6k9" name="n41" src="p8p3v58d" fileName="UIUser/asset/input.png" xy="607,268" size="410,65"/>
+    <text id="n30_nnz5" name="txt_up1" xy="614,274" size="397,50" fontSize="30" align="center" vAlign="middle" autoSize="none" bold="true" text="" input="true" password="true"/>
+    <image id="n42_d6k9" name="n42" src="p8p3v58d" fileName="UIUser/asset/input.png" xy="606,345" size="409,65"/>
+    <text id="n33_nnz5" name="txt_up2" xy="614,352" size="394,50" fontSize="30" align="center" vAlign="middle" autoSize="none" bold="true" text="" input="true" password="true"/>
     <text id="n35_nnz5" name="lab_tip" xy="335,579" size="663,42" visible="false" fontSize="30" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="Registration successful!"/>
-    <component id="n36_nnz5" name="btn_gotoLogin" src="nnz5v589" fileName="UIUser/component/Component_goto.xml" xy="702,446" controller="c1,3"/>
   </displayList>
 </component>

+ 1 - 1
art/fgui/assets/game/UIUser/component/Button_login.xml

@@ -3,7 +3,7 @@
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
     <image id="n4_nnz5" name="n4" src="nnz5v588" fileName="UIUser/asset/btn_bg1.png" xy="0,0" size="241,75"/>
-    <text id="n3_nnz5" name="n3" xy="0,0" size="241,75" fontSize="20" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="登录"/>
+    <text id="n3_nnz5" name="n3" xy="2,0" size="241,75" fontSize="28" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="Login"/>
   </displayList>
   <Button/>
 </component>

+ 2 - 2
art/fgui/assets/game/UIUser/component/Component_goto.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="241,75" extention="Button">
-  <controller name="c1" alias="切换按钮" exported="true" pages="3,goLog,1,goReg" selected="1"/>
+  <controller name="c1" alias="切换按钮" exported="true" pages="3,goLog,1,goReg" selected="0"/>
   <displayList>
     <image id="n0_nnz5" name="n0" src="nnz5v588" fileName="UIUser/asset/btn_bg1.png" xy="0,0"/>
-    <text id="n1_nnz5" name="n_goto" xy="10,15" size="220,45" fontSize="28" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="去注册">
+    <text id="n1_nnz5" name="n_goto" xy="10,15" size="220,45" fontSize="28" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="去登录">
       <gearText controller="c1" pages="3,1" values="去登录|去注册"/>
     </text>
   </displayList>

+ 11 - 6
art/fgui/assets/game/package.xml

@@ -112,7 +112,6 @@
     <image id="wehi3ua" name="ty_tc1_1.png" path="/UIGameEnd/asset/"/>
     <image id="wehi3ub" name="js_bz1.png" path="/UIGameEnd/asset/"/>
     <image id="wehi3uc" name="bj.jpg" path="/UIGameEnd/asset/" atlas="alone_npot"/>
-    <image id="wehi3ud" name="结算界面1.png" path="/__示意图/"/>
     <component id="wehi3ue" name="cancelBtn2.xml" path="/_sharecomponent/"/>
     <component id="wehi3uf" name="shareBtn2.xml" path="/_sharecomponent/" favorite="true"/>
     <component id="wehi3ug" name="UIMoney.xml" path="/UIMoney/" favorite="true"/>
@@ -125,9 +124,7 @@
     <component id="wehi3un" name="MoneyBtn.xml" path="/_sharecomponent/"/>
     <component id="wehi3up" name="UIMoneyBtn.xml" path="/_sharecomponent/"/>
     <image id="wehi3uq" name="ty_dk.png" path="/_shareasset/"/>
-    <image id="wehi3ur" name="js_tb_sl.png" path="/__示意图/"/>
     <image id="wehi3us" name="js_tb_sb.png" path="/UIGameEnd/asset/"/>
-    <image id="wehi3ut" name="hbimg2.png" path="/__示意图/"/>
     <image id="brgy3uu" name="zs4.png" path="/UIGameEnd/asset/" scale="9grid" scale9grid="39,14,14,11" duplicatePadding="true"/>
     <component id="brgy3uv" name="Airframe.xml" path="/_sharecomponent/"/>
     <image id="brgy3uw" name="bq4_5.png" path="/UIWordsList/UIVideoShare/asset/" scale="9grid" scale9grid="5,4,10,8"/>
@@ -191,7 +188,6 @@
     <image id="n43d3wj" name="zjm_zs4_3.png" path="/UIMain/asset/"/>
     <image id="n43d3wk" name="zjm_zs5.png" path="/UIMain/asset/"/>
     <image id="n43d3wl" name="zjm_zs5_1.png" path="/UIMain/asset/"/>
-    <image id="n43d3wm" name="主界面1.png" path="/__示意图/"/>
     <image id="n43d3wn" name="g3.png" path="/UIMain/asset/"/>
     <image id="n43d3wo" name="ty_dk.png" path="/UIMain/asset/"/>
     <image id="n43d3wp" name="ty_fh.png" path="/UIMain/asset/"/>
@@ -1268,11 +1264,9 @@
     <image id="ry45v571" name="全球争霸.png" path="/UIMain/asset/new2025/"/>
     <image id="ry45v572" name="下-半透明黑底.png" path="/UIMain/asset/new2025/"/>
     <image id="ry45v573" name="234-back.png" path="/UIRepentProp/asset/"/>
-    <image id="ry45v574" name="hbimg2025.png" path="/__示意图/"/>
     <misc id="t5trv575" name="asset.zip" path="/UIInvitation/"/>
     <image id="r4l5v576" name="zjm_db6-old.png" path="/UIMain/asset/"/>
     <component id="r4l5v577" name="Component1302.xml" path="/UIMain/component/"/>
-    <movieclip id="qj9yv578" name="aaaaa.jta" path="/__示意图/"/>
     <image id="h498v579" name="234_2025.png" path="/UIRepentProp/asset/"/>
     <font id="d33kv57a" name="arial.ttf" path="/" renderMode="" samplePointSize="16"/>
     <component id="q5n8v57b" name="Component1303.xml" path="/UIGame/component/"/>
@@ -1306,6 +1300,17 @@
     <component id="nnz5v587" name="Button_login.xml" path="/UIUser/component/"/>
     <image id="nnz5v588" name="btn_bg1.png" path="/UIUser/asset/"/>
     <component id="nnz5v589" name="Component_goto.xml" path="/UIUser/component/"/>
+    <component id="p8p3v58b" name="Component1_exit.xml" path="/UIMain/component/"/>
+    <component id="p8p3v58c" name="Component_dl_zc.xml" path="/UIMain/component/"/>
+    <image id="p8p3v58d" name="input.png" path="/UIUser/asset/" scale="9grid" scale9grid="11,16,22,32"/>
+    <image id="p8p3v58e" name="bg.jpg" path="/UIMain/asset/new2025/yasuoDir/"/>
+    <movieclip id="p8p3v58f" name="aaaaa.jta" path="/__示意图/"/>
+    <image id="p8p3v58g" name="hbimg2.png" path="/__示意图/"/>
+    <image id="p8p3v58h" name="hbimg2025.png" path="/__示意图/"/>
+    <image id="p8p3v58i" name="js_tb_sl.png" path="/__示意图/"/>
+    <image id="p8p3v58j" name="主界面1.png" path="/__示意图/"/>
+    <image id="p8p3v58k" name="结算界面1.png" path="/__示意图/"/>
+    <image id="d6k9v58l" name="input.png" path="/UIMoyu/asset/" scale="9grid" scale9grid="11,16,22,32"/>
   </resources>
   <publish name="game" path="..\..\client\laya\bin\asset\fgui" packageCount="2" genCode="true" codePath="..\..\client\laya\src\fgui\res"/>
 </packageDescription>

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


BIN
client/laya/bin/asset/fgui/game_atlas0.png


BIN
client/laya/bin/asset/fgui/game_atlas0_1.png


BIN
client/laya/bin/asset/fgui/game_atlas0_2.png


+ 441 - 71
client/laya/bin/js/bundle.js

@@ -50,6 +50,7 @@
     let CHANGE_SECRETARY = "CHANGE_SECRETARY";
     let POWER_CHANGE = "POWER_CHANGE";
     let POWER_TIME = "POWER_TIME";
+    let keyForLoginInfo = "userInfo";
     let baseHeadUrl = "https://mygame1.tangro.cn/headimg/";
     let poolKey = {
         inHoleEft: "inHoleEft",
@@ -148,6 +149,7 @@
         CHANGE_SECRETARY: CHANGE_SECRETARY,
         POWER_CHANGE: POWER_CHANGE,
         POWER_TIME: POWER_TIME,
+        keyForLoginInfo: keyForLoginInfo,
         baseHeadUrl: baseHeadUrl,
         poolKey: poolKey,
         get GameMode () { return GameMode; },
@@ -870,7 +872,7 @@
             }
         }
         sendPost2025(reqUrl, data, call) {
-            let isDev = false;
+            let isDev = true;
             let urlTop = "https://api.kessongame.site/";
             let urlMid = urlTop + "prod-api/api/game/";
             if (isDev) {
@@ -880,7 +882,7 @@
             let url = urlMid + reqUrl;
             if (reqUrl == "registerForApp" || reqUrl == "loginForApp") {
                 if (isDev) {
-                    url = urlMid + reqUrl;
+                    url = urlTop + reqUrl;
                 }
                 else {
                     url = urlTop + "prod-api/" + reqUrl;
@@ -893,7 +895,7 @@
             httpObj.send(url, data, 'post', 'text', ["Content-Type", "application/json; charset=UTF-8"]);
             function errorHandler(error) {
                 if (call) {
-                    call("{'msg':'网络错误','code':500}");
+                    call("{'msg':'Network exception','code':500}");
                 }
                 else {
                     alert("Tip:Please check your network connection.");
@@ -4372,6 +4374,9 @@
             this.talkNode = (this.getChild("talkNode"));
             this.n83 = (this.getChild("n83"));
             this.n84 = (this.getChild("n84"));
+            this.n_Logout = (this.getChild("n_Logout"));
+            this.n_zhuCe = (this.getChild("n_zhuCe"));
+            this.n_dengLu = (this.getChild("n_dengLu"));
         }
     }
     ui_UIMain.URL = "ui://isxx5ak7kt443qc";
@@ -6521,6 +6526,196 @@
     }
     UIModeSelection.uiName = "UIModeSelection";
 
+    class ui_UIReg extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "UIReg"));
+        }
+        onConstruct() {
+            this.n38 = (this.getChild("n38"));
+            this.n9 = (this.getChild("n9"));
+            this.btn_reg = (this.getChild("btn_reg"));
+            this.n14 = (this.getChild("n14"));
+            this.n15 = (this.getChild("n15"));
+            this.n34 = (this.getChild("n34"));
+            this.btn_gotoLogin = (this.getChild("btn_gotoLogin"));
+            this.closeBtn = (this.getChild("closeBtn"));
+            this.n39 = (this.getChild("n39"));
+            this.n40 = (this.getChild("n40"));
+            this.txt_ua = (this.getChild("txt_ua"));
+            this.n41 = (this.getChild("n41"));
+            this.txt_up1 = (this.getChild("txt_up1"));
+            this.n42 = (this.getChild("n42"));
+            this.txt_up2 = (this.getChild("txt_up2"));
+            this.lab_tip = (this.getChild("lab_tip"));
+        }
+    }
+    ui_UIReg.URL = "ui://isxx5ak7bobav57v";
+
+    class ui_UILogin extends fgui.GComponent {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "UILogin"));
+        }
+        onConstruct() {
+            this.n18 = (this.getChild("n18"));
+            this.n7 = (this.getChild("n7"));
+            this.btn_login = (this.getChild("btn_login"));
+            this.n5 = (this.getChild("n5"));
+            this.n6 = (this.getChild("n6"));
+            this.btn_gotoReg = (this.getChild("btn_gotoReg"));
+            this.lab_tip = (this.getChild("lab_tip"));
+            this.closeBtn = (this.getChild("closeBtn"));
+            this.n25 = (this.getChild("n25"));
+            this.txt_ua = (this.getChild("txt_ua"));
+            this.n27 = (this.getChild("n27"));
+            this.txt_up = (this.getChild("txt_up"));
+            this.n29 = (this.getChild("n29"));
+        }
+    }
+    ui_UILogin.URL = "ui://isxx5ak7bobav57u";
+
+    class UILogin extends UIBase {
+        constructor() {
+            super();
+        }
+        onConstructor() {
+            this.ui = ui_UILogin.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.closeSelf);
+            this.addUIClick(this.ui.btn_gotoReg, this.gotoRegPage);
+            this.addUIClick(this.ui.btn_login, this.userLogin);
+        }
+        show() {
+            super.show();
+            this.x = (Laya.stage.width - this.width) / 2;
+            this.y = (Laya.stage.height - this.height) / 2;
+        }
+        closeSelf() {
+            this.hide();
+        }
+        userLogin() {
+            this.ui.lab_tip.visible = false;
+            let ua = this.ui.txt_ua.text;
+            let up = this.ui.txt_up.text;
+            if (ua && up) {
+                xGame.uiMgr.Show(UIMsg, "Request in progress..");
+                let reqData = JSON.stringify({
+                    username: ua.trim(),
+                    password: up.trim(),
+                    fromMark: 'app_game'
+                });
+                xGame.httpMgr.sendPost2025('loginForApp', reqData, (res) => {
+                    try {
+                        this.ui.lab_tip.visible = true;
+                        console.log('zh:res = ' + JSON.stringify(res));
+                        let code = res.code;
+                        let msg = res.msg;
+                        this.ui.lab_tip.text = msg;
+                        xGame.uiMgr.Show(UIMsg, msg);
+                        if (code == 200) {
+                            let keyStr = 'userInfo';
+                            let jsonStr = {
+                                "username": res.username,
+                                "token": res.token
+                            };
+                            LocalStorageManager.setItem(keyStr, jsonStr);
+                            this.ui.lab_tip.color = "#FFFFFF";
+                        }
+                        else {
+                            this.ui.lab_tip.color = "#FF0000";
+                        }
+                    }
+                    catch (error) {
+                        console.log('error=' + error);
+                        alert(error);
+                    }
+                    finally {
+                    }
+                });
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg, "Missing information!");
+            }
+        }
+        gotoRegPage() {
+            this.closeSelf();
+            xGame.uiMgr.Show(UIReg);
+        }
+    }
+    UILogin.uiName = "UILogin";
+
+    class UIReg extends UIBase {
+        constructor() {
+            super();
+        }
+        onConstructor() {
+            this.ui = ui_UIReg.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.closeSelf);
+            this.addUIClick(this.ui.btn_reg, this.regUser);
+            this.addUIClick(this.ui.btn_gotoLogin, this.gotoLogin);
+        }
+        show() {
+            super.show();
+            this.x = (Laya.stage.width - this.width) / 2;
+            this.y = (Laya.stage.height - this.height) / 2;
+        }
+        closeSelf() {
+            this.hide();
+        }
+        regUser() {
+            this.ui.lab_tip.visible = false;
+            let ua = this.ui.txt_ua.text;
+            let up1 = this.ui.txt_up1.text;
+            let up2 = this.ui.txt_up2.text;
+            if (ua && up1 && up2 && up1 == up2) {
+                this.ui.closeBtn.visible = false;
+                xGame.uiMgr.Show(UIMsg, "Request in progress..");
+                let reqData = JSON.stringify({
+                    username: ua.trim(),
+                    password: up1.trim(),
+                    fromMark: 'app_game'
+                });
+                xGame.httpMgr.sendPost2025('registerForApp', reqData, (res) => {
+                    try {
+                        this.ui.lab_tip.visible = true;
+                        console.log('zh:res = ' + JSON.stringify(res));
+                        let code = res.code;
+                        let msg = res.msg;
+                        this.ui.lab_tip.text = msg;
+                        xGame.uiMgr.Show(UIMsg, msg);
+                        if (code == 200) {
+                            this.ui.lab_tip.color = "#FFFFFF";
+                        }
+                        else {
+                            this.ui.lab_tip.color = "#FF0000";
+                        }
+                    }
+                    catch (error) {
+                        console.log('error=' + error);
+                        alert(error);
+                    }
+                    finally {
+                    }
+                });
+            }
+            else {
+                if (up1 != up2) {
+                    xGame.uiMgr.Show(UIMsg, "Password mismatch!");
+                }
+                else {
+                    xGame.uiMgr.Show(UIMsg, "Missing information!");
+                }
+            }
+        }
+        gotoLogin() {
+            this.closeSelf();
+            xGame.uiMgr.Show(UILogin);
+        }
+    }
+    UIReg.uiName = "UIReg";
+
     class ui_UIGetAward extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "UIGetAward"));
@@ -6826,9 +7021,39 @@
                 xGame.common.showGirlTalkPop(1, this.ui.talkNode, this.ui.talkNode.womanTxt);
                 console.log("zh:播放小秘书每天语音");
             }
+            this.onGetUserInfo();
             this.ui.n83.visible = false;
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                const d = LocalStorageManager.getItem(keyForLoginInfo);
+                let ua = d.username;
+                this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+            }
+            this.c_btn_for_user();
             window['nativeCallJs'] = this.nativeCallJs.bind(this);
         }
+        Logout() {
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                LocalStorageManager.removeItem(keyForLoginInfo);
+                this.freshUser();
+            }
+        }
+        gotoLogin() {
+            xGame.uiMgr.Show(UILogin);
+        }
+        gotoRegUser() {
+            xGame.uiMgr.Show(UIReg);
+        }
+        c_btn_for_user() {
+            this.ui.n_Logout.visible = false;
+            this.ui.n_dengLu.visible = false;
+            this.ui.n_zhuCe.visible = false;
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                this.ui.n_Logout.visible = true;
+            }
+            else {
+                this.ui.n_dengLu.visible = true;
+            }
+        }
         changeSecretary(curUse) {
             let name = cfgTable.secretaryshopData[curUse + 1].spine;
             xGame.common.secretary && xGame.common.secretary.dispose();
@@ -6866,6 +7091,9 @@
             this.addUIClick(this.ui.signBtn, this.openSignView);
             this.addUIClick(this.ui.drawBtn, this.openDrawView);
             this.addUIClick(this.ui.rankBtn, this.openRanking);
+            this.addUIClick(this.ui.n_Logout, this.Logout);
+            this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
+            this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
         }
         show(showFailWords) {
             super.show();
@@ -7067,22 +7295,27 @@
             else {
                 Moyu.initUser(this, this.freshUser, force);
             }
-            if (!Moyu.hasUserInfo) {
-                let user = Moyu.getUserInfo();
-                user.headIcon = 'res/ty_touxiang.png';
-            }
             this.freshUser();
-            console.log('zh: 进reg');
         }
         freshUser() {
             let user = Moyu.getUserInfo();
             if (!user.isAuth) {
                 user.headIcon = 'res/ty_touxiang.png';
             }
-            else
+            else {
                 DataMgr.upRankData();
+            }
             this.ui.headNode.nameTxt.text = xGame.tools.reviseString(user.nickName, 16);
             xGame.common.createHead(this.ui.headNode.headRoot.headImg, user.headIcon);
+            let keyStr = keyForLoginInfo;
+            if (LocalStorageManager.hasJosnKey(keyStr)) {
+                const d = LocalStorageManager.getItem(keyStr);
+                let ua = d.username;
+                this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+            }
+            else {
+            }
+            this.c_btn_for_user();
         }
         interuptSecretary() {
             Laya.timer.clearAll(this);
@@ -12235,51 +12468,6 @@
     }
     ui_SignNormal.URL = "ui://isxx5ak7bf9jv4jv";
 
-    class ui_UILogin extends fgui.GComponent {
-        static createInstance() {
-            return (fgui.UIPackage.createObject("game", "UILogin"));
-        }
-        onConstruct() {
-            this.n7 = (this.getChild("n7"));
-            this.n0 = (this.getChild("n0"));
-            this.btn_login = (this.getChild("btn_login"));
-            this.closeBtn = (this.getChild("closeBtn"));
-            this.n5 = (this.getChild("n5"));
-            this.n6 = (this.getChild("n6"));
-            this.n10 = (this.getChild("n10"));
-            this.n12 = (this.getChild("n12"));
-            this.btn_gotoReg = (this.getChild("btn_gotoReg"));
-            this.lab_tip = (this.getChild("lab_tip"));
-            this.txt_ua = (this.getChild("txt_ua"));
-            this.txt_up = (this.getChild("txt_up"));
-        }
-    }
-    ui_UILogin.URL = "ui://isxx5ak7bobav57u";
-
-    class ui_UIReg extends fgui.GComponent {
-        static createInstance() {
-            return (fgui.UIPackage.createObject("game", "UIReg"));
-        }
-        onConstruct() {
-            this.n9 = (this.getChild("n9"));
-            this.closeBtn = (this.getChild("closeBtn"));
-            this.btn_reg = (this.getChild("btn_reg"));
-            this.n14 = (this.getChild("n14"));
-            this.n15 = (this.getChild("n15"));
-            this.n27 = (this.getChild("n27"));
-            this.n26 = (this.getChild("n26"));
-            this.txt_ua = (this.getChild("txt_ua"));
-            this.n29 = (this.getChild("n29"));
-            this.txt_up1 = (this.getChild("txt_up1"));
-            this.n32 = (this.getChild("n32"));
-            this.txt_up2 = (this.getChild("txt_up2"));
-            this.n34 = (this.getChild("n34"));
-            this.lab_tip = (this.getChild("lab_tip"));
-            this.btn_gotoLogin = (this.getChild("btn_gotoLogin"));
-        }
-    }
-    ui_UIReg.URL = "ui://isxx5ak7bobav57v";
-
     class ui_Button_reg extends fgui.GButton {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "Button_reg"));
@@ -13079,16 +13267,6 @@
     }
     ui_Component63.URL = "ui://isxx5ak7h657452";
 
-    class ui_Component_close extends fgui.GComponent {
-        static createInstance() {
-            return (fgui.UIPackage.createObject("game", "Component_close"));
-        }
-        onConstruct() {
-            this.n5 = (this.getChild("n5"));
-        }
-    }
-    ui_Component_close.URL = "ui://isxx5ak7hgftv580";
-
     class ui_topNode extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "topNode"));
@@ -14605,6 +14783,17 @@
     }
     ui_ranking_com13.URL = "ui://isxx5ak7p7rrv4qa";
 
+    class ui_Component_dl_zc extends fgui.GButton {
+        static createInstance() {
+            return (fgui.UIPackage.createObject("game", "Component_dl_zc"));
+        }
+        onConstruct() {
+            this.c1 = this.getController("c1");
+            this.n0 = (this.getChild("n0"));
+        }
+    }
+    ui_Component_dl_zc.URL = "ui://isxx5ak7p8p3v58c";
+
     class ui_Component122 extends fgui.GComponent {
         static createInstance() {
             return (fgui.UIPackage.createObject("game", "Component122"));
@@ -15700,7 +15889,6 @@
             fgui.UIObjectFactory.setExtension(ui_RulerNode.URL, ui_RulerNode);
             fgui.UIObjectFactory.setExtension(ui_Component108.URL, ui_Component108);
             fgui.UIObjectFactory.setExtension(ui_Component63.URL, ui_Component63);
-            fgui.UIObjectFactory.setExtension(ui_Component_close.URL, ui_Component_close);
             fgui.UIObjectFactory.setExtension(ui_UIMsg.URL, ui_UIMsg);
             fgui.UIObjectFactory.setExtension(ui_topNode.URL, ui_topNode);
             fgui.UIObjectFactory.setExtension(ui_selfProgress.URL, ui_selfProgress);
@@ -15826,6 +16014,7 @@
             fgui.UIObjectFactory.setExtension(ui_ranking_com10.URL, ui_ranking_com10);
             fgui.UIObjectFactory.setExtension(ui_ranking_com11.URL, ui_ranking_com11);
             fgui.UIObjectFactory.setExtension(ui_ranking_com13.URL, ui_ranking_com13);
+            fgui.UIObjectFactory.setExtension(ui_Component_dl_zc.URL, ui_Component_dl_zc);
             fgui.UIObjectFactory.setExtension(ui_Component122.URL, ui_Component122);
             fgui.UIObjectFactory.setExtension(ui_skillItem.URL, ui_skillItem);
             fgui.UIObjectFactory.setExtension(ui_Component26.URL, ui_Component26);
@@ -22312,6 +22501,149 @@
     }
     UIModeSelection$1.uiName = "UIModeSelection";
 
+    class UILogin$1 extends UIBase {
+        constructor() {
+            super();
+        }
+        onConstructor() {
+            this.ui = ui_UILogin.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.closeSelf);
+            this.addUIClick(this.ui.btn_gotoReg, this.gotoRegPage);
+            this.addUIClick(this.ui.btn_login, this.userLogin);
+        }
+        show() {
+            super.show();
+            this.x = (Laya.stage.width - this.width) / 2;
+            this.y = (Laya.stage.height - this.height) / 2;
+        }
+        closeSelf() {
+            this.hide();
+        }
+        userLogin() {
+            this.ui.lab_tip.visible = false;
+            let ua = this.ui.txt_ua.text;
+            let up = this.ui.txt_up.text;
+            if (ua && up) {
+                xGame.uiMgr.Show(UIMsg$1, "Request in progress..");
+                let reqData = JSON.stringify({
+                    username: ua.trim(),
+                    password: up.trim(),
+                    fromMark: 'app_game'
+                });
+                xGame.httpMgr.sendPost2025('loginForApp', reqData, (res) => {
+                    try {
+                        this.ui.lab_tip.visible = true;
+                        console.log('zh:res = ' + JSON.stringify(res));
+                        let code = res.code;
+                        let msg = res.msg;
+                        this.ui.lab_tip.text = msg;
+                        xGame.uiMgr.Show(UIMsg$1, msg);
+                        if (code == 200) {
+                            let keyStr = 'userInfo';
+                            let jsonStr = {
+                                "username": res.username,
+                                "token": res.token
+                            };
+                            LocalStorageManager.setItem(keyStr, jsonStr);
+                            this.ui.lab_tip.color = "#FFFFFF";
+                        }
+                        else {
+                            this.ui.lab_tip.color = "#FF0000";
+                        }
+                    }
+                    catch (error) {
+                        console.log('error=' + error);
+                        alert(error);
+                    }
+                    finally {
+                    }
+                });
+            }
+            else {
+                xGame.uiMgr.Show(UIMsg$1, "Missing information!");
+            }
+        }
+        gotoRegPage() {
+            this.closeSelf();
+            xGame.uiMgr.Show(UIReg$1);
+        }
+    }
+    UILogin$1.uiName = "UILogin";
+
+    class UIReg$1 extends UIBase {
+        constructor() {
+            super();
+        }
+        onConstructor() {
+            this.ui = ui_UIReg.createInstance();
+            this.contentPane = this.ui;
+            this.isEject = false;
+            this.addUIClick(this.ui.closeBtn, this.closeSelf);
+            this.addUIClick(this.ui.btn_reg, this.regUser);
+            this.addUIClick(this.ui.btn_gotoLogin, this.gotoLogin);
+        }
+        show() {
+            super.show();
+            this.x = (Laya.stage.width - this.width) / 2;
+            this.y = (Laya.stage.height - this.height) / 2;
+        }
+        closeSelf() {
+            this.hide();
+        }
+        regUser() {
+            this.ui.lab_tip.visible = false;
+            let ua = this.ui.txt_ua.text;
+            let up1 = this.ui.txt_up1.text;
+            let up2 = this.ui.txt_up2.text;
+            if (ua && up1 && up2 && up1 == up2) {
+                this.ui.closeBtn.visible = false;
+                xGame.uiMgr.Show(UIMsg$1, "Request in progress..");
+                let reqData = JSON.stringify({
+                    username: ua.trim(),
+                    password: up1.trim(),
+                    fromMark: 'app_game'
+                });
+                xGame.httpMgr.sendPost2025('registerForApp', reqData, (res) => {
+                    try {
+                        this.ui.lab_tip.visible = true;
+                        console.log('zh:res = ' + JSON.stringify(res));
+                        let code = res.code;
+                        let msg = res.msg;
+                        this.ui.lab_tip.text = msg;
+                        xGame.uiMgr.Show(UIMsg$1, msg);
+                        if (code == 200) {
+                            this.ui.lab_tip.color = "#FFFFFF";
+                        }
+                        else {
+                            this.ui.lab_tip.color = "#FF0000";
+                        }
+                    }
+                    catch (error) {
+                        console.log('error=' + error);
+                        alert(error);
+                    }
+                    finally {
+                    }
+                });
+            }
+            else {
+                if (up1 != up2) {
+                    xGame.uiMgr.Show(UIMsg$1, "Password mismatch!");
+                }
+                else {
+                    xGame.uiMgr.Show(UIMsg$1, "Missing information!");
+                }
+            }
+        }
+        gotoLogin() {
+            this.closeSelf();
+            xGame.uiMgr.Show(UILogin$1);
+        }
+    }
+    UIReg$1.uiName = "UIReg";
+
     class UITry$1 extends UIBase {
         constructor() {
             super();
@@ -22696,9 +23028,39 @@
                 xGame.common.showGirlTalkPop(1, this.ui.talkNode, this.ui.talkNode.womanTxt);
                 console.log("zh:播放小秘书每天语音");
             }
+            this.onGetUserInfo();
             this.ui.n83.visible = false;
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                const d = LocalStorageManager.getItem(keyForLoginInfo);
+                let ua = d.username;
+                this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+            }
+            this.c_btn_for_user();
             window['nativeCallJs'] = this.nativeCallJs.bind(this);
         }
+        Logout() {
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                LocalStorageManager.removeItem(keyForLoginInfo);
+                this.freshUser();
+            }
+        }
+        gotoLogin() {
+            xGame.uiMgr.Show(UILogin$1);
+        }
+        gotoRegUser() {
+            xGame.uiMgr.Show(UIReg$1);
+        }
+        c_btn_for_user() {
+            this.ui.n_Logout.visible = false;
+            this.ui.n_dengLu.visible = false;
+            this.ui.n_zhuCe.visible = false;
+            if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+                this.ui.n_Logout.visible = true;
+            }
+            else {
+                this.ui.n_dengLu.visible = true;
+            }
+        }
         changeSecretary(curUse) {
             let name = cfgTable.secretaryshopData[curUse + 1].spine;
             xGame.common.secretary && xGame.common.secretary.dispose();
@@ -22736,6 +23098,9 @@
             this.addUIClick(this.ui.signBtn, this.openSignView);
             this.addUIClick(this.ui.drawBtn, this.openDrawView);
             this.addUIClick(this.ui.rankBtn, this.openRanking);
+            this.addUIClick(this.ui.n_Logout, this.Logout);
+            this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
+            this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
         }
         show(showFailWords) {
             super.show();
@@ -22937,22 +23302,27 @@
             else {
                 Moyu.initUser(this, this.freshUser, force);
             }
-            if (!Moyu.hasUserInfo) {
-                let user = Moyu.getUserInfo();
-                user.headIcon = 'res/ty_touxiang.png';
-            }
             this.freshUser();
-            console.log('zh: 进reg');
         }
         freshUser() {
             let user = Moyu.getUserInfo();
             if (!user.isAuth) {
                 user.headIcon = 'res/ty_touxiang.png';
             }
-            else
+            else {
                 DataMgr.upRankData();
+            }
             this.ui.headNode.nameTxt.text = xGame.tools.reviseString(user.nickName, 16);
             xGame.common.createHead(this.ui.headNode.headRoot.headImg, user.headIcon);
+            let keyStr = keyForLoginInfo;
+            if (LocalStorageManager.hasJosnKey(keyStr)) {
+                const d = LocalStorageManager.getItem(keyStr);
+                let ua = d.username;
+                this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+            }
+            else {
+            }
+            this.c_btn_for_user();
         }
         interuptSecretary() {
             Laya.timer.clearAll(this);

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


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

@@ -52,7 +52,7 @@ export class HttpMgr {
      * post请求,参数待扩展
      */
     public sendPost2025(reqUrl, data, call) {
-        let isDev = false;//是否是开发环境
+        let isDev = true;//是否是开发环境
         // let urlStr ="https://api.kessongame.site/prod-api/api/game/";
         //////////////https://api.kessongame.site/prod-api/api/game/getClassicCfg
         let urlTop = "https://api.kessongame.site/";
@@ -64,7 +64,7 @@ export class HttpMgr {
         let url = urlMid + reqUrl;
         if (reqUrl == "registerForApp" || reqUrl == "loginForApp") {
             if (isDev) {
-                url = urlMid + reqUrl;
+                url = urlTop + reqUrl;
             } else {
                 url = urlTop + "prod-api/" + reqUrl;
             }
@@ -76,7 +76,7 @@ export class HttpMgr {
         httpObj.send(url, data, 'post', 'text', ["Content-Type", "application/json; charset=UTF-8"]);
         function errorHandler(error): void {
             if (call) {
-                call("{'msg':'网络错误','code':500}");//固定
+                call("{'msg':'Network exception','code':500}");//固定
             } else {
                 alert("Tip:Please check your network connection.");
             }

+ 4 - 0
client/laya/src/data/Define.ts

@@ -44,6 +44,10 @@ export let POWER_CHANGE = "POWER_CHANGE";
 /**体力时间戳改变 */
 export let POWER_TIME = "POWER_TIME";
 
+/**
+ * 账号登录,本地报错信息KEY
+ */
+export let keyForLoginInfo="userInfo";
 
 
 //url链接

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

@@ -41,6 +41,7 @@ export default class UIBase extends fairygui.Window {
     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);

+ 2 - 2
client/laya/src/fgui/res/game/gameBinder.ts

@@ -67,7 +67,6 @@ import ui_Component59 from "./ui_Component59";
 import ui_RulerNode from "./ui_RulerNode";
 import ui_Component108 from "./ui_Component108";
 import ui_Component63 from "./ui_Component63";
-import ui_Component_close from "./ui_Component_close";
 import ui_UIMsg from "./ui_UIMsg";
 import ui_topNode from "./ui_topNode";
 import ui_selfProgress from "./ui_selfProgress";
@@ -193,6 +192,7 @@ import ui_ranking_com9 from "./ui_ranking_com9";
 import ui_ranking_com10 from "./ui_ranking_com10";
 import ui_ranking_com11 from "./ui_ranking_com11";
 import ui_ranking_com13 from "./ui_ranking_com13";
+import ui_Component_dl_zc from "./ui_Component_dl_zc";
 import ui_Component122 from "./ui_Component122";
 import ui_skillItem from "./ui_skillItem";
 import ui_Component26 from "./ui_Component26";
@@ -338,7 +338,6 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_RulerNode.URL, ui_RulerNode);
 		fgui.UIObjectFactory.setExtension(ui_Component108.URL, ui_Component108);
 		fgui.UIObjectFactory.setExtension(ui_Component63.URL, ui_Component63);
-		fgui.UIObjectFactory.setExtension(ui_Component_close.URL, ui_Component_close);
 		fgui.UIObjectFactory.setExtension(ui_UIMsg.URL, ui_UIMsg);
 		fgui.UIObjectFactory.setExtension(ui_topNode.URL, ui_topNode);
 		fgui.UIObjectFactory.setExtension(ui_selfProgress.URL, ui_selfProgress);
@@ -464,6 +463,7 @@ export default class gameBinder {
 		fgui.UIObjectFactory.setExtension(ui_ranking_com10.URL, ui_ranking_com10);
 		fgui.UIObjectFactory.setExtension(ui_ranking_com11.URL, ui_ranking_com11);
 		fgui.UIObjectFactory.setExtension(ui_ranking_com13.URL, ui_ranking_com13);
+		fgui.UIObjectFactory.setExtension(ui_Component_dl_zc.URL, ui_Component_dl_zc);
 		fgui.UIObjectFactory.setExtension(ui_Component122.URL, ui_Component122);
 		fgui.UIObjectFactory.setExtension(ui_skillItem.URL, ui_skillItem);
 		fgui.UIObjectFactory.setExtension(ui_Component26.URL, ui_Component26);

+ 0 - 15
client/laya/src/fgui/res/game/ui_Component_close.ts

@@ -1,15 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-export default class ui_Component_close extends fgui.GComponent {
-
-	public n5:fgui.GImage;
-	public static URL:string = "ui://isxx5ak7hgftv580";
-
-	public static createInstance():ui_Component_close {
-		return <ui_Component_close>(fgui.UIPackage.createObject("game", "Component_close"));
-	}
-
-	protected onConstruct():void {
-		this.n5 = <fgui.GImage>(this.getChild("n5"));
-	}
-}

+ 2 - 0
client/laya/src/fgui/res/game/ui_Component_daoju.ts

@@ -2,6 +2,7 @@
 
 export default class ui_Component_daoju extends fgui.GComponent {
 
+	public n0:fgui.GList;
 	public static URL:string = "ui://isxx5ak7nmu9v57t";
 
 	public static createInstance():ui_Component_daoju {
@@ -9,5 +10,6 @@ export default class ui_Component_daoju extends fgui.GComponent {
 	}
 
 	protected onConstruct():void {
+		this.n0 = <fgui.GList>(this.getChild("n0"));
 	}
 }

+ 17 - 0
client/laya/src/fgui/res/game/ui_Component_dl_zc.ts

@@ -0,0 +1,17 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+export default class ui_Component_dl_zc extends fgui.GButton {
+
+	public c1:fgui.Controller;
+	public n0:fgui.GTextField;
+	public static URL:string = "ui://isxx5ak7p8p3v58c";
+
+	public static createInstance():ui_Component_dl_zc {
+		return <ui_Component_dl_zc>(fgui.UIPackage.createObject("game", "Component_dl_zc"));
+	}
+
+	protected onConstruct():void {
+		this.c1 = this.getController("c1");
+		this.n0 = <fgui.GTextField>(this.getChild("n0"));
+	}
+}

+ 11 - 9
client/laya/src/fgui/res/game/ui_UILogin.ts

@@ -1,23 +1,24 @@
 /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
 
 import ui_Button_login from "./ui_Button_login";
-import ui_Component_close from "./ui_Component_close";
 import ui_Component_goto from "./ui_Component_goto";
+import ui_Component86 from "./ui_Component86";
 
 export default class ui_UILogin extends fgui.GComponent {
 
+	public n18:fgui.GGraph;
 	public n7:fgui.GImage;
-	public n0:fgui.GTextInput;
 	public btn_login:ui_Button_login;
-	public closeBtn:ui_Component_close;
 	public n5:fgui.GTextField;
 	public n6:fgui.GTextField;
-	public n10:fgui.GGraph;
-	public n12:fgui.GGraph;
 	public btn_gotoReg:ui_Component_goto;
 	public lab_tip:fgui.GTextField;
+	public closeBtn:ui_Component86;
+	public n25:fgui.GImage;
 	public txt_ua:fgui.GTextInput;
+	public n27:fgui.GImage;
 	public txt_up:fgui.GTextInput;
+	public n29:fgui.GTextField;
 	public static URL:string = "ui://isxx5ak7bobav57u";
 
 	public static createInstance():ui_UILogin {
@@ -25,17 +26,18 @@ export default class ui_UILogin extends fgui.GComponent {
 	}
 
 	protected onConstruct():void {
+		this.n18 = <fgui.GGraph>(this.getChild("n18"));
 		this.n7 = <fgui.GImage>(this.getChild("n7"));
-		this.n0 = <fgui.GTextInput>(this.getChild("n0"));
 		this.btn_login = <ui_Button_login>(this.getChild("btn_login"));
-		this.closeBtn = <ui_Component_close>(this.getChild("closeBtn"));
 		this.n5 = <fgui.GTextField>(this.getChild("n5"));
 		this.n6 = <fgui.GTextField>(this.getChild("n6"));
-		this.n10 = <fgui.GGraph>(this.getChild("n10"));
-		this.n12 = <fgui.GGraph>(this.getChild("n12"));
 		this.btn_gotoReg = <ui_Component_goto>(this.getChild("btn_gotoReg"));
 		this.lab_tip = <fgui.GTextField>(this.getChild("lab_tip"));
+		this.closeBtn = <ui_Component86>(this.getChild("closeBtn"));
+		this.n25 = <fgui.GImage>(this.getChild("n25"));
 		this.txt_ua = <fgui.GTextInput>(this.getChild("txt_ua"));
+		this.n27 = <fgui.GImage>(this.getChild("n27"));
 		this.txt_up = <fgui.GTextInput>(this.getChild("txt_up"));
+		this.n29 = <fgui.GTextField>(this.getChild("n29"));
 	}
 }

+ 7 - 0
client/laya/src/fgui/res/game/ui_UIMain.ts

@@ -20,6 +20,7 @@ import ui_Component112 from "./ui_Component112";
 import ui_Component60 from "./ui_Component60";
 import ui_dh_zuanshi from "./ui_dh_zuanshi";
 import ui_Component141 from "./ui_Component141";
+import ui_Component_dl_zc from "./ui_Component_dl_zc";
 
 export default class ui_UIMain extends fgui.GComponent {
 
@@ -54,6 +55,9 @@ export default class ui_UIMain extends fgui.GComponent {
 	public talkNode:ui_Component60;
 	public n83:ui_dh_zuanshi;
 	public n84:ui_Component141;
+	public n_Logout:ui_Component_dl_zc;
+	public n_zhuCe:ui_Component_dl_zc;
+	public n_dengLu:ui_Component_dl_zc;
 	public static URL:string = "ui://isxx5ak7kt443qc";
 
 	public static createInstance():ui_UIMain {
@@ -92,5 +96,8 @@ export default class ui_UIMain extends fgui.GComponent {
 		this.talkNode = <ui_Component60>(this.getChild("talkNode"));
 		this.n83 = <ui_dh_zuanshi>(this.getChild("n83"));
 		this.n84 = <ui_Component141>(this.getChild("n84"));
+		this.n_Logout = <ui_Component_dl_zc>(this.getChild("n_Logout"));
+		this.n_zhuCe = <ui_Component_dl_zc>(this.getChild("n_zhuCe"));
+		this.n_dengLu = <ui_Component_dl_zc>(this.getChild("n_dengLu"));
 	}
 }

+ 17 - 15
client/laya/src/fgui/res/game/ui_UIReg.ts

@@ -1,26 +1,27 @@
 /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
 
-import ui_Component_close from "./ui_Component_close";
 import ui_Button_reg from "./ui_Button_reg";
 import ui_Component_goto from "./ui_Component_goto";
+import ui_Component86 from "./ui_Component86";
 
 export default class ui_UIReg extends fgui.GComponent {
 
+	public n38:fgui.GGraph;
 	public n9:fgui.GImage;
-	public closeBtn:ui_Component_close;
 	public btn_reg:ui_Button_reg;
 	public n14:fgui.GTextField;
 	public n15:fgui.GTextField;
-	public n27:fgui.GGraph;
-	public n26:fgui.GTextInput;
+	public n34:fgui.GTextField;
+	public btn_gotoLogin:ui_Component_goto;
+	public closeBtn:ui_Component86;
+	public n39:fgui.GTextField;
+	public n40:fgui.GImage;
 	public txt_ua:fgui.GTextInput;
-	public n29:fgui.GGraph;
+	public n41:fgui.GImage;
 	public txt_up1:fgui.GTextInput;
-	public n32:fgui.GGraph;
+	public n42:fgui.GImage;
 	public txt_up2:fgui.GTextInput;
-	public n34:fgui.GTextField;
 	public lab_tip:fgui.GTextField;
-	public btn_gotoLogin:ui_Component_goto;
 	public static URL:string = "ui://isxx5ak7bobav57v";
 
 	public static createInstance():ui_UIReg {
@@ -28,20 +29,21 @@ export default class ui_UIReg extends fgui.GComponent {
 	}
 
 	protected onConstruct():void {
+		this.n38 = <fgui.GGraph>(this.getChild("n38"));
 		this.n9 = <fgui.GImage>(this.getChild("n9"));
-		this.closeBtn = <ui_Component_close>(this.getChild("closeBtn"));
 		this.btn_reg = <ui_Button_reg>(this.getChild("btn_reg"));
 		this.n14 = <fgui.GTextField>(this.getChild("n14"));
 		this.n15 = <fgui.GTextField>(this.getChild("n15"));
-		this.n27 = <fgui.GGraph>(this.getChild("n27"));
-		this.n26 = <fgui.GTextInput>(this.getChild("n26"));
+		this.n34 = <fgui.GTextField>(this.getChild("n34"));
+		this.btn_gotoLogin = <ui_Component_goto>(this.getChild("btn_gotoLogin"));
+		this.closeBtn = <ui_Component86>(this.getChild("closeBtn"));
+		this.n39 = <fgui.GTextField>(this.getChild("n39"));
+		this.n40 = <fgui.GImage>(this.getChild("n40"));
 		this.txt_ua = <fgui.GTextInput>(this.getChild("txt_ua"));
-		this.n29 = <fgui.GGraph>(this.getChild("n29"));
+		this.n41 = <fgui.GImage>(this.getChild("n41"));
 		this.txt_up1 = <fgui.GTextInput>(this.getChild("txt_up1"));
-		this.n32 = <fgui.GGraph>(this.getChild("n32"));
+		this.n42 = <fgui.GImage>(this.getChild("n42"));
 		this.txt_up2 = <fgui.GTextInput>(this.getChild("txt_up2"));
-		this.n34 = <fgui.GTextField>(this.getChild("n34"));
 		this.lab_tip = <fgui.GTextField>(this.getChild("lab_tip"));
-		this.btn_gotoLogin = <ui_Component_goto>(this.getChild("btn_gotoLogin"));
 	}
 }

+ 15 - 0
client/laya/src/ui/UILogin.ts

@@ -2,6 +2,9 @@ import { HttpMgr } from "../core/mgrs/HttpMgr";
 import UIBase from "../fgui/core/UIBase";
 import ui_UILogin from "../fgui/res/game/ui_UILogin";
 
+import { LocalStorageManager } from "../utils/LocalStorageManager";
+
+
 import ui_UIReg from "../fgui/res/game/ui_UIReg";
 import { xGame } from "../xGame";
 import UIMsg from "./UIMsg";
@@ -21,9 +24,14 @@ export default class UILogin extends UIBase {
         this.addUIClick(this.ui.closeBtn, this.closeSelf);
         this.addUIClick(this.ui.btn_gotoReg, this.gotoRegPage);
         this.addUIClick(this.ui.btn_login, this.userLogin);
+
+
     }
     public show(): void {
         super.show();
+        // 自定义居中逻辑
+        this.x = (Laya.stage.width - this.width) / 2;
+        this.y = (Laya.stage.height - this.height) / 2;
     }
     closeSelf() {
         this.hide();
@@ -49,6 +57,13 @@ export default class UILogin extends UIBase {
                     this.ui.lab_tip.text = msg;
                     xGame.uiMgr.Show(UIMsg, msg);
                     if (code == 200) {
+                        //console.log('zh:登录成功')
+                        let keyStr = 'userInfo';
+                        let jsonStr = {
+                            "username": res.username,
+                            "token": res.token
+                        }
+                        LocalStorageManager.setItem(keyStr, jsonStr);
                         this.ui.lab_tip.color = "#FFFFFF";
                     } else {
                         this.ui.lab_tip.color = "#FF0000";

+ 70 - 14
client/laya/src/ui/UIMain.ts

@@ -1,6 +1,6 @@
 import SpineMgr from "../core/mgrs/SpineMgr";
 import DataMgr from "../data/DataMgr";
-import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME } from "../data/Define";
+import { CHANGE_SECRETARY, GameMode, GET_USER_INFO, RESTART_GAME, keyForLoginInfo } from "../data/Define";
 import UIBase from "../fgui/core/UIBase";
 import ui_UIMain from "../fgui/res/game/ui_UIMain";
 import PlatMgr from "../game/PlatMgr";
@@ -25,6 +25,7 @@ import GlobalManager from "../utils/GlobalManager";
 import JSBridgeUtils from "../utils/JSBridgeUtils";
 import SkillDisplay from "./item/SkillDisplay";
 import UIReg from "./UIReg";
+import UILogin from "./UILogin";
 
 import UITry from "./UITry";
 import UIPower from "./UIPower";
@@ -159,8 +160,11 @@ export default class UIMain extends UIBase {
         xGame.eventMgr.on(RESTART_GAME, this, this.beginGame);
         xGame.eventMgr.on(GET_USER_INFO, this, this.onGetUserInfo);
         xGame.eventMgr.on(CHANGE_SECRETARY, this, this.changeSecretary);
+
+
         let curUse = DataMgr.getCurSecretary();
         this.changeSecretary(curUse);
+
         //
         //this.ui.rankBtn.visible = false;
         this.ui.talkNode.visible = false;
@@ -171,19 +175,55 @@ export default class UIMain extends UIBase {
             xGame.common.showGirlTalkPop(1, this.ui.talkNode, this.ui.talkNode.womanTxt);
             console.log("zh:播放小秘书每天语音");
         }
-
-
-
-        //  this.onGetUserInfo();
+        this.onGetUserInfo();
         this.ui.n83.visible = false;
         //万宁台球
         //Moyu.setShareInfo("8Ball Fury", ["台球", "台球", "桌球"], '2300002254');
 
+
+
+        if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+            const d = LocalStorageManager.getItem<{ username: string, token: string }>(keyForLoginInfo);
+            let ua = d.username;
+            this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+        }
+        this.c_btn_for_user();
+
         window['nativeCallJs'] = this.nativeCallJs.bind(this);
+    }
 
+    Logout() {
+        if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+            //const d = LocalStorageManager.getItem<{ username: string, token: string }>(keyForLoginInfo);
+            LocalStorageManager.removeItem(keyForLoginInfo);
+            this.freshUser();
+        }
+    }
+    gotoLogin() {
+       
+        xGame.uiMgr.Show(UILogin);
+        
+    }
 
+    gotoRegUser() {
+        xGame.uiMgr.Show(UIReg);
+    }
 
+    /**
+     * 登录注册退出
+     */
+    c_btn_for_user() {
+        this.ui.n_Logout.visible = false;
+        this.ui.n_dengLu.visible = false;
+        this.ui.n_zhuCe.visible = false;
+        if (LocalStorageManager.hasJosnKey(keyForLoginInfo)) {
+            this.ui.n_Logout.visible = true;
+        } else {
+            this.ui.n_dengLu.visible = true;
+        }
     }
+
+
     changeSecretary(curUse) {
         let name = cfgTable.secretaryshopData[curUse + 1].spine;
         xGame.common.secretary && xGame.common.secretary.dispose();
@@ -229,6 +269,13 @@ export default class UIMain extends UIBase {
         this.addUIClick(this.ui.drawBtn, this.openDrawView);
         this.addUIClick(this.ui.rankBtn, this.openRanking);
 
+        //退出登录
+        this.addUIClick(this.ui.n_Logout, this.Logout);
+        this.addUIClick(this.ui.n_dengLu, this.gotoLogin);
+        this.addUIClick(this.ui.n_zhuCe, this.gotoRegUser);
+
+
+
     }
     public show(showFailWords): void {
         super.show();
@@ -493,17 +540,16 @@ export default class UIMain extends UIBase {
         else {
             Moyu.initUser(this, this.freshUser, force)
         }
-        if (!Moyu.hasUserInfo) {
-            let user = Moyu.getUserInfo();
-            //user.nickName="我";
-            user.headIcon = 'res/ty_touxiang.png';
-            //console.log("未授权");
-        }
+        // if (!Moyu.hasUserInfo) {
+        //     let user = Moyu.getUserInfo();
+        //     //user.nickName="我";
+        //     user.headIcon = 'res/ty_touxiang.png';
+        //     //console.log("未授权");
+        // }
         this.freshUser();
 
 
-        console.log('zh: 进reg')
-        xGame.uiMgr.Show(UIReg);
+
 
     }
     freshUser() {
@@ -511,10 +557,20 @@ export default class UIMain extends UIBase {
         if (!user.isAuth) {
             user.headIcon = 'res/ty_touxiang.png';
         }
-        else
+        else {
             DataMgr.upRankData();
+        }
         this.ui.headNode.nameTxt.text = xGame.tools.reviseString(user.nickName, 16);
         xGame.common.createHead(this.ui.headNode.headRoot.headImg, user.headIcon);
+        let keyStr = keyForLoginInfo;
+        if (LocalStorageManager.hasJosnKey(keyStr)) {
+            const d = LocalStorageManager.getItem<{ username: string, token: string }>(keyStr);
+            let ua = d.username;
+            this.ui.headNode.nameTxt.text = xGame.tools.reviseString(ua, 16);
+        } else {
+
+        }
+        this.c_btn_for_user();
     }
     interuptSecretary() {
         Laya.timer.clearAll(this);

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

@@ -23,6 +23,9 @@ export default class UIReg extends UIBase {
     }
     public show(): void {
         super.show();
+        // 自定义居中逻辑
+        this.x = (Laya.stage.width - this.width) / 2;
+        this.y = (Laya.stage.height - this.height) / 2;
     }
     closeSelf() {
         this.hide();

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