成长礼包 红点修改

dev_chengFeng
jiaoyangna 2021-04-02 11:24:59 +08:00
parent 223afd4c57
commit 640c866388
5 changed files with 21 additions and 9 deletions

View File

@ -547,7 +547,6 @@ function this.CreatSingleData(shopData,DataTypeIndex,buyType)
curSortId = 2
end
data.costId,data.finalNum,data.oriCostNum = ShopManager.calculateBuyCost(buyType, shopData.id, 1)
data.costId,data.finalNum,data.oriCostNum = ShopManager.calculateBuyCost(buyType, shopData.id, 1)
data.price = data.finalNum
elseif DataTypeIndex == DataType.Direct and rechargeCommodityConfig[shopData.goodsId].ShowType == buyType then
data.shopData = shopData
@ -596,9 +595,7 @@ local stateSort = {
function this.GetMissionDataByActId(activityId)
local actiInfo = ActivityGiftManager.GetActivityInfoByType(activityId)
local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[activityId].CanBuyRechargeId[1])--当前礼包ID(101\102\103\104\105)
LogGreen("havaBought:"..havaBought.buyTimes)
local data = {}
LogGreen("actiInfo.mission:"..#actiInfo.mission)
for k,v in ipairs(actiInfo.mission) do
table.insert(data,this.CreatSingleMissionData(v,havaBought))
end

View File

@ -68,6 +68,8 @@ end
-- 打开,重新打开时回调
function GrowthGiftPage:OnShow(_sortingOrder)
VipManager.SetGrowthPackagePointStatus()--成长礼包
CheckRedPointStatus(RedPointType.GrowthPackage)
self.gameObject:SetActive(true)
if _sortingOrder then
sortingOrder = _sortingOrder
@ -107,7 +109,6 @@ function GrowthGiftPage:OnShow(_sortingOrder)
else
self.titleTip.gameObject:SetActive(false)
end
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
self:RefreshData()
end
@ -121,6 +122,7 @@ end
--设置投资按钮初始状态
function GrowthGiftPage:SetBtnInvestState()
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
self.gift = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
if self.gift and self.gift.buyTimes == 0 then
self.btnInvest:GetComponent("Button").enabled = true
@ -136,7 +138,6 @@ end
function GrowthGiftPage:RefreshGiftData(anim)
self.mission = DynamicActivityManager.GetMissionDataByActId(self.curActiId)
if not self.missionPre then
self.missionPre = {}
end

View File

@ -100,7 +100,6 @@ function GiftPre:BindEvent()
--直购商品
PayManager.Pay(self.data.data.shopData.goodsId, function(id)
FirstRechargeManager.RefreshAccumRechargeValue(self.data.data.shopData.goodsId)
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
CheckRedPointStatus(RedPointType.DailyGift)
CheckRedPointStatus(RedPointType.WeekGiftPage)
CheckRedPointStatus(RedPointType.MonthGiftPage)

View File

@ -412,13 +412,17 @@ function this.CheckNewVipRP()
end
function this.CheckGrowthPackagePointStatus()--成长礼包
local redointTime =PlayerPrefs.GetInt(PlayerManager.uid.."czlb", 0)
local rechargeNum= VipManager.GetChargedNum()--已经充值的金额
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.VIP_GIFT).storeItem
local shopItemConfig = ConfigManager.GetConfig(ConfigName.StoreConfig)
for i = 1, #shopData do
local boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.VIP_GIFT, shopData[i].id)
if rechargeNum >= shopItemConfig[shopData[i].id].BuyRule[2] and boughtNum == 0 then
local costId,finalNum,oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.VIP_GIFT, shopData[i].id, 1)
if finalNum <= 0 then
return true
end
local redointTime = PlayerPrefs.GetInt(PlayerManager.uid.."czlb"..shopData[i].id)
if redointTime == 0 then
return true
end
@ -427,6 +431,18 @@ function this.CheckGrowthPackagePointStatus()--成长礼包
return false
end
function this.SetGrowthPackagePointStatus()--成长礼包
local shopItemConfig = ConfigManager.GetConfig(ConfigName.StoreConfig)
local rechargeNum= VipManager.GetChargedNum()--已经充值的金额
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.VIP_GIFT).storeItem
for i = 1, #shopData do
local boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.VIP_GIFT, shopData[i].id)
if rechargeNum >= shopItemConfig[shopData[i].id].BuyRule[2] and boughtNum == 0 then
PlayerPrefs.SetInt(PlayerManager.uid.."czlb"..shopData[i].id, 1)
end
end
end
---主界面显示使用
function this.SetVipLevelImg()
--- vip 0 暂时没有资源

View File

@ -559,7 +559,6 @@ function this:RechargeSuccessFunc(id)
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
self:RefreshShopInfo(false, false,true)
--PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!")
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测
end