【车迟斗法】抢夺记录玩家信息

dev_chengFeng
张彪 2022-03-03 17:37:34 +08:00
parent ba38abcdaf
commit d62388966b
1 changed files with 8 additions and 4 deletions

View File

@ -41,17 +41,17 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function GuildCarDelayLootRecordPopup:OnShow() function GuildCarDelayLootRecordPopup:OnShow()
local curallLootRecordData = {} local curallLootRecordData = {}
--LogError("carChallengeItem.carChallengeItem "..#carChallengeItem.carChallengeItem) -- LogError("carChallengeItem.carChallengeItem "..#carChallengeItem.carChallengeItem)
--table.sort(carChallengeItem.carChallengeItem, function(a,b) return a.time > b.time end) --table.sort(carChallengeItem.carChallengeItem, function(a,b) return a.time > b.time end)
for i = 1, #carChallengeItem.carChallengeItem do for i = 1, #carChallengeItem.carChallengeItem do
if carChallengeItem.carChallengeItem[i] and carChallengeItem.carChallengeItem[i].content ~= "" then if carChallengeItem.carChallengeItem[i] and carChallengeItem.carChallengeItem[i].content ~= "" then
local timeStr = os.date("%Y%m%d",carChallengeItem.carChallengeItem[i].time) local timeStr = os.date("%Y%m%d",carChallengeItem.carChallengeItem[i].time)
if not curallLootRecordData[timeStr] then if not curallLootRecordData[timeStr] then
curallLootRecordData[timeStr] = {} curallLootRecordData[timeStr] = {}
-- LogError("star "..carChallengeItem.carChallengeItem[i].time .." "..carChallengeItem.carChallengeItem[i].content) -- LogYellow("star "..carChallengeItem.carChallengeItem[i].time .." "..carChallengeItem.carChallengeItem[i].content)
table.insert(curallLootRecordData[timeStr],carChallengeItem.carChallengeItem[i]) table.insert(curallLootRecordData[timeStr],carChallengeItem.carChallengeItem[i])
else else
-- LogError("add "..carChallengeItem.carChallengeItem[i].time .." "..carChallengeItem.carChallengeItem[i].content) -- LogGreen("add "..carChallengeItem.carChallengeItem[i].time .." "..carChallengeItem.carChallengeItem[i].content)
table.insert(curallLootRecordData[timeStr],carChallengeItem.carChallengeItem[i]) table.insert(curallLootRecordData[timeStr],carChallengeItem.carChallengeItem[i])
end end
end end
@ -89,7 +89,11 @@ function GuildCarDelayLootRecordPopup:OnShow()
end end
titleText[i][j]:SetActive(true) titleText[i][j]:SetActive(true)
Util.AddOnceClick(titleText[i][j], function() Util.AddOnceClick(titleText[i][j], function()
UIManager.OpenPanel(UIName.PlayerInfoPopup, allLootRecordData[i][j].uid) if PlayerManager.isCross == 1 then
UIManager.OpenPanel(UIName.PlayerInfoPopup, allLootRecordData[i][j].uid, PLAYER_INFO_VIEW_TYPE.NORMAL,1)
else
UIManager.OpenPanel(UIName.PlayerInfoPopup, allLootRecordData[i][j].uid)
end
end) end)
end end
isShowEmptyObj = false isShowEmptyObj = false