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