【十绝阵】排行滑动数据错乱
parent
4727998055
commit
5d739f1291
|
@ -299,7 +299,7 @@ function this.RefreshRank(index)
|
||||||
RankingManager.InitData(curRankType,function()
|
RankingManager.InitData(curRankType,function()
|
||||||
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
local ranks,myRankInfo = RankingManager.GetRankingInfo()
|
||||||
this.empty:SetActive(#ranks<=0)
|
this.empty:SetActive(#ranks<=0)
|
||||||
this.SetRankDataShow(ranks,myRankInfo,curRankType)
|
this.SetRankDataShow(ranks,myRankInfo,curRankType, false, false)
|
||||||
this.scrollView:SetIndex(1)
|
this.scrollView:SetIndex(1)
|
||||||
--当我的排名没数据时
|
--当我的排名没数据时
|
||||||
this.mRSortNum:SetActive(myRankInfo.rank > 0)
|
this.mRSortNum:SetActive(myRankInfo.rank > 0)
|
||||||
|
@ -311,16 +311,16 @@ function this.RefreshRank(index)
|
||||||
this.SetMyRank(myRankInfo,curRankType)
|
this.SetMyRank(myRankInfo,curRankType)
|
||||||
end,curIndex,1)
|
end,curIndex,1)
|
||||||
end
|
end
|
||||||
function this.SetRankDataShow(ranks,myRankInfo,curRankType)
|
function this.SetRankDataShow(ranks,myRankInfo,curRankType,isNotTop,isNotAni)
|
||||||
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.SetRankDataShow(ranks,myRankInfo,curRankType)
|
this.SetRankDataShow(ranks,myRankInfo,curRankType, true, true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end,isNotTop,isNotAni)
|
||||||
end
|
end
|
||||||
--设置每条数据
|
--设置每条数据
|
||||||
function this.SetScrollPre(root,data,curRankType)
|
function this.SetScrollPre(root,data,curRankType)
|
||||||
|
|
Loading…
Reference in New Issue