查看成员列表,有权限设置禁止进入房间后,同步所有显示
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
|
||||||
|
|
@ -494,7 +495,7 @@ function M:FG_Data_ChatRoom(evt_data)
|
||||||
if evt_data.getData then
|
if evt_data.getData then
|
||||||
local group = DataManager.groups:get(evt_data.groupId)
|
local group = DataManager.groups:get(evt_data.groupId)
|
||||||
|
|
||||||
for _,recode in pairs(evt_data.records) do
|
for _, recode in pairs(evt_data.records) do
|
||||||
recode.players = json.decode(recode.totalScore)
|
recode.players = json.decode(recode.totalScore)
|
||||||
recode.maxRound = json.decode(recode.hpData).maxRound
|
recode.maxRound = json.decode(recode.hpData).maxRound
|
||||||
recode.pid = recode.groupPid
|
recode.pid = recode.groupPid
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -278,9 +278,9 @@ Protocol = {
|
||||||
-- 亲友圈房卡充值
|
-- 亲友圈房卡充值
|
||||||
WEB_FG_RECHARGE_DIAMO = "group/recharge_diamo",
|
WEB_FG_RECHARGE_DIAMO = "group/recharge_diamo",
|
||||||
-- 进入亲友圈
|
-- 进入亲友圈
|
||||||
WEB_FG_GET_ONLINE_MEMBER = "13005", --"get_online_member",
|
WEB_FG_GET_ONLINE_MEMBER = "13005", --"get_online_member",
|
||||||
-- 退出亲友圈
|
-- 退出亲友圈
|
||||||
WEB_FG_GET_OFFLINE_MEMBER = "13006", --"get_offline_member",
|
WEB_FG_GET_OFFLINE_MEMBER = "13006", --"get_offline_member",
|
||||||
-- 家族界面刷新推送
|
-- 家族界面刷新推送
|
||||||
WEB_FG_REFLASH = "11111",
|
WEB_FG_REFLASH = "11111",
|
||||||
|
|
||||||
|
|
@ -297,7 +297,7 @@ Protocol = {
|
||||||
WEB_FG_get_online_member = "group/get_online_member",
|
WEB_FG_get_online_member = "group/get_online_member",
|
||||||
|
|
||||||
-- 获取某个家族的详细信息
|
-- 获取某个家族的详细信息
|
||||||
WEB_FG_GET_GROUP_DETAIL = "group/get_groupDetail",
|
WEB_FG_GET_GROUP_DETAIL = "group/get_groupDetail",
|
||||||
-------------- group-log---------------------
|
-------------- group-log---------------------
|
||||||
-- 获取奖励日志
|
-- 获取奖励日志
|
||||||
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",
|
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",
|
||||||
|
|
@ -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 ----------------------------
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function FamilyInviteFamilyView.new()
|
||||||
setmetatable(M, { __index = BaseView })
|
setmetatable(M, { __index = BaseView })
|
||||||
local self = setmetatable({}, { __index = M })
|
local self = setmetatable({}, { __index = M })
|
||||||
self.class = "com_numberList"
|
self.class = "com_numberList"
|
||||||
BaseView.InitView(self ,"ui://Family/com_numberList")
|
BaseView.InitView(self, "ui://Family/com_numberList")
|
||||||
self:initBtn()
|
self:initBtn()
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
@ -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