修复打开限时活动界面报错的问题

dev_chengFeng
JieLing 2020-08-25 21:55:13 +08:00
parent 1ac3dbb7f6
commit fcc9a5eb2a
3 changed files with 22 additions and 17 deletions

View File

@ -590,10 +590,16 @@ function ExpertPanel:SetOpenActiveBtn()
--星级成长礼
if OperatingManager.IsHeroGiftActive() then
tabBtns[ExperType.StarGrowGift]:SetActive(true)
if defaultIndex == 0 then
defaultIndex = ExperType.StarGrowGift
end
end
--限时礼包
if OperatingManager.IsGiftBuyActive() then
tabBtns[ExperType.GiftBuy]:SetActive(true)
if defaultIndex == 0 then
defaultIndex = ExperType.GiftBuy
end
else
tabBtns[ExperType.GiftBuy]:SetActive(false)
end

View File

@ -183,7 +183,7 @@ function this:SetTime()
end
end
end
this.endTime.text = Language[11496]..TimeToHMS(curEndTime-GetTimeStamp())
self.endTime.text = Language[11496]..TimeToHMS(curEndTime-GetTimeStamp())
end,1,-1,true)
self.localTimer:Start()
end

View File

@ -314,23 +314,22 @@ end
function this.IsHeroGiftActive()
-- 关闭星级成长礼显示
return false
-- local activeNum = 0
-- if not giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift] then
-- return false
-- else
-- for i = 1, #giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift] do
-- local data =giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift][i]
-- if data then
-- local id = data.goodsId
-- if rechargeConfig[id].ShowType == 8 then --- 只有前端显示的商品类型
-- activeNum = activeNum + 1
-- end
-- end
-- end
-- end
local activeNum = 0
if not giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift] then
return false
else
for i = 1, #giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift] do
local data =giftGoodsInfoList[GoodsTypeDef.DirectPurchaseGift][i]
if data then
local id = data.goodsId
if rechargeConfig[id].ShowType == 8 then --- 只有前端显示的商品类型
activeNum = activeNum + 1
end
end
end
end
-- return activeNum > 0
return activeNum > 0
end
--- 获取礼包的显示数据