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