商城开启条件
This commit is contained in:
parent
832701111b
commit
81fe73352d
@ -131,6 +131,7 @@ function MainCityUI:_addListeners()
|
||||
self:checkGift()
|
||||
end)
|
||||
self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function(params)
|
||||
if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||
if self.selectedIndex == MainCityUI.CLICK_BTN_TYPE[3] then
|
||||
return
|
||||
end
|
||||
@ -139,6 +140,7 @@ function MainCityUI:_addListeners()
|
||||
self.bottomBtnSpines[3]:playAnim("idle", false, false)
|
||||
end)
|
||||
self:refreshBottom(3, true)
|
||||
end
|
||||
end)
|
||||
DataManager.MailData:checkNewMail()
|
||||
end
|
||||
@ -216,6 +218,11 @@ function MainCityUI:initBottomUI()
|
||||
for i = 1, 3 do
|
||||
local cellCom = CellManager:addCellComp(uiMap["main_ui.bottom_node.bottom_btn_cell_" .. i], BOTTOM_BTN_CELL)
|
||||
cellCom:addClickListener(function()
|
||||
if i == 3 then -- 商城有开启条件
|
||||
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||
return
|
||||
end
|
||||
end
|
||||
if self.selectedIndex == i then
|
||||
return
|
||||
end
|
||||
|
||||
@ -8,7 +8,7 @@ function GemSellCell:init()
|
||||
self.cells = {}
|
||||
self.cellHeight = 0
|
||||
local cellHeight = nil
|
||||
local cfg = ConfigManager:getConfig("mall_treasure") -- 审核模式读取另一张表
|
||||
local cfg = DataManager.ShopData:getMallTreasureConfig() -- 审核模式读取另一张表
|
||||
for i = 1, 19 do -- 正常9个 提审19个
|
||||
local cell = uiMap["gem_sell_cell.cell_" .. i]
|
||||
if cellHeight == nil then
|
||||
@ -30,7 +30,7 @@ function GemSellCell:init()
|
||||
end
|
||||
|
||||
function GemSellCell:refresh()
|
||||
local cfg = ConfigManager:getConfig("mall_treasure")
|
||||
local cfg = DataManager.ShopData:getMallTreasureConfig()
|
||||
for k, v in ipairs(self.cells) do
|
||||
local id = k -- 目前配置表结构如此
|
||||
v:refresh(id, cfg[id])
|
||||
|
||||
@ -351,7 +351,7 @@ end
|
||||
|
||||
-- 常驻钻石礼包 **********************************************************************************************
|
||||
function ShopData:getMallTreasureConfig()
|
||||
return ConfigManager:getConfig("mall_treasure")
|
||||
return ConfigManager:getConfig("mall_treasure") -- 审核模式会去读另一张表 TODOJ
|
||||
end
|
||||
|
||||
-- 常驻钻石礼包结束 ----------------------------------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user