guodong преди 1 година
родител
ревизия
01f977bf4d
променени са 2 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 8 4
      GameClient/Assets/Game/HotUpdate/GameConfig.cs
  2. 1 0
      GameClient/Assets/Game/HotUpdate/Views/RoleInfo/SettingView.cs

+ 8 - 4
GameClient/Assets/Game/HotUpdate/GameConfig.cs

@@ -1,7 +1,4 @@
-using System.Collections;
-using ET;
-using LitJson;
-using UnityEngine;
+using LitJson;
 
 namespace GFGGame
 {
@@ -24,6 +21,8 @@ namespace GFGGame
         public static long openTime = 0;
         public static int tsStatus;
         public static int tsServer;
+        //兑换码
+        public static int code;
 
         public static void InitData(string json)
         {
@@ -45,6 +44,10 @@ namespace GFGGame
             {
                 tsServer = int.Parse(result.tsServer);
             }
+            if(!string.IsNullOrEmpty(result.code))
+            {
+                code = int.Parse(result.code);
+            }
             GameConfig.logApiReportUrl = LauncherConfig.logApiRootUrl + "ReportGet";
         }
 
@@ -55,6 +58,7 @@ namespace GFGGame
             public string openTime;
             public string tsStatus;
             public string tsServer;
+            public string code;
         }
     }
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/SettingView.cs

@@ -74,6 +74,7 @@ namespace GFGGame
                 _ui.m_suit.Play();
                 _ui.m_c1.SetSelectedIndex(0);
             }
+            _ui.m_btnGiftCode.target.visible = GameConfig.code == 0;
         }
 
         protected override void OnHide()