成长礼包 红点修改
parent
223afd4c57
commit
640c866388
|
|
@ -547,7 +547,6 @@ function this.CreatSingleData(shopData,DataTypeIndex,buyType)
|
||||||
curSortId = 2
|
curSortId = 2
|
||||||
end
|
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.costId,data.finalNum,data.oriCostNum = ShopManager.calculateBuyCost(buyType, shopData.id, 1)
|
|
||||||
data.price = data.finalNum
|
data.price = data.finalNum
|
||||||
elseif DataTypeIndex == DataType.Direct and rechargeCommodityConfig[shopData.goodsId].ShowType == buyType then
|
elseif DataTypeIndex == DataType.Direct and rechargeCommodityConfig[shopData.goodsId].ShowType == buyType then
|
||||||
data.shopData = shopData
|
data.shopData = shopData
|
||||||
|
|
@ -596,9 +595,7 @@ local stateSort = {
|
||||||
function this.GetMissionDataByActId(activityId)
|
function this.GetMissionDataByActId(activityId)
|
||||||
local actiInfo = ActivityGiftManager.GetActivityInfoByType(activityId)
|
local actiInfo = ActivityGiftManager.GetActivityInfoByType(activityId)
|
||||||
local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[activityId].CanBuyRechargeId[1])--当前礼包ID(101\102\103\104\105)
|
local havaBought = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, GlobalActivity[activityId].CanBuyRechargeId[1])--当前礼包ID(101\102\103\104\105)
|
||||||
LogGreen("havaBought:"..havaBought.buyTimes)
|
|
||||||
local data = {}
|
local data = {}
|
||||||
LogGreen("actiInfo.mission:"..#actiInfo.mission)
|
|
||||||
for k,v in ipairs(actiInfo.mission) do
|
for k,v in ipairs(actiInfo.mission) do
|
||||||
table.insert(data,this.CreatSingleMissionData(v,havaBought))
|
table.insert(data,this.CreatSingleMissionData(v,havaBought))
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ end
|
||||||
|
|
||||||
-- 打开,重新打开时回调
|
-- 打开,重新打开时回调
|
||||||
function GrowthGiftPage:OnShow(_sortingOrder)
|
function GrowthGiftPage:OnShow(_sortingOrder)
|
||||||
|
VipManager.SetGrowthPackagePointStatus()--成长礼包
|
||||||
|
CheckRedPointStatus(RedPointType.GrowthPackage)
|
||||||
self.gameObject:SetActive(true)
|
self.gameObject:SetActive(true)
|
||||||
if _sortingOrder then
|
if _sortingOrder then
|
||||||
sortingOrder = _sortingOrder
|
sortingOrder = _sortingOrder
|
||||||
|
|
@ -106,8 +108,7 @@ function GrowthGiftPage:OnShow(_sortingOrder)
|
||||||
self.titleTip.gameObject:SetActive(true)
|
self.titleTip.gameObject:SetActive(true)
|
||||||
else
|
else
|
||||||
self.titleTip.gameObject:SetActive(false)
|
self.titleTip.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
|
|
||||||
self:RefreshData()
|
self:RefreshData()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -121,6 +122,7 @@ end
|
||||||
|
|
||||||
--设置投资按钮初始状态
|
--设置投资按钮初始状态
|
||||||
function GrowthGiftPage:SetBtnInvestState()
|
function GrowthGiftPage:SetBtnInvestState()
|
||||||
|
self.curGiftsId = GlobalActivity[self.curActiId].CanBuyRechargeId[1]
|
||||||
self.gift = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
|
self.gift = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
|
||||||
if self.gift and self.gift.buyTimes == 0 then
|
if self.gift and self.gift.buyTimes == 0 then
|
||||||
self.btnInvest:GetComponent("Button").enabled = true
|
self.btnInvest:GetComponent("Button").enabled = true
|
||||||
|
|
@ -136,7 +138,6 @@ end
|
||||||
|
|
||||||
function GrowthGiftPage:RefreshGiftData(anim)
|
function GrowthGiftPage:RefreshGiftData(anim)
|
||||||
self.mission = DynamicActivityManager.GetMissionDataByActId(self.curActiId)
|
self.mission = DynamicActivityManager.GetMissionDataByActId(self.curActiId)
|
||||||
|
|
||||||
if not self.missionPre then
|
if not self.missionPre then
|
||||||
self.missionPre = {}
|
self.missionPre = {}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ function GiftPre:BindEvent()
|
||||||
--直购商品
|
--直购商品
|
||||||
PayManager.Pay(self.data.data.shopData.goodsId, function(id)
|
PayManager.Pay(self.data.data.shopData.goodsId, function(id)
|
||||||
FirstRechargeManager.RefreshAccumRechargeValue(self.data.data.shopData.goodsId)
|
FirstRechargeManager.RefreshAccumRechargeValue(self.data.data.shopData.goodsId)
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
|
||||||
CheckRedPointStatus(RedPointType.DailyGift)
|
CheckRedPointStatus(RedPointType.DailyGift)
|
||||||
CheckRedPointStatus(RedPointType.WeekGiftPage)
|
CheckRedPointStatus(RedPointType.WeekGiftPage)
|
||||||
CheckRedPointStatus(RedPointType.MonthGiftPage)
|
CheckRedPointStatus(RedPointType.MonthGiftPage)
|
||||||
|
|
|
||||||
|
|
@ -412,13 +412,17 @@ function this.CheckNewVipRP()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.CheckGrowthPackagePointStatus()--成长礼包
|
function this.CheckGrowthPackagePointStatus()--成长礼包
|
||||||
local redointTime =PlayerPrefs.GetInt(PlayerManager.uid.."czlb", 0)
|
|
||||||
local rechargeNum= VipManager.GetChargedNum()--已经充值的金额
|
local rechargeNum= VipManager.GetChargedNum()--已经充值的金额
|
||||||
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.VIP_GIFT).storeItem
|
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.VIP_GIFT).storeItem
|
||||||
local shopItemConfig = ConfigManager.GetConfig(ConfigName.StoreConfig)
|
local shopItemConfig = ConfigManager.GetConfig(ConfigName.StoreConfig)
|
||||||
for i = 1, #shopData do
|
for i = 1, #shopData do
|
||||||
local boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.VIP_GIFT, shopData[i].id)
|
local boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.VIP_GIFT, shopData[i].id)
|
||||||
if rechargeNum >= shopItemConfig[shopData[i].id].BuyRule[2] and boughtNum == 0 then
|
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
|
if redointTime == 0 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -427,6 +431,18 @@ function this.CheckGrowthPackagePointStatus()--成长礼包
|
||||||
return false
|
return false
|
||||||
end
|
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()
|
function this.SetVipLevelImg()
|
||||||
--- vip 0 暂时没有资源
|
--- vip 0 暂时没有资源
|
||||||
|
|
|
||||||
|
|
@ -559,7 +559,6 @@ function this:RechargeSuccessFunc(id)
|
||||||
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
||||||
self:RefreshShopInfo(false, false,true)
|
self:RefreshShopInfo(false, false,true)
|
||||||
--PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!")
|
--PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!")
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
|
||||||
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测
|
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue