查看成员列表,有权限设置禁止进入房间后,同步所有显示
parent
82bf2e5950
commit
2411897efa
|
|
@ -22,6 +22,7 @@ GroupMgrEvent = {
|
||||||
OnFamilyReflash = "OnFamilyReflash",
|
OnFamilyReflash = "OnFamilyReflash",
|
||||||
OnFamilyRoomReflash = "OnFamilyRoomReflash",
|
OnFamilyRoomReflash = "OnFamilyRoomReflash",
|
||||||
OnFamilyMemberOut = "OnFamilyMemberOut",
|
OnFamilyMemberOut = "OnFamilyMemberOut",
|
||||||
|
OnRefNumberBan = "OnRefNumberBan"
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupMgrController = {
|
GroupMgrController = {
|
||||||
|
|
@ -65,6 +66,7 @@ function GroupMgrController.new()
|
||||||
self._eventmap[Protocol.WEB_FG_REFLASH] = self.FG_Data_Family_Reflash
|
self._eventmap[Protocol.WEB_FG_REFLASH] = self.FG_Data_Family_Reflash
|
||||||
self._eventmap[Protocol.WEB_FG_MEMBER_OUT] = self.OnMemberOut
|
self._eventmap[Protocol.WEB_FG_MEMBER_OUT] = self.OnMemberOut
|
||||||
self._eventmap[Protocol.WEB_FG_MEMBER_ONLINE] = self.OnMemberOnline
|
self._eventmap[Protocol.WEB_FG_MEMBER_ONLINE] = self.OnMemberOnline
|
||||||
|
self._eventmap[Protocol.FGMGR_EVT_Ref_NumberBan] = self.OnRefNumberBan
|
||||||
-- self:connect(callback)
|
-- self:connect(callback)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
@ -86,7 +88,6 @@ end
|
||||||
|
|
||||||
----------------------请求------------------------------------
|
----------------------请求------------------------------------
|
||||||
function M:connect(host, groupId, callback)
|
function M:connect(host, groupId, callback)
|
||||||
|
|
||||||
if self.connecting then
|
if self.connecting then
|
||||||
self:disconnect()
|
self:disconnect()
|
||||||
end
|
end
|
||||||
|
|
@ -604,6 +605,16 @@ function M:OnMemberOnline(evt_data)
|
||||||
DispatchEvent(self._dispatcher, GroupMgrEvent.OnMemberState, evt_data)
|
DispatchEvent(self._dispatcher, GroupMgrEvent.OnMemberState, evt_data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:OnRefNumberBan(evt_data)
|
||||||
|
local tem = {}
|
||||||
|
tem.uid = evt_data.tagId
|
||||||
|
tem.ban = evt_data.ban
|
||||||
|
|
||||||
|
local group = DataManager.groups:get(self.groupId)
|
||||||
|
group:addMember(tem)
|
||||||
|
DispatchEvent(self._dispatcher, GroupMgrEvent.OnRefNumberBan, evt_data)
|
||||||
|
end
|
||||||
|
|
||||||
function M:PopEvent()
|
function M:PopEvent()
|
||||||
local _cacheEvent = self._cacheEvent
|
local _cacheEvent = self._cacheEvent
|
||||||
if (_cacheEvent:Count() > 0) then
|
if (_cacheEvent:Count() > 0) then
|
||||||
|
|
|
||||||
|
|
@ -424,6 +424,8 @@ Protocol = {
|
||||||
FGMGR_EVT_Update_Assistant = "update_assistant",
|
FGMGR_EVT_Update_Assistant = "update_assistant",
|
||||||
-- 助理刷新界面推送
|
-- 助理刷新界面推送
|
||||||
FGMGR_EVT_Push_Assistant = "push_assistant",
|
FGMGR_EVT_Push_Assistant = "push_assistant",
|
||||||
|
-- 刷新成员列表
|
||||||
|
FGMGR_EVT_Ref_NumberBan = "13010",
|
||||||
--end::::::::::::::牌友圈协议::::::::::::::::::::
|
--end::::::::::::::牌友圈协议::::::::::::::::::::
|
||||||
|
|
||||||
-------------------Game ----------------------------
|
-------------------Game ----------------------------
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ end
|
||||||
|
|
||||||
function M:Show(group)
|
function M:Show(group)
|
||||||
self:Reflash(group)
|
self:Reflash(group)
|
||||||
|
local _mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||||||
|
_mgr_ctr:AddEventListener("OnRefNumberBan", handler(self, self.RefrenMemberCallback))
|
||||||
BaseView.Show(self)
|
BaseView.Show(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -111,6 +112,7 @@ function M:TickNumberCallback(res)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:RefrenMemberCallback()
|
function M:RefrenMemberCallback()
|
||||||
|
print("lingmeng OnRefNumberBan")
|
||||||
local numbers = self._group.members
|
local numbers = self._group.members
|
||||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
if #numbers == 0 then
|
if #numbers == 0 then
|
||||||
|
|
@ -129,4 +131,10 @@ function M:RefrenMemberCallback()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:Destroy()
|
||||||
|
local _mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||||||
|
_mgr_ctr:RemoveListener("OnRefNumberBan")
|
||||||
|
BaseView.Destroy(self)
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue