master
罗家炜 2025-05-22 15:57:34 +08:00
parent 6867fff9c4
commit 59c3cb9659
3 changed files with 22 additions and 3 deletions

View File

@ -1516,3 +1516,13 @@ function M:FG_SetFamilyDiamond(group_id, playerId, diamo, callback)
callback(res) callback(res)
end) end)
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

View File

@ -263,6 +263,8 @@ Protocol = {
WEB_FG_SET_JOIN_SCORE = "group/update_join_score", WEB_FG_SET_JOIN_SCORE = "group/update_join_score",
-- 亲友圈重置房卡 -- 亲友圈重置房卡
WEB_FG_SET_Family_Diamond = "group/add_group_diamo", WEB_FG_SET_Family_Diamond = "group/add_group_diamo",
-- 亲友圈发送伪心跳
WEB_FG_SET_Family_Heartbeat = "group/set_group_heartbeat",
-------------- group-log--------------------- -------------- group-log---------------------
-- 获取奖励日志 -- 获取奖励日志
WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log", WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log",

View File

@ -74,8 +74,8 @@ function M:ShareWx()
fgCtr:FG_GroupMembers12( fgCtr:FG_GroupMembers12(
self._group.id, self._group.id,
0, 0,
100, 6,
1, 2,
2, 2,
function(res) function(res)
ViewUtil.CloseModalWait() ViewUtil.CloseModalWait()
@ -327,9 +327,10 @@ function M:ConnetFamily(index, groups, isCreate)
end end
function M:OnUpdate() function M:OnUpdate()
local fgCtr = ControllerManager.GetController(NewGroupController)
local heatTime = os.time()
-- --12001事件 -- --12001事件
if self._group.update_room then if self._group.update_room then
local fgCtr = ControllerManager.GetController(NewGroupController)
-- if self._roomNum == self._group.room_num then -- if self._roomNum == self._group.room_num then
-- for i = 1, self._group.room_num do -- for i = 1, self._group.room_num do
-- if self._group.rooms[i] and #self._group.rooms[i].plist == 0 then -- 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) -- -- print("====================================UpdateFamilyRoom", fgCtr, self._group.id)
self:UpdateFamilyRoom(fgCtr, self._group.id) self:UpdateFamilyRoom(fgCtr, self._group.id)
end 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 end
local IDENTITY_LIST = { local IDENTITY_LIST = {