【封禁】添加封禁提示
parent
523e5c7328
commit
779f61cc15
|
|
@ -411,18 +411,26 @@ function this.OnReceiveLogin(str)
|
|||
Log(str)
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
Log("uid:" .. data.uid)
|
||||
Log("token:" .. data.token)
|
||||
if data.uid and data.token and not LoginManager.IsLogin then
|
||||
AppConst.UserId = data.uid
|
||||
AppConst.Token = data.token
|
||||
local openId = AppConst.isSDKLogin and AppConst.OpenId or PlayerPrefs.GetString(openIdkey)
|
||||
NetManager.LoginRequest(openId, function()
|
||||
if not LoginManager.IsLogin then
|
||||
LoginManager.IsLogin = true
|
||||
this.ExecuteLoading()
|
||||
end
|
||||
end)
|
||||
if not data.errorCode or data.errorCode == 0 then
|
||||
Log("uid:" .. data.uid)
|
||||
Log("token:" .. data.token)
|
||||
if data.uid and data.token and not LoginManager.IsLogin then
|
||||
AppConst.UserId = data.uid
|
||||
AppConst.Token = data.token
|
||||
local openId = AppConst.isSDKLogin and AppConst.OpenId or PlayerPrefs.GetString(openIdkey)
|
||||
NetManager.LoginRequest(openId, function()
|
||||
if not LoginManager.IsLogin then
|
||||
LoginManager.IsLogin = true
|
||||
this.ExecuteLoading()
|
||||
end
|
||||
end)
|
||||
end
|
||||
elseif data.errorCode == -1 then --被封禁
|
||||
if data.reason then
|
||||
local s = string.split(data.reason, "|")
|
||||
local t = os.date("%Y/%m/%d %H:%M:%S", math.floor(tonumber(s[1])/1000))
|
||||
MsgPanel.ShowOne(string.format("您的账号已被封禁\n\n封禁原因:%s\n\n解封日期:%s", s[2], t))
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue