排序修改
parent
cd47bb92aa
commit
f75b921ea0
|
@ -65,9 +65,20 @@ function TrialRewardPopup:OnDestroy()
|
|||
scrollView=nil
|
||||
end
|
||||
|
||||
|
||||
--0 已经领取,1 可领取,2不能领取·
|
||||
local sortIndex = {
|
||||
[0] = 0,
|
||||
[1] = 2,
|
||||
[2] = 1,
|
||||
}
|
||||
--刷新
|
||||
function this.RefreshPanel()
|
||||
table.sort(rewardConfig,function(a,b)
|
||||
if sortIndex[a.state] == sortIndex[b.state] then
|
||||
return a.Id < b.Id
|
||||
end
|
||||
return sortIndex[a.state] > sortIndex[b.state]
|
||||
end)
|
||||
scrollView:SetData(rewardConfig,function(index,root)
|
||||
this.SetScrollPre(root,rewardConfig[index])
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue