setHome放到web连接

master
1076390229 2025-07-28 22:01:34 +08:00
parent c0e4f8ce94
commit 6feed6a28e
4 changed files with 16 additions and 26 deletions

View File

@ -662,20 +662,6 @@ function M:OnEvtMISSILE(msg)
DispatchEvent(self._dispatcher, GameEvent.MISSILE, nil, msg) DispatchEvent(self._dispatcher, GameEvent.MISSILE, nil, msg)
end 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) function M:DispatchEventTuoGuan(p, isShow, t)
DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, isShow, t) DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p, isShow, t)
end end

View File

@ -440,6 +440,16 @@ function M:FG_Update_Assistant(groupId, tagId, callback)
end) end)
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) function M:OnEVT_Push_Assistant(evt_data)
print("收到助理刷新推送") print("收到助理刷新推送")
pt(evt_data) pt(evt_data)

View File

@ -63,16 +63,10 @@ function FamilyAuditNumber:Show(group)
end end
end) end)
local mgr_ctr = ControllerManager.GetController(GroupMgrController)
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply))
BaseView.Show(self) BaseView.Show(self)
end end
function FamilyAuditNumber:Close() function FamilyAuditNumber:Close()
local mgr_ctr = ControllerManager.GetController(GroupMgrController)
mgr_ctr:RemoveEventListener(GroupMgrEvent.OnNewApply, handler(self, self.OnNewApply))
BaseView.Close(self) BaseView.Close(self)
end end

View File

@ -301,9 +301,9 @@ function OnApplicationPause()
-- ViewUtil.CloseModalWait() -- ViewUtil.CloseModalWait()
ViewManager.OnApplicationPause() ViewManager.OnApplicationPause()
local _gamectr = ControllerManager.GetController(GameController) local gMgr = ControllerManager.GetController(GroupMgrController)
if _gamectr then if gMgr then
_gamectr:FG_Set_Home("out") gMgr:FG_Set_Home("out")
end end
end end
@ -311,9 +311,9 @@ end
function OnApplicationActive() function OnApplicationActive()
ViewManager.OnApplicationActive() ViewManager.OnApplicationActive()
local _gamectr = ControllerManager.GetController(GameController) local gMgr = ControllerManager.GetController(GroupMgrController)
if _gamectr then if gMgr then
_gamectr:FG_Set_Home("enter") gMgr:FG_Set_Home("enter")
end end
end end