【公告】打开公告前获取公告信息
parent
383f20aa32
commit
d433d2a690
|
@ -22,6 +22,9 @@ local LoginRoot_Version = VersionManager:GetVersionInfo("version")
|
|||
local LoginRoot_PackageVersion = VersionManager:GetVersionInfo("packageVersion")
|
||||
local orginLayer
|
||||
|
||||
local timeStamp = Time.realtimeSinceStartup
|
||||
local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign))
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function this:InitComponent()
|
||||
orginLayer = 0
|
||||
|
@ -74,7 +77,10 @@ function this:BindEvent()
|
|||
end)
|
||||
end)
|
||||
Util.AddClick(this.btnNotice, function()
|
||||
UIManager.OpenPanel(UIName.NoticePopup)
|
||||
RequestPanel.Show(Language[11128])
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign,function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup,str)
|
||||
end, nil, nil, nil)
|
||||
end)
|
||||
Util.AddClick(this.UserBtn, function()
|
||||
local user = PlayerPrefs.GetString(openIdkey, defaultOpenIdkey)
|
||||
|
@ -324,7 +330,10 @@ function this.OnReceiveServerList(str)
|
|||
if IsShowNotice then
|
||||
this.loginMask:SetActive(true)
|
||||
Timer.New(function()
|
||||
UIManager.OpenPanel(UIName.NoticePopup)
|
||||
RequestPanel.Show(Language[11128])
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign,function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup,str)
|
||||
end, nil, nil, nil)
|
||||
this.loginMask:SetActive(false)
|
||||
end, 2.5, 1):Start()
|
||||
end
|
||||
|
@ -335,7 +344,10 @@ function this.OnReceiveServerList(str)
|
|||
if IsShowNotice then
|
||||
this.loginMask:SetActive(true)
|
||||
Timer.New(function()
|
||||
UIManager.OpenPanel(UIName.NoticePopup)
|
||||
RequestPanel.Show(Language[11128])
|
||||
networkMgr:SendGetHttp(LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign,function (str)
|
||||
UIManager.OpenPanel(UIName.NoticePopup,str)
|
||||
end, nil, nil, nil)
|
||||
this.loginMask:SetActive(false)
|
||||
end, 2.5, 1):Start()
|
||||
end
|
||||
|
|
|
@ -31,8 +31,8 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function NoticePopup:OnOpen(...)
|
||||
this.GetNotice(...)
|
||||
|
||||
this.GetNotice()
|
||||
end
|
||||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
|
@ -50,12 +50,12 @@ function NoticePopup:OnDestroy()
|
|||
|
||||
end
|
||||
|
||||
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,
|
||||
function (str)
|
||||
function this.GetNotice(str)
|
||||
-- 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,function (str)
|
||||
-- end, nil, nil, nil)
|
||||
RequestPanel.Hide()
|
||||
if str == nil then
|
||||
return
|
||||
|
@ -74,7 +74,6 @@ function this.GetNotice()
|
|||
this.TitleText.text=Language[11129]
|
||||
this.ContentText.text=Language[11130]
|
||||
end
|
||||
end, nil, nil, nil)
|
||||
end
|
||||
|
||||
return NoticePopup
|
Loading…
Reference in New Issue