Browse Source

登录整理

guodong 1 year ago
parent
commit
0d4c2478a6
1 changed files with 9 additions and 4 deletions
  1. 9 4
      GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

+ 9 - 4
GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

@@ -76,7 +76,6 @@ namespace GFGGame
             ServerInfosComponent serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
             ServerInfo recentlyServerInfo = serverInfosComponent.recentlyServerInfo;
             UpdateServer(recentlyServerInfo);
-            _ui.m_btnLogout.visible = false;
             //_ui.m_btnAgree.selected = LocalCache.GetBool(GameConst.LAST_LOGIN_IS_AGREE_KEY, false);
             _ui.m_btnAgree.selected = true;
 
@@ -98,8 +97,7 @@ namespace GFGGame
             if (!autoLogined)
             {
                 autoLogined = true;
-                _ui.m_btnTapLogin.visible = QDManager.IsTaptap;
-                _ui.m_btnStart.visible = !QDManager.IsTaptap;
+                ResetLoginButton();
                 TryLogin();
             }
         }
@@ -185,7 +183,7 @@ namespace GFGGame
 
         private void OnClickBtnLogout()
         {
-            _ui.m_btnLogout.visible = false;
+            ResetLoginButton();
             QDManager.Logout(false);
         }
         private void OnClickBtnAge()
@@ -211,5 +209,12 @@ namespace GFGGame
                 LoginController.GetRoles().Coroutine();
             }
         }
+
+        private void ResetLoginButton()
+        {
+            _ui.m_btnLogout.visible = false;
+            _ui.m_btnTapLogin.visible = QDManager.IsTaptap;
+            _ui.m_btnStart.visible = !QDManager.IsTaptap;
+        }
     }
 }