用户小界面
|
|
@ -348,8 +348,8 @@ function M:FG_Get_Online_Member(groupId, callback)
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data.id = groupId
|
_data.id = groupId
|
||||||
_data.uid = DataManager.SelfUser.account_id
|
_data.uid = DataManager.SelfUser.account_id
|
||||||
local _client = ControllerManager.GroupClient
|
--local _client = ControllerManager.GroupClient
|
||||||
_client:send(Protocol.WEB_FG_GET_ONLINE_MEMBER, _data, function(res)
|
self._mgr_client:send(Protocol.WEB_FG_GET_ONLINE_MEMBER, _data, function(res)
|
||||||
callback(res)
|
callback(res)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
@ -359,8 +359,8 @@ function M:FG_Get_Offline_Member(groupId, callback)
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data.id = groupId
|
_data.id = groupId
|
||||||
_data.uid = DataManager.SelfUser.account_id
|
_data.uid = DataManager.SelfUser.account_id
|
||||||
local _client = ControllerManager.GroupClient
|
--local _client = ControllerManager.GroupClient
|
||||||
_client:send(Protocol.WEB_FG_GET_OFFLINE_MEMBER, _data, function(res)
|
self._mgr_client:send(Protocol.WEB_FG_GET_OFFLINE_MEMBER, _data, function(res)
|
||||||
callback(res)
|
callback(res)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,8 @@ Protocol = {
|
||||||
FGMGR_EVT_NEWCHAT = "12011",
|
FGMGR_EVT_NEWCHAT = "12011",
|
||||||
-- 设置是否允许观战
|
-- 设置是否允许观战
|
||||||
WEB_FG_SET_CANWATCH = "group/set_group_guest",
|
WEB_FG_SET_CANWATCH = "group/set_group_guest",
|
||||||
|
-- 家族成员在线状态推送
|
||||||
|
FGMGR_EVT_Member_State = "13007",
|
||||||
--end::::::::::::::牌友圈协议::::::::::::::::::::
|
--end::::::::::::::牌友圈协议::::::::::::::::::::
|
||||||
|
|
||||||
-------------------Game ----------------------------
|
-------------------Game ----------------------------
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ function FamilyEventView.new(root)
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData))
|
mgr_ctr:AddEventListener(GroupMgrEvent.ChatRoomData, handler(self, self._evtChatRoomData))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply))
|
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewApply, handler(self, self._evtOnNewApply))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord))
|
mgr_ctr:AddEventListener(GroupMgrEvent.OnNewRecord, handler(self, self._evtOnNewRecord))
|
||||||
|
mgr_ctr:AddEventListener(GroupMgrEvent.OnMemberState, handler(self, self._evtOnMemberState))
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -156,4 +157,10 @@ function M:_evtOnNewRecord(...)
|
||||||
view.com_FamilyChatRoom:OnNewChatRefalsh(arg[1])
|
view.com_FamilyChatRoom:OnNewChatRefalsh(arg[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:_evtOnMemberState(...)
|
||||||
|
print("_evtOnMemberState")
|
||||||
|
local arg = {...}
|
||||||
|
pt(arg)
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,16 @@ FamilyView = {}
|
||||||
|
|
||||||
local M = FamilyView
|
local M = FamilyView
|
||||||
|
|
||||||
local function FamilyOnline(groupId)
|
local function FamilyOnline(groupId, self)
|
||||||
local fgCtr = ControllerManager.GetController(GroupMgrController)
|
--localfgCtr = ControllerManager.GetController(GroupMgrController)
|
||||||
fgCtr:FG_Get_Online_Member(groupId, function(res)
|
self._mgr_ctr:FG_Get_Online_Member(groupId, function(res)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function FamilyOffline(groupId)
|
local function FamilyOffline(groupId, self)
|
||||||
local fgCtr = ControllerManager.GetController(GroupMgrController)
|
--local fgCtr = ControllerManager.GetController(GroupMgrController)
|
||||||
fgCtr:FG_Get_Offline_Member(groupId, function(res)
|
self._mgr_ctr:FG_Get_Offline_Member(groupId, function(res)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
@ -134,9 +134,8 @@ function M:InitCloseClick()
|
||||||
self.btn_close.onClick:Set(function()
|
self.btn_close.onClick:Set(function()
|
||||||
print("lingmengfamily", self.lastType, self.familyType.selectedIndex)
|
print("lingmengfamily", self.lastType, self.familyType.selectedIndex)
|
||||||
if not self.lastType or self.familyType.selectedIndex == 1 then
|
if not self.lastType or self.familyType.selectedIndex == 1 then
|
||||||
|
|
||||||
if self._group then
|
if self._group then
|
||||||
FamilyOffline(self._group.id)
|
FamilyOffline(self._group.id, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
ControllerManager.ChangeController(LoddyController)
|
ControllerManager.ChangeController(LoddyController)
|
||||||
|
|
@ -341,10 +340,6 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ConnetFamilyRoom(fgCtr, id)
|
function M:ConnetFamilyRoom(fgCtr, id)
|
||||||
if self._group then
|
|
||||||
FamilyOffline(self._group.id)
|
|
||||||
end
|
|
||||||
|
|
||||||
fgCtr:FG_EnterGroup(id, function(res)
|
fgCtr:FG_EnterGroup(id, function(res)
|
||||||
ViewUtil:CloseModalWait()
|
ViewUtil:CloseModalWait()
|
||||||
if res.ReturnCode ~= 0 then
|
if res.ReturnCode ~= 0 then
|
||||||
|
|
@ -359,7 +354,7 @@ function M:ConnetFamilyRoom(fgCtr, id)
|
||||||
pt(res)
|
pt(res)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
FamilyOnline(self._group.id)
|
FamilyOnline(self._group.id, self)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
@ -561,6 +556,11 @@ function M:UpdateFamilyRoom(fgCtr, id)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:ConnetFamily(index, groups, isCreate)
|
function M:ConnetFamily(index, groups, isCreate)
|
||||||
|
|
||||||
|
if self._group then
|
||||||
|
FamilyOffline(self._group.id, self)
|
||||||
|
end
|
||||||
|
|
||||||
UpdateBeat:Remove(self.OnUpdate, self)
|
UpdateBeat:Remove(self.OnUpdate, self)
|
||||||
ViewUtil:CloseModalWait()
|
ViewUtil:CloseModalWait()
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 5.1 MiB After Width: | Height: | Size: 4.9 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 811 KiB |
|
Before Width: | Height: | Size: 587 KiB After Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 482 KiB After Width: | Height: | Size: 831 KiB |