特权礼包滑动位置 修改

dev_chengFeng
jiaoyangna 2021-03-31 19:30:45 +08:00
parent 61426fba07
commit 104f52f61b
1 changed files with 16 additions and 0 deletions

View File

@ -153,7 +153,23 @@ function EveryDayGift:RefreshGiftData()
local callBack = function(index, item)
self:RefreshShowData(item, self.shopData[index],index)
end
local curindex = 0
self.scrollView:SetData(self.shopData, callBack)
for i = 1 ,#self.shopData do
if self.shopData[i].DataType == DynamicActivityManager.selectIndex.dataType then
for j = 1 , #DynamicActivityManager.selectIndex.goodsId do
if (self.shopData[i].data.shopData.id or self.shopData[i].data.shopData.goodsId) == DynamicActivityManager.selectIndex.goodsId[j] then
curindex = i
break
end
end
end
if curindex ~= 0 then
break
end
end
LogGreen("curindex:"..curindex)
self.scrollView:SetIndex(curindex)
end
function EveryDayGift:isBought()