master
parent
6867fff9c4
commit
59c3cb9659
|
|
@ -1516,3 +1516,13 @@ function M:FG_SetFamilyDiamond(group_id, playerId, diamo, callback)
|
|||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
||||
function M:FG_SetFamilyHeartbeat(group_id, playerId, callback)
|
||||
local _client = ControllerManager.GroupClient
|
||||
local _data = {}
|
||||
_data.id = group_id
|
||||
_data.playerId = playerId
|
||||
_client:send(Protocol.WEB_FG_SET_Family_Heartbeat, _data, function(res)
|
||||
callback(res)
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -263,6 +263,8 @@ Protocol = {
|
|||
WEB_FG_SET_JOIN_SCORE = "group/update_join_score",
|
||||
-- 亲友圈重置房卡
|
||||
WEB_FG_SET_Family_Diamond = "group/add_group_diamo",
|
||||
-- 亲友圈发送伪心跳
|
||||
WEB_FG_SET_Family_Heartbeat = "group/set_group_heartbeat",
|
||||
-------------- group-log---------------------
|
||||
-- 获取奖励日志
|
||||
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ function M:ShareWx()
|
|||
fgCtr:FG_GroupMembers12(
|
||||
self._group.id,
|
||||
0,
|
||||
100,
|
||||
1,
|
||||
6,
|
||||
2,
|
||||
2,
|
||||
function(res)
|
||||
ViewUtil.CloseModalWait()
|
||||
|
|
@ -327,9 +327,10 @@ function M:ConnetFamily(index, groups, isCreate)
|
|||
end
|
||||
|
||||
function M:OnUpdate()
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
local heatTime = os.time()
|
||||
-- --12001事件
|
||||
if self._group.update_room then
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
-- if self._roomNum == self._group.room_num then
|
||||
-- for i = 1, self._group.room_num do
|
||||
-- if self._group.rooms[i] and #self._group.rooms[i].plist == 0 then
|
||||
|
|
@ -358,6 +359,12 @@ function M:OnUpdate()
|
|||
-- -- print("====================================UpdateFamilyRoom", fgCtr, self._group.id)
|
||||
self:UpdateFamilyRoom(fgCtr, self._group.id)
|
||||
end
|
||||
if not self.lastType or self.lastType - heatTime > 30 then
|
||||
fgCtr:FG_SetFamilyHeartbeat(self._group.id, DataManager.SelfUser.account_id, function(res)
|
||||
pt(res)
|
||||
end)
|
||||
self.lastType = heatTime
|
||||
end
|
||||
end
|
||||
|
||||
local IDENTITY_LIST = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue