【成长基金】修复红点不消失的问题
parent
a175e18946
commit
99b2c98128
|
@ -75,6 +75,18 @@ function this.IsGrowthGiftGoodsAvailable(goodsType)
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
--判断商品是否购买过
|
||||||
|
function this.IsBuyGift(goodsId)
|
||||||
|
if not goodsId then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
for _, v in ipairs(giftGoodsInfo)do
|
||||||
|
if v.goodsId == goodsId and v.buyTimes > 0 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- 判断商品数据是否在可用时间范围内
|
-- 判断商品数据是否在可用时间范围内
|
||||||
local function _IsGiftGoodsAvailable(gift)
|
local function _IsGiftGoodsAvailable(gift)
|
||||||
|
@ -233,6 +245,14 @@ function this.GetGrowthRedPointState()
|
||||||
if not giftGoodsInfo then return false end
|
if not giftGoodsInfo then return false end
|
||||||
local openId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.GrowthReward)
|
local openId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.GrowthReward)
|
||||||
if openId then
|
if openId then
|
||||||
|
-- 判断对应礼包是否购买
|
||||||
|
local globalActConfigs = ConfigManager.TryGetConfigData(ConfigName.GlobalActivity, openId)
|
||||||
|
if not globalActConfigs or globalActConfigs.CanBuyRechargeId[1] == 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if not this.IsBuyGift(globalActConfigs.CanBuyRechargeId[1]) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
local actRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
local actRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
||||||
for _, configInfo in ConfigPairs(actRewardConfig) do
|
for _, configInfo in ConfigPairs(actRewardConfig) do
|
||||||
if configInfo.ActivityId == openId then
|
if configInfo.ActivityId == openId then
|
||||||
|
|
Loading…
Reference in New Issue