【全民福利】====任务排序
parent
5a1440cd69
commit
1a2854ed5e
|
|
@ -53,7 +53,12 @@ end
|
||||||
--移除事件监听(用于子类重写)
|
--移除事件监听(用于子类重写)
|
||||||
function QuanMinFLPanel:RemoveListener()
|
function QuanMinFLPanel:RemoveListener()
|
||||||
end
|
end
|
||||||
|
local stateSort = {
|
||||||
|
[1] = 3,
|
||||||
|
[2] = 1,
|
||||||
|
[0] = 2,
|
||||||
|
[-1] = 2,
|
||||||
|
}
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function QuanMinFLPanel:OnOpen(activityId)
|
function QuanMinFLPanel:OnOpen(activityId)
|
||||||
local missionList={}
|
local missionList={}
|
||||||
|
|
@ -72,10 +77,18 @@ function QuanMinFLPanel:OnOpen(activityId)
|
||||||
-- self.missionPre = {}
|
-- self.missionPre = {}
|
||||||
-- end
|
-- end
|
||||||
LogError("missionList len="..#missionList)
|
LogError("missionList len="..#missionList)
|
||||||
|
table.sort(missionList, function(a, b)
|
||||||
|
if stateSort[a.state] == stateSort[b.state] then
|
||||||
|
return a.missionId < b.missionId
|
||||||
|
else
|
||||||
|
return stateSort[a.state] > stateSort[b.state]
|
||||||
|
end
|
||||||
|
end)
|
||||||
self.grid:GetComponent("RectTransform").sizeDelta = Vector2.New(1078,250*#missionList)
|
self.grid:GetComponent("RectTransform").sizeDelta = Vector2.New(1078,250*#missionList)
|
||||||
-- self.scrollView:SetData(missionList, function(index, item)
|
-- self.scrollView:SetData(missionList, function(index, item)
|
||||||
-- self:RefreshShowData(item, missionList[index])
|
-- self:RefreshShowData(item, missionList[index])
|
||||||
-- end,false,false)
|
-- end,false,false)
|
||||||
|
|
||||||
end
|
end
|
||||||
local len=#self.prelist
|
local len=#self.prelist
|
||||||
local dataLen=#missionList
|
local dataLen=#missionList
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue