guodong 2 жил өмнө
parent
commit
93f9835c53

+ 2 - 9
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -189,9 +189,9 @@ namespace GFGGame
             GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();
             if (logout)
             {
-                Logout();
+                QDManager.Logout();
+                PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
             }
-            LoginController.OnLogout();
             ViewManager.Hide<GuideView>();
             ViewManager.Show<LoginView>(null, null, true);
         }
@@ -206,13 +206,6 @@ namespace GFGGame
             PoemGallerySProxy.ReqGalleryTheme().Coroutine();
         }
 
-        //注销
-        private static void Logout()
-        {
-            QDManager.Logout();
-            PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
-        }
-
         public static void GoBackToMainView()
         {
             MainDataManager.Instance.ViewType = 0;

+ 0 - 6
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -135,12 +135,6 @@ namespace GFGGame
             EventAgent.DispatchEvent(ConstMessage.LOGIN_FAIL);
         }
 
-        public static void OnLogout()
-        {
-            GameGlobal.zoneScene.GetComponent<SessionComponent>().AccountSession?.Dispose();
-            GameGlobal.zoneScene.GetComponent<SessionComponent>().GateSession?.Dispose();
-        }
-
         public static async ETTask Register(string account, string password, string name, string identityNum, string code)
         {
             ViewManager.Show<ModalStatusView>("注册中...");