添加公告显示控制字段,获取公告接口添加一些参数用于区分提审,测试和正式服

gaoxin 2020-09-24 17:26:27 +08:00
parent 3462835c8f
commit bda6ace7c9
3 changed files with 31 additions and 13 deletions

View File

@ -5,6 +5,8 @@
* @Created by MagicianJoker
--]]
SERVER_VERSION = 0
-- 启用功能引导
ENABLE_FUNC_GUIDE = 1 --0关闭1开启
RECHARGEABLE = true --false不可充值 true可充值

View File

@ -5,7 +5,8 @@ local this = LoginPanel
this.LoginWay = { Account = 0, WeChat = 1 }
local ServerVersion = 1
local ServerVersion = SERVER_VERSION
local IsShowNotice = true
local IsSDKLogin = AppConst.isSDK and AppConst.isSDKLogin
local IsDevelopLogin = true
@ -38,6 +39,8 @@ function this:InitComponent()
this.UserBtnText = Util.GetGameObject(this.loginPart, "userBtn/Text"):GetComponent("Text")
this.btnUser = Util.GetGameObject(this.loginPart, "btnUser")
this.btnNotice = Util.GetGameObject(this.loginPart, "btnNotice")
this.btnNotice:SetActive(IsShowNotice)
---selectServerPart
this.serverSelectPart = Util.GetGameObject(this.loginPart, "serverSelect")
@ -320,21 +323,24 @@ function this.OnReceiveServerList(str)
PlayerPrefs.SetString(openIdPw, pw)
end)
else
this.loginMask:SetActive(true)
Timer.New(function()
UIManager.OpenPanel(UIName.NoticePopup)
this.loginMask:SetActive(false)
end, 2.5, 1):Start()
if IsShowNotice then
this.loginMask:SetActive(true)
Timer.New(function()
UIManager.OpenPanel(UIName.NoticePopup)
this.loginMask:SetActive(false)
end, 2.5, 1):Start()
end
end
end)
end
else
this.loginMask:SetActive(true)
Timer.New(function()
UIManager.OpenPanel(UIName.NoticePopup)
this.loginMask:SetActive(false)
end, 2.5, 1):Start()
if IsShowNotice then
this.loginMask:SetActive(true)
Timer.New(function()
UIManager.OpenPanel(UIName.NoticePopup)
this.loginMask:SetActive(false)
end, 2.5, 1):Start()
end
end
end)
end

View File

@ -2,6 +2,9 @@
NoticePopup = Inherit(BasePanel)
local this = NoticePopup
local LoginRoot_Url = VersionManager:GetVersionInfo("serverUrl")
local LoginRoot_SubChannel = VersionManager:GetVersionInfo("subChannel")
local LoginRoot_Channel = VersionManager:GetVersionInfo("channel")
local ServerVersion = SERVER_VERSION
--初始化组件(用于子类重写)
function NoticePopup:InitComponent()
@ -55,7 +58,14 @@ function this.GetNotice()
local timeStamp = Time.realtimeSinceStartup
local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign))
RequestPanel.Show(Language[11128])
networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign,
Log(string.format(
"%sjl_loginserver/getNotice?timestamp=%s&sign=%s&channel=%s&sub_channel=%s&server_version=%s",
LoginRoot_Url, timeStamp, timeSign, LoginRoot_Channel, LoginRoot_SubChannel, ServerVersion))
networkMgr:SendGetHttp(string.format(
"%sjl_loginserver/getNotice?timestamp=%s&sign=%s&channel=%s&sub_channel=%s&server_version=%s",
LoginRoot_Url, timeStamp, timeSign, LoginRoot_Channel, LoginRoot_SubChannel, ServerVersion),
function (str)
RequestPanel.Hide()
if str == nil then