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

dev_chengFeng
wangzhenxing 2020-08-18 10:26:44 +09:00
commit 98eb034cfc
2 changed files with 17 additions and 2 deletions

View File

@ -163,7 +163,7 @@ function this.RefreshShow(i)
this.titleBg.sprite=Util.LoadSprite(titleBg[i].bg)
this.titleTip.text=titleBg[i].titleTip
this.titleTip.gameObject:GetComponent("RectTransform").localPosition =titleBg[i].pos
this.titleTip.gameObject:GetComponent("RectTransform").localPosition = titleBg[i].pos
this.SetTimeTip()
this.SetScroll(i)
DailyCarbonPanel:RefreshRedPotShow()
@ -174,7 +174,14 @@ function this.SetScroll(i)
this.scrollView:SetData(curData,function(index,root)
this.SetData(root,curData[index], curData[index - 1])
end)
this.scrollView:SetIndex(1)
local t = 1
for k,v in ipairs(curData) do
if not CarbonManager.IsDailyCarbonPass(v.Id) then
t = k
break
end
end
this.scrollView:SetIndex(t - 2 < 1 and 1 or t - 2)
end
--设置滚动条数据 root根节点 data本地表数据 ldata 上一条数据

View File

@ -145,6 +145,14 @@ function this:SwitchView()
table.insert(list, go)
end
)
local t = 1
for k,v in ipairs(dataList) do
if v.state == 1 then
t = k
break
end
end
this.ScrollView:SetIndex(t - 2 < 1 and 1 or t - 2)
end
function this:NewItemView(config, gameObject, ...)