Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
gaoxin 2020-08-26 12:26:33 +08:00
commit d73b816bb3
2 changed files with 9 additions and 6 deletions

View File

@ -168,14 +168,20 @@ function this.RefreshShow(i)
DailyCarbonPanel:RefreshRedPotShow()
end
--设置滚动条
local curMaxOpenId = 0
function this.SetScroll(i)
curMaxOpenId = 1
this.scrollView:SetData(curData,function(index,root)
this.SetData(root,curData[index], curData[index - 1])
end)
this.scrollView:SetIndex(1)
for k,v in ipairs(curData) do
if not CarbonManager.IsDailyCarbonPass(v.Id) then
curMaxOpenId = k
break
end
end
this.scrollView:SetIndex(curMaxOpenId - 2 < 1 and 1 or (curMaxOpenId - 2))
end
--设置滚动条数据 root根节点 data本地表数据 ldata 上一条数据
@ -246,9 +252,6 @@ function this.SetData(root, data, ldata)
goBtnText.text=Language[10336]
goBtnImage.sprite=Util.LoadSprite("s_slbz_1anniuhuise")
tip.text=Language[10337]
if curMaxOpenId < data.Id then
curMaxOpenId = data.Id
end
end
else
type=0

View File

@ -151,7 +151,7 @@ function this:SwitchView()
break
end
end
this.ScrollView:SetIndex(t - 2 < 1 and 1 or t - 2)
this.ScrollView:SetIndex(t - 2 < 1 and 1 or (t - 2))
end
function this:NewItemView(config, gameObject, ...)