设置界面里的邮箱加一个开启限制
This commit is contained in:
parent
40fef6069a
commit
284f7ce3c7
@ -65,6 +65,7 @@ ModuleManager.MODULE_KEY = {
|
||||
DAILY_CHALLENGE = "daily_challenge", -- 每日挑战
|
||||
FUND = "act_level_gift", -- 成长基金
|
||||
ACT_GIFT_SHOW_OPEN = "act_gift_show_open", -- 弹窗礼包通用开启条件
|
||||
MAIL = "mail_open", -- 邮件
|
||||
}
|
||||
|
||||
local _moduleMgrs = {}
|
||||
|
||||
@ -190,7 +190,7 @@ local const = {
|
||||
["value"]=7
|
||||
},
|
||||
["model_daily_challenge"]={
|
||||
["value"]=8000
|
||||
["value"]=6000
|
||||
},
|
||||
["level_fund_hero_1"]={
|
||||
["value"]=24001
|
||||
|
||||
@ -54,9 +54,13 @@ local func_open = {
|
||||
["new_player_gift"]={
|
||||
["stage"]=2,
|
||||
["pop_ups"]=1
|
||||
},
|
||||
["mail_open"]={
|
||||
["stage"]=2,
|
||||
["pop_ups"]=1
|
||||
}
|
||||
}
|
||||
local config = {
|
||||
data=func_open,count=14
|
||||
data=func_open,count=15
|
||||
}
|
||||
return config
|
||||
@ -1,5 +1,8 @@
|
||||
local SelectOtherBtnUI = class("SelectOtherBtnUI", BaseUI)
|
||||
|
||||
local BTN_OFFSET = 32
|
||||
local BTN_INTERVAL = 16
|
||||
|
||||
function SelectOtherBtnUI:ctor()
|
||||
end
|
||||
|
||||
@ -21,6 +24,14 @@ function SelectOtherBtnUI:onLoadRootComplete()
|
||||
ModuleManager.MailManager:showMailUI()
|
||||
end)
|
||||
|
||||
local cellHeight = self.uiMap["select_other_btn_ui.bg.setting_btn"]:getRectHeight()
|
||||
local cellCount = 0
|
||||
local y = -BTN_OFFSET
|
||||
if DataManager.MailData:getIsOpen() then
|
||||
cellCount = cellCount + 1
|
||||
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setVisible(true)
|
||||
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setAnchoredPositionY(y)
|
||||
y = y - BTN_INTERVAL - cellHeight
|
||||
local redPoint, isAdRedPoint = DataManager.MailData:getRedPoint()
|
||||
if redPoint then
|
||||
if isAdRedPoint then
|
||||
@ -31,14 +42,19 @@ function SelectOtherBtnUI:onLoadRootComplete()
|
||||
else
|
||||
self.uiMap["select_other_btn_ui.bg.mail_btn"]:removeRedPoint()
|
||||
end
|
||||
|
||||
self.uiMap["select_other_btn_ui.bg.mail_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MAIL_NAME))
|
||||
|
||||
else
|
||||
self.uiMap["select_other_btn_ui.bg.mail_btn"]:setVisible(false)
|
||||
end
|
||||
cellCount = cellCount + 1
|
||||
self.uiMap["select_other_btn_ui.bg.setting_btn"]:setAnchoredPositionY(y)
|
||||
self.uiMap["select_other_btn_ui.bg.setting_btn"]:addClickListener(function()
|
||||
self:closeUI()
|
||||
ModuleManager.GameSettingManager:showSettingUI()
|
||||
end)
|
||||
self.uiMap["select_other_btn_ui.bg.setting_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
|
||||
|
||||
self.uiMap["select_other_btn_ui.bg"]:setSizeDeltaY(cellCount*cellHeight + (cellCount - 1)*BTN_INTERVAL + BTN_OFFSET*2)
|
||||
end
|
||||
|
||||
return SelectOtherBtnUI
|
||||
@ -787,7 +787,7 @@ function MainCityUI:refreshBottomRp()
|
||||
end
|
||||
|
||||
function MainCityUI:refreshSettingBtn()
|
||||
if DataManager.MailData:getRedPoint() then
|
||||
if DataManager.MailData:getIsOpen() and DataManager.MailData:getRedPoint() then
|
||||
self.settingbtn:addRedPoint(40, 40, 0.7)
|
||||
else
|
||||
self.settingbtn:removeRedPoint()
|
||||
|
||||
@ -247,10 +247,7 @@ function MailData:setLastMailId()
|
||||
end
|
||||
|
||||
function MailData:getIsOpen()
|
||||
if not self.mailIsOpen then
|
||||
self.mailIsOpen = ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MAIL_OPEN, true)
|
||||
end
|
||||
return self.mailIsOpen
|
||||
return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MAIL, true)
|
||||
end
|
||||
|
||||
return MailData
|
||||
Loading…
x
Reference in New Issue
Block a user