tcx_xiyou_yueNan
parent
0fc6c425db
commit
fd6a625109
|
|
@ -1245,7 +1245,8 @@ end
|
|||
function this:TabBtnAction(id, actType, data)
|
||||
if actType == 1 then
|
||||
if id == ActivityTypeDef.FirstRecharge then
|
||||
if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then
|
||||
--[[
|
||||
if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then
|
||||
local isOpen=CheckFunctionOpen(153)
|
||||
if isOpen then
|
||||
UIManager.OpenPanel(UIName.GMEspecially,function()
|
||||
|
|
@ -1259,7 +1260,9 @@ function this:TabBtnAction(id, actType, data)
|
|||
else
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
end
|
||||
--UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
]]
|
||||
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
elseif id == 10011 then
|
||||
UIManager.OpenPanel(UIName.ActivityMainPanel, id)
|
||||
elseif id == ActivityTypeDef.qiandaohaoli then
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ local this = OperatingManager
|
|||
--后端数据 以RechargeCommodityConfig表Type为键
|
||||
local giftGoodsInfoList = {}
|
||||
--- 新的数据列表,按照ID存取
|
||||
local newGoodsList = {}
|
||||
local rechargeLimitList = {}
|
||||
local hadBuyGoodsList = {}
|
||||
local rechargeConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)
|
||||
local luxuryConfig = ConfigManager.GetConfig(ConfigName.LuxuryFundConfig)
|
||||
|
|
@ -50,8 +50,14 @@ function this.SetBasicValues(giftGoodsList)
|
|||
if rechargeConfigLocal then
|
||||
LogBlue("礼包类型:"..tostring(rechargeConfigLocal.Type).." 名字"..rechargeConfigLocal.Name.. " 礼包ID:"..tostring(giftGoodsInfo.goodsId).." 已购:"..tostring(giftGoodsInfo.buyTimes)
|
||||
..Language[12012]..tostring(giftGoodsInfo.startTime)..Language[12013]..tostring(giftGoodsInfo.endTime).. Language[12014] ..tostring(giftGoodsInfo.dynamicBuyTimes)..Language[12015]..tostring(giftGoodsInfo.isBought))
|
||||
if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8 ) then
|
||||
elseif rechargeConfigLocal.Package == 2 and AppConst.SdkChannel=="XQDC" then
|
||||
if giftGoodsInfo.endTime == 0
|
||||
and giftGoodsInfo.startTime == 0
|
||||
and (rechargeConfigLocal.ShowType == 25
|
||||
or rechargeConfigLocal.ShowType == 26
|
||||
or rechargeConfigLocal.ShowType == 8 ) then
|
||||
|
||||
--elseif VipManager.GetChargedNum() < rechargeConfigLocal.OnSaleRule1 then
|
||||
|
||||
-- elseif this.CheckGiftFrontIsOpen(giftGoodsInfo.goodsId)==false then
|
||||
-- LogError("前置条件不满足================")
|
||||
else
|
||||
|
|
@ -74,6 +80,12 @@ function this.SetBasicValues(giftGoodsList)
|
|||
removeList[v]={}
|
||||
end
|
||||
table.insert(removeList[v],value)
|
||||
elseif VipManager.GetChargedNum() < ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, value.goodsId).OnSaleRule1 then
|
||||
table.insert(rechargeLimitList,value)
|
||||
if removeList[v]==nil then
|
||||
removeList[v]={}
|
||||
end
|
||||
table.insert(removeList[v],value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -85,7 +97,16 @@ function this.SetBasicValues(giftGoodsList)
|
|||
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.FindFairy.RefreshBuyOpenState)
|
||||
end
|
||||
|
||||
function this.CheckRechargeLimitList()
|
||||
for i = #rechargeLimitList, 1, -1 do
|
||||
local value = rechargeLimitList[i]
|
||||
local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, value.goodsId)
|
||||
if VipManager.GetChargedNum() >= rechargeConfigLocal.OnSaleRule1 then
|
||||
table.insert(giftGoodsInfoList[rechargeConfigLocal.Type], value)
|
||||
table.remove(rechargeLimitList, i) -- 删除当前下标
|
||||
end
|
||||
end
|
||||
end
|
||||
--检测礼包前置是否开启
|
||||
function this.CheckGiftFrontIsOpen(gift)
|
||||
local isOpen=true
|
||||
|
|
@ -188,6 +209,7 @@ end
|
|||
|
||||
--- 获取激活后的商品数据
|
||||
function this.GetGiftGoodsInfo(goodsType, Id)
|
||||
this.CheckRechargeLimitList()
|
||||
if not giftGoodsInfoList[goodsType] then
|
||||
return nil
|
||||
end
|
||||
|
|
@ -208,6 +230,7 @@ function this.GetGiftGoodsInfo(goodsType, Id)
|
|||
end
|
||||
|
||||
function this.GetGiftGoodsInfoList(type)
|
||||
this.CheckRechargeLimitList()
|
||||
-- return giftGoodsInfoList[type] and giftGoodsInfoList[type] or {}
|
||||
if not giftGoodsInfoList[type] then
|
||||
LogError("没有这个类型的礼包:"..tostring(type))
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ end
|
|||
local allcards = {}
|
||||
local curKey = 0
|
||||
local curIndex = 0
|
||||
-- local activityId=0
|
||||
local activityIndex=0
|
||||
local endTime = 0
|
||||
function WeekCardPanelNew:OnShow()
|
||||
allcards = {}
|
||||
|
|
@ -146,13 +146,13 @@ function WeekCardPanelNew:OnShow()
|
|||
for i = 1, 5 do
|
||||
self.tabs[i]:SetActive(false)
|
||||
end
|
||||
local i = 0
|
||||
|
||||
local firstKey = 0
|
||||
for key, value in pairs(allcards) do
|
||||
for i = 1, #value do
|
||||
--LogError("cccccccccccccccc" .. tostring(value[i].Id) .. "/" .. tostring(i))
|
||||
--i = i + 1
|
||||
self.tabs[i]:SetActive(true)
|
||||
|
||||
local name = Util.GetGameObject(self.tabs[i], "Text"):GetComponent("Text")
|
||||
name.text = value[i].Name
|
||||
local red = Util.GetGameObject(self.tabs[i], "redpoint")
|
||||
|
|
@ -181,10 +181,20 @@ end
|
|||
function WeekCardPanelNew:CheckTabRed()
|
||||
-- 检测页签红点
|
||||
local num = 0
|
||||
local openIndex = 1
|
||||
for key, value in pairs(allcards) do
|
||||
num = num + 1
|
||||
local isTrue = false
|
||||
for i = 1, #value do
|
||||
local data = WeekCardManager.GetWeekCardData(value[i].Id)
|
||||
if data then
|
||||
openIndex = i + 1
|
||||
self.tabs[i]:SetActive(true)
|
||||
elseif openIndex == i then
|
||||
self.tabs[i]:SetActive(true)
|
||||
else
|
||||
self.tabs[i]:SetActive(false)
|
||||
end
|
||||
Util.GetGameObject(self.tabs[i], "redpoint"):SetActive(false)
|
||||
--LogError("ddddddddddddddddd"..tostring(value[i].Id))
|
||||
isTrue = WeekCardManager.CheckTabRedReward(value[i].Id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue