审核模式增加mall_treasure表
This commit is contained in:
parent
d280b4ef3d
commit
b64ea50f65
@ -11,6 +11,9 @@ function ConfigManager:_getConfig(configName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ConfigManager:getConfig(configName)
|
function ConfigManager:getConfig(configName)
|
||||||
|
if CS.BF.BFMain.IsShenhe and configName == "mall_treasure" then
|
||||||
|
return self:getMallTreasureConfig().data
|
||||||
|
end
|
||||||
local config = self.configs[configName]
|
local config = self.configs[configName]
|
||||||
if config == nil then
|
if config == nil then
|
||||||
config = self:_getConfig(configName)
|
config = self:_getConfig(configName)
|
||||||
@ -121,4 +124,222 @@ function ConfigManager:clearConfigCache(configName)
|
|||||||
package.loaded[CONFIG_PATH .. configName] = nil
|
package.loaded[CONFIG_PATH .. configName] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ConfigManager:getMallTreasureConfig()
|
||||||
|
local mallTreasure = {
|
||||||
|
[1]={
|
||||||
|
["recharge_id"]=1,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=1
|
||||||
|
},
|
||||||
|
[2]={
|
||||||
|
["recharge_id"]=2,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=1
|
||||||
|
},
|
||||||
|
[3]={
|
||||||
|
["recharge_id"]=3,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=90
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=2
|
||||||
|
},
|
||||||
|
[4]={
|
||||||
|
["recharge_id"]=4,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=120
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=2
|
||||||
|
},
|
||||||
|
[5]={
|
||||||
|
["recharge_id"]=5,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=150
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=2
|
||||||
|
},
|
||||||
|
[6]={
|
||||||
|
["recharge_id"]=6,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=180
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[7]={
|
||||||
|
["recharge_id"]=7,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=210
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[8]={
|
||||||
|
["recharge_id"]=8,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=240
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[9]={
|
||||||
|
["recharge_id"]=9,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=270
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[10]={
|
||||||
|
["recharge_id"]=10,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=300
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[11]={
|
||||||
|
["recharge_id"]=11,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=360
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[12]={
|
||||||
|
["recharge_id"]=12,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=450
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[13]={
|
||||||
|
["recharge_id"]=13,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=600
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[14]={
|
||||||
|
["recharge_id"]=14,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=750
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[15]={
|
||||||
|
["recharge_id"]=15,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=900
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[16]={
|
||||||
|
["recharge_id"]=16,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=1500
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[17]={
|
||||||
|
["recharge_id"]=17,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=2100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[18]={
|
||||||
|
["recharge_id"]=18,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=3000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
},
|
||||||
|
[19]={
|
||||||
|
["recharge_id"]=19,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=2,
|
||||||
|
["num"]=6000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["limit"]=3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local config = {
|
||||||
|
data=mallTreasure,count=12
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
end
|
||||||
|
|
||||||
return ConfigManager
|
return ConfigManager
|
||||||
@ -839,26 +839,22 @@ function MainCityUI:checkTutorial()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 检查礼包
|
-- 检查礼包(首充/章节/新手/助力/成长/金币顺序)
|
||||||
function MainCityUI:checkGift()
|
function MainCityUI:checkGift()
|
||||||
-- 引导其间不处理
|
-- 引导其间不处理
|
||||||
if DataManager.TutorialData:getIsHaveTutorial() then
|
if DataManager.TutorialData:getIsHaveTutorial() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- 章节礼包
|
-- 章节礼包
|
||||||
local popUpGift = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT)
|
local chapterPopUpGifts = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT)
|
||||||
if popUpGift and #popUpGift > 0 then
|
|
||||||
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, popUpGift[1])
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
-- 通用礼包
|
-- 通用礼包
|
||||||
local popUpGift = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
|
||||||
if popUpGift and #popUpGift > 0 then
|
|
||||||
-- 先遍历找出符合弹出的类型
|
|
||||||
local beginnerGiftIds = {}
|
local beginnerGiftIds = {}
|
||||||
local levelUpGiftIds = {}
|
local levelUpGiftIds = {}
|
||||||
local firstRechargeIds = {}
|
local firstRechargeIds = {}
|
||||||
for _, actId in ipairs(popUpGift) do
|
local actPopUpGifts = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)
|
||||||
|
if actPopUpGifts and #actPopUpGifts > 0 then
|
||||||
|
-- 先遍历找出符合弹出的类型
|
||||||
|
for _, actId in ipairs(actPopUpGifts) do
|
||||||
local cfgInfo = DataManager.ShopData:getActGiftConfig()[actId]
|
local cfgInfo = DataManager.ShopData:getActGiftConfig()[actId]
|
||||||
if cfgInfo then
|
if cfgInfo then
|
||||||
-- 新手礼包
|
-- 新手礼包
|
||||||
@ -875,11 +871,20 @@ function MainCityUI:checkGift()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
-- 特殊的 成长礼包
|
||||||
|
local growUpPopUpGifts = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT)
|
||||||
|
-- 按顺序弹出(首充/章节/新手/助力/成长/金币顺序)
|
||||||
-- 首充礼包
|
-- 首充礼包
|
||||||
if #firstRechargeIds then
|
if #firstRechargeIds then
|
||||||
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, firstRechargeIds[1])
|
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, firstRechargeIds[1])
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
-- 章节礼包
|
||||||
|
if chapterPopUpGifts and #chapterPopUpGifts > 0 then
|
||||||
|
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, chapterPopUpGifts[1])
|
||||||
|
return true
|
||||||
|
end
|
||||||
-- 新手礼包
|
-- 新手礼包
|
||||||
if #beginnerGiftIds > 0 then
|
if #beginnerGiftIds > 0 then
|
||||||
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, beginnerGiftIds[1])
|
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, beginnerGiftIds[1])
|
||||||
@ -890,11 +895,9 @@ function MainCityUI:checkGift()
|
|||||||
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, levelUpGiftIds[1])
|
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, levelUpGiftIds[1])
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
-- 成长礼包
|
||||||
-- 特殊的 成长礼包
|
if growUpPopUpGifts and #growUpPopUpGifts > 0 then
|
||||||
local popUpGift = DataManager.ShopData:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT)
|
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT, growUpPopUpGifts[1])
|
||||||
if popUpGift and #popUpGift > 0 then
|
|
||||||
ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT, popUpGift[1])
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -33,7 +33,7 @@ function FirstRechargePopUI:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.descText = self.uiMap["first_recharge_pop_ui.bg.desc_text"]
|
self.descText = self.uiMap["first_recharge_pop_ui.bg.desc_text"]
|
||||||
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_35)) -- 充值购买任意商品,即可获得如下奖励,仅此一次!
|
self.descText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_35)) -- 充值购买任意商品,即可获得如下奖励,仅此一次!
|
||||||
|
|
||||||
self.funcBtn = self.uiMap["first_recharge_pop_ui.bg.func_btn"]
|
self.funcBtn = self.uiMap["first_recharge_pop_ui.bg.func_btn"]
|
||||||
self.btnJumpText = self.uiMap["first_recharge_pop_ui.bg.func_btn.jump_text"]
|
self.btnJumpText = self.uiMap["first_recharge_pop_ui.bg.func_btn.jump_text"]
|
||||||
|
|||||||
@ -119,6 +119,7 @@ function ShopData:markPopUpGift(actType, actId)
|
|||||||
self.needPopUpGift[actType] = {}
|
self.needPopUpGift[actType] = {}
|
||||||
end
|
end
|
||||||
table.insert(self.needPopUpGift[actType], actId)
|
table.insert(self.needPopUpGift[actType], actId)
|
||||||
|
table.sort(self.needPopUpGift[actType])
|
||||||
end
|
end
|
||||||
|
|
||||||
function ShopData:removePopUpGift(actType, actId)
|
function ShopData:removePopUpGift(actType, actId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user