From 6feed6a28e5999b1f5ffff2709712ea81c71f171 Mon Sep 17 00:00:00 2001 From: 1076390229 <1076390229@qq.com> Date: Mon, 28 Jul 2025 22:01:34 +0800 Subject: [PATCH] =?UTF-8?q?setHome=E6=94=BE=E5=88=B0web=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/GameController.lua | 14 -------------- .../Game/Controller/GroupMgrController.lua | 10 ++++++++++ .../Game/View/Family/FamilyAuditNumber.lua | 6 ------ lua_probject/base_project/Main.lua | 12 ++++++------ 4 files changed, 16 insertions(+), 26 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua index ab2d2b1e..42682740 100644 --- a/lua_probject/base_project/Game/Controller/GameController.lua +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -662,20 +662,6 @@ function M:OnEvtMISSILE(msg) DispatchEvent(self._dispatcher, GameEvent.MISSILE, nil, msg) end --- 按home建 out在程序外 enter在程序内 -function M:FG_Set_Home(gameStatus) - local _client = ControllerManager.GameNetClinet - if not _client then - return - end - local _data = {} - _data.uid = DataManager.SelfUser.account_id - _data.gameStatus = gameStatus - _client:send(Protocol.GAME_SET_HOME, _data, function(res) - callback(res) - end) -end - function M:DispatchEventTuoGuan(p, isShow, t) DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, isShow, t) end diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua index d925f9b3..e70e938b 100644 --- a/lua_probject/base_project/Game/Controller/GroupMgrController.lua +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -440,6 +440,16 @@ function M:FG_Update_Assistant(groupId, tagId, callback) end) end +-- 按home建 out在程序外 enter在程序内 +function M:FG_Set_Home(gameStatus) + local _data = {} + _data.uid = DataManager.SelfUser.account_id + _data.gameStatus = gameStatus + self._mgr_client:send(Protocol.GAME_SET_HOME, _data, function(res) + callback(res) + end) +end + function M:OnEVT_Push_Assistant(evt_data) print("收到助理刷新推送") pt(evt_data) diff --git a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua index 919d48a6..9f8b2f0d 100644 --- a/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua +++ b/lua_probject/base_project/Game/View/Family/FamilyAuditNumber.lua @@ -63,16 +63,10 @@ function FamilyAuditNumber:Show(group) end end) - local mgr_ctr = ControllerManager.GetController(GroupMgrController) - mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply)) - BaseView.Show(self) end function FamilyAuditNumber:Close() - local mgr_ctr = ControllerManager.GetController(GroupMgrController) - mgr_ctr:RemoveEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply)) - BaseView.Close(self) end diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua index 9d62a6e6..994ed616 100644 --- a/lua_probject/base_project/Main.lua +++ b/lua_probject/base_project/Main.lua @@ -301,9 +301,9 @@ function OnApplicationPause() -- ViewUtil.CloseModalWait() ViewManager.OnApplicationPause() - local _gamectr = ControllerManager.GetController(GameController) - if _gamectr then - _gamectr:FG_Set_Home("out") + local gMgr = ControllerManager.GetController(GroupMgrController) + if gMgr then + gMgr:FG_Set_Home("out") end end @@ -311,9 +311,9 @@ end function OnApplicationActive() ViewManager.OnApplicationActive() - local _gamectr = ControllerManager.GetController(GameController) - if _gamectr then - _gamectr:FG_Set_Home("enter") + local gMgr = ControllerManager.GetController(GroupMgrController) + if gMgr then + gMgr:FG_Set_Home("enter") end end