【十绝阵】排名数据超过20,滑动时显示错误的问题
parent
43e945a97a
commit
89694f03b5
|
|
@ -129,7 +129,7 @@ function this.RefreshRank(index)
|
||||||
RankingManager.InitData(curRankType,function()--RANK_TYPE.GUILD_DEATHPOS_ALLGUILD
|
RankingManager.InitData(curRankType,function()--RANK_TYPE.GUILD_DEATHPOS_ALLGUILD
|
||||||
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
||||||
this.empty:SetActive(#ranks<=0)
|
this.empty:SetActive(#ranks<=0)
|
||||||
this.SetScrollView(ranks,curRankType)
|
this.SetScrollView(ranks, curRankType, true)
|
||||||
this.scrollView:SetIndex(1)
|
this.scrollView:SetIndex(1)
|
||||||
--当我的排名没数据时
|
--当我的排名没数据时
|
||||||
this.mRSortNum:SetActive(myRankInfo.rank~=-1)
|
this.mRSortNum:SetActive(myRankInfo.rank~=-1)
|
||||||
|
|
@ -143,16 +143,16 @@ function this.RefreshRank(index)
|
||||||
end,nil,1)
|
end,nil,1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.SetScrollView(ranks,curRankType)
|
function this.SetScrollView(ranks,curRankType, isTop)
|
||||||
this.scrollView:SetData(ranks,function(index,root)
|
this.scrollView:SetData(ranks,function(index,root)
|
||||||
this.SetScrollPre(root,ranks[index],curRankType)
|
this.SetScrollPre(root,ranks[index],curRankType)
|
||||||
if index==#ranks then
|
if index==#ranks then
|
||||||
RankingManager.RequestNextWarPowerPageData(function()
|
RankingManager.RequestNextWarPowerPageData(function()
|
||||||
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
||||||
this.SetScrollView(ranks)
|
this.SetScrollView(ranks, curRankType, false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end, not isTop, true)
|
||||||
end
|
end
|
||||||
--设置每条数据
|
--设置每条数据
|
||||||
function this.SetScrollPre(root,data,curRankType)
|
function this.SetScrollPre(root,data,curRankType)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue