显示庄家
parent
0058512849
commit
0c90268eb7
|
|
@ -872,7 +872,7 @@ function M:FG_GetMemberHpLog(group_id, tag, limit, num, filter, begin_time, end_
|
|||
end)
|
||||
end
|
||||
|
||||
-- 获取玩法局数统计
|
||||
-- 获取玩法局数统计 --500
|
||||
function M:FG_GetGameStat(group_id, callback)
|
||||
local _client = ControllerManager.GroupClient
|
||||
local data = {}
|
||||
|
|
@ -908,6 +908,13 @@ function M:FG_GetPropLog(group_id, limit, num, begin_time, end_time, callback)
|
|||
end)
|
||||
end
|
||||
|
||||
---comment
|
||||
---@param group_id any
|
||||
---@param platform any
|
||||
---@param qid 用户id
|
||||
---@param limit any
|
||||
---@param num any
|
||||
---@param callback any
|
||||
-- 获取战绩
|
||||
function M:FG_GetGroupRecord(group_id, platform, qid, limit, num, callback)
|
||||
local _client = ControllerManager.GroupClient
|
||||
|
|
|
|||
|
|
@ -16,29 +16,52 @@ function FamilyNumberRecord.New(root)
|
|||
-- end
|
||||
-- end
|
||||
self.familyType.selectedIndex = 5
|
||||
self.lastType = 1
|
||||
|
||||
self._view:GetChild('text_titleRecord').text = string.format("%s(%s) 成员记录", self._group.name, self._group.id)
|
||||
self._view:GetChild('text_residueDiamond').text = self._group.diamo
|
||||
self._view:GetChild('text_timeRecord').visible = false
|
||||
|
||||
local playList = self._group.playList
|
||||
local games = DataManager.SelfUser.games
|
||||
local comp_gameTypeList = self._view:GetChild('comp_gameTypeList'):GetChild('n0')
|
||||
local ctr_numberRecordRank = self._view:GetController('numberRecordRank')
|
||||
|
||||
self._input_IDSerach = self._view:GetChild('input_numberID')
|
||||
self._viewList_numverRecord = self._view:GetChild('list_numverRecord')
|
||||
self.ctr_numberRecord = self._view:GetController('numberRecord')
|
||||
|
||||
print("lingmengplayList", #playList)
|
||||
pt(playList)
|
||||
|
||||
print("lingmengplayList", #games)
|
||||
pt(games)
|
||||
comp_gameTypeList:SetVirtual()
|
||||
comp_gameTypeList.itemRenderer = function(index, obj)
|
||||
obj.title = playList[index + 1].game_name
|
||||
if index == 0 then
|
||||
obj.title = "麻将"
|
||||
obj.data = {}
|
||||
obj.data.index = index
|
||||
obj.data.pid = playList[index + 1].id
|
||||
obj.data.id = -1
|
||||
elseif index == 1 then
|
||||
obj.title = "扑克"
|
||||
obj.data = {}
|
||||
obj.data.index = index
|
||||
obj.data.id = -2
|
||||
else
|
||||
obj.title = games[index - 1].name
|
||||
obj.data = {}
|
||||
obj.data.index = index
|
||||
obj.data.id = games[index - 1].game_id
|
||||
end
|
||||
comp_gameTypeList.numItems = #playList
|
||||
|
||||
end
|
||||
comp_gameTypeList.numItems = #games + 2
|
||||
|
||||
self.btn_close.onClick:Set(function()
|
||||
if self.ctr_numberRecord.selectedIndex > 0 then
|
||||
self.ctr_numberRecord.selectedIndex = self.ctr_numberRecord.selectedIndex - 1
|
||||
else
|
||||
self:InitCloseClick()
|
||||
self.familyType.selectedIndex = 1
|
||||
end
|
||||
end)
|
||||
self:NumverRecordRenderer()
|
||||
self._view:GetChild('btn_clearInput').onClick:Set(function()
|
||||
self._input_IDSerach.text = ""
|
||||
end)
|
||||
|
|
@ -54,19 +77,56 @@ function FamilyNumberRecord.New(root)
|
|||
end)
|
||||
self._view:GetChild('comp_sortTypeList'):GetChild('n0').onClickItem:Set(function(context)
|
||||
self:OnClickSortType(context)
|
||||
ctr_numberRecordRank.selectedIndex = 0
|
||||
end)
|
||||
comp_gameTypeList.onClickItem:Set(function(context)
|
||||
self:OnClickSortType(self._group.id, context.data.data.pid)
|
||||
self:OnClickSortType(self._group.id, context.data.data.id)
|
||||
ctr_numberRecordRank.selectedIndex = 0
|
||||
end)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function M:NumverRecordRenderer()
|
||||
local numberRecordList = self._viewList_numverRecord
|
||||
numberRecordList:SetVirtual()
|
||||
numberRecordList.itemRenderer = function(index, obj)
|
||||
local info = rank[index + 1]
|
||||
ImageLoad.Load(info.portrait, obj:GetChild('btn_head')._iconObject)
|
||||
obj:GetChild('text_ID').text = info.uid
|
||||
obj:GetChild('text_nick').text = info.nick
|
||||
obj:GetChild('text_score').text = info.score
|
||||
obj:GetChild('btn_lookRecord').onClick:Set(function()
|
||||
self.ctr_numberRecord.selectedIndex = 1
|
||||
self:OnClickNumberRank(groupId, info.uid, info.round)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function M:OnClickSortType(groupId, pid)
|
||||
print("lingmengOnClickSortType")
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
fgCtr:FG_GetGroupRecord(groupId, GetPlatform(), pid, 0, 100, function(res)
|
||||
local numberRecordList = self._viewList_numverRecord
|
||||
fgCtr:FG_GetMemberRank(groupId, 0, 0, 10, os.time() - 3600 * 120, os.time(), 1, function(res)
|
||||
pt(res)
|
||||
if res.ReturnCode ~= 0 then
|
||||
ViewUtil.ShowOneChooose("获取排行榜失败" .. res.ReturnCode)
|
||||
else
|
||||
local data = res.Data
|
||||
local rank = data.ranks
|
||||
numberRecordList.numItems = #rank
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function M:OnClickNumberRank(groupId, uid, round)
|
||||
print("lingmengOnClickNumberRank")
|
||||
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||
local numberRecordList = self._viewList_numverRecord
|
||||
fgCtr:FG_GetGroupRecordSpe(groupId, GetPlatform(), uid, 0, 0, round, os.time() - 3600 * 120, os.time(), 3,
|
||||
function(res)
|
||||
pt(res)
|
||||
pt("resdata", res.Data.records[1].totalScore)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -31,19 +31,9 @@ function M:init(url)
|
|||
|
||||
local createOrJoin = view:GetController('createOrJoin')
|
||||
self.familyType = view:GetController('familyType')
|
||||
local btn_close = view:GetChild('btn_close')
|
||||
btn_close.onClick:Set(function()
|
||||
if not self.lastType or self.familyType.selectedIndex == 1 then
|
||||
ControllerManager.ChangeController(LoddyController)
|
||||
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||
else
|
||||
self.familyType.selectedIndex = self.lastType
|
||||
if self.lastType == 3 then
|
||||
self.lastType = 1
|
||||
createOrJoin.selectedIndex = (createOrJoin.selectedIndex + 1) % 2
|
||||
end
|
||||
end
|
||||
end)
|
||||
self.btn_close = view:GetChild('btn_close')
|
||||
|
||||
self:InitCloseClick()
|
||||
|
||||
fgCtr:FG_GroupList(function(res)
|
||||
local groups = res.Data.groups
|
||||
|
|
@ -106,6 +96,22 @@ function M:init(url)
|
|||
-------绑定成员战绩按钮
|
||||
view:GetChild('btn_family_record').onClick:Set(function()
|
||||
self._child_familyNumberRecord = FamilyNumberRecord.New(self)
|
||||
self.lastType = 1
|
||||
end)
|
||||
end
|
||||
|
||||
function M:InitCloseClick()
|
||||
self.btn_close.onClick:Set(function()
|
||||
if not self.lastType or self.familyType.selectedIndex == 1 then
|
||||
ControllerManager.ChangeController(LoddyController)
|
||||
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||
else
|
||||
self.familyType.selectedIndex = self.lastType
|
||||
if self.lastType == 3 then
|
||||
self.lastType = 1
|
||||
createOrJoin.selectedIndex = (createOrJoin.selectedIndex + 1) % 2
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -325,6 +325,12 @@ function M:EventInit()
|
|||
local playerInfo = _player_info[self:GetPos(i)]
|
||||
playerInfo:FillData(list[i])
|
||||
playerInfo:Ready(false)
|
||||
|
||||
if i == bank_seat then
|
||||
playerInfo:MarkBank(true)
|
||||
else
|
||||
playerInfo:MarkBank(false)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue