助力礼包
This commit is contained in:
parent
5888ee766f
commit
08631456a2
@ -69,15 +69,17 @@ function LevelCell:refresh(idx, cfgInfo, clickCallback)
|
||||
-- 限时(隐藏)
|
||||
self.timeImg:setVisible(false)
|
||||
|
||||
if clickCallback then
|
||||
self:addClickListener(function()
|
||||
clickCallback(cfgInfo.id)
|
||||
self:onClickGift(cfgInfo.id)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function LevelCell:setVisible(visible)
|
||||
self.baseObject:setVisible(visible)
|
||||
end
|
||||
|
||||
function LevelCell:onClickGift(id)
|
||||
PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
||||
end
|
||||
|
||||
return LevelCell
|
||||
@ -12,9 +12,7 @@ function LevelSellCell:init()
|
||||
end)
|
||||
self.scrollRect:addRefreshCallback(function(idx, cell)
|
||||
if self.actGiftCfg and self.actGiftCfg[idx] then
|
||||
cell:refresh(idx, self.actGiftCfg[idx], function()
|
||||
self:onClickGift(self.actGiftCfg[idx].id)
|
||||
end)
|
||||
cell:refresh(idx, self.actGiftCfg[idx])
|
||||
end
|
||||
end)
|
||||
self.scrollRect:clearCells()
|
||||
@ -50,8 +48,4 @@ function LevelSellCell:setVisible(visible)
|
||||
self.baseObject:setVisible(visible)
|
||||
end
|
||||
|
||||
function LevelSellCell:onClickGift(id)
|
||||
Logger.logHighlight("Click id:%s", id) -- TODOJ
|
||||
end
|
||||
|
||||
return LevelSellCell
|
||||
Loading…
x
Reference in New Issue
Block a user