浏览代码

好友返回模型重叠

zhaoyang 2 年之前
父节点
当前提交
89b8a54d07

+ 9 - 7
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -33,6 +33,11 @@ namespace GFGGame
         protected override void Init()
         {
             base.Init();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
             packageName = UI_FriendUI.PACKAGE_NAME;
             _ui = UI_FriendUI.Create();
             viewCom = _ui.target;
@@ -47,13 +52,7 @@ namespace GFGGame
             _ui.m_btnDelete.onClick.Add(OnBtnDeleteClick);
             _ui.m_btnAdd.onClick.Add(OnBtnAddClick);
             _ui.m_btnSendAll.onClick.Add(OnBtnSendAllClick);
-        }
-
-        protected override void OnInit()
-        {
-            base.OnInit();
-            _ui.m_btnBack.onClick.Add(OnHide);
-
+            _ui.m_btnBack.onClick.Add(GoBackFrom);
         }
         protected override void AddEventListener()
         {
@@ -115,6 +114,9 @@ namespace GFGGame
                 _sceneObject = null;
             }
             _ui.m_list.numItems = 0;
+        }
+        private void GoBackFrom()
+        {
             ViewManager.GoBackFrom(typeof(FriendView).FullName);
         }
         protected override void RemoveEventListener()

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

@@ -65,7 +65,7 @@ namespace GFGGame
         }
         private void OnBtnBackClick()
         {
-            ViewManager.GoBackFrom(typeof(OtherRoleInfoData).FullName);
+            ViewManager.GoBackFrom(typeof(OtherRoleInfoView).FullName);
         }
         protected override void RemoveEventListener()
         {