parent
04271808ae
commit
9d33b67862
|
|
@ -127,7 +127,7 @@ end
|
||||||
function this.RequestRegist(name, pw, call)
|
function this.RequestRegist(name, pw, call)
|
||||||
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
||||||
RequestPanel.Show(GetLanguageStrById(11115))
|
RequestPanel.Show(GetLanguageStrById(11115))
|
||||||
networkMgr:SendGetHttp(LoginRoot_Url .."tk/registerUser?userName="..name .."&password="..pw.."&repeat="..pw.."&sign="..sign,
|
networkMgr:SendGetHttp(LoginRoot_Url .."registerUser?userName="..name .."&password="..pw.."&repeat="..pw.."&sign="..sign,
|
||||||
function(str)
|
function(str)
|
||||||
RequestPanel.Hide()
|
RequestPanel.Hide()
|
||||||
if str == nil then
|
if str == nil then
|
||||||
|
|
@ -176,7 +176,7 @@ end
|
||||||
function this.RequestUser(name, pw, call)
|
function this.RequestUser(name, pw, call)
|
||||||
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign))
|
||||||
RequestPanel.Show(GetLanguageStrById(11117))
|
RequestPanel.Show(GetLanguageStrById(11117))
|
||||||
networkMgr:SendGetHttp(LoginRoot_Url.."tk/userLogin?userName="..name.."&password="..pw.."&sign="..sign, function(str)
|
networkMgr:SendGetHttp(LoginRoot_Url.."userLogin?userName="..name.."&password="..pw.."&sign="..sign, function(str)
|
||||||
RequestPanel.Hide()
|
RequestPanel.Hide()
|
||||||
if str == nil then
|
if str == nil then
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ end
|
||||||
function this.RequestServerList(userId, callback)
|
function this.RequestServerList(userId, callback)
|
||||||
RequestPanel.Show(GetLanguageStrById(11121))
|
RequestPanel.Show(GetLanguageStrById(11121))
|
||||||
local str = string.format(
|
local str = string.format(
|
||||||
"%stk/getServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s",
|
"%sgetServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s",
|
||||||
LoginRoot_Url, userId, LoginRoot_Channel, LoginRoot_SubChannel, LoginRoot_Version)
|
LoginRoot_Url, userId, LoginRoot_Channel, LoginRoot_SubChannel, LoginRoot_Version)
|
||||||
Log(str)
|
Log(str)
|
||||||
networkMgr:SendGetHttp(str, callback, nil, nil, nil)
|
networkMgr:SendGetHttp(str, callback, nil, nil, nil)
|
||||||
|
|
@ -535,7 +535,9 @@ function this.SetServerList(data)
|
||||||
PlayerPrefs.SetInt(lastServerIndex, 1)
|
PlayerPrefs.SetInt(lastServerIndex, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if lastIndex==nil then
|
||||||
|
lastIndex=1
|
||||||
|
end
|
||||||
PlayerManager.serverInfo = this.serverList[lastIndex]
|
PlayerManager.serverInfo = this.serverList[lastIndex]
|
||||||
LoginManager.SocketAddress = this.serverList[lastIndex].ip
|
LoginManager.SocketAddress = this.serverList[lastIndex].ip
|
||||||
LoginManager.SocketPort = tonumber(this.serverList[lastIndex].port)
|
LoginManager.SocketPort = tonumber(this.serverList[lastIndex].port)
|
||||||
|
|
@ -824,7 +826,7 @@ function this.OnConnect(network)
|
||||||
RequestPanel.Show(GetLanguageStrById(11125))
|
RequestPanel.Show(GetLanguageStrById(11125))
|
||||||
if IsSDKLogin then
|
if IsSDKLogin then
|
||||||
local str = LoginRoot_Url
|
local str = LoginRoot_Url
|
||||||
.."tk/getUserInfo?openId="..AppConst.OpenId
|
.."getUserInfo?openId="..AppConst.OpenId
|
||||||
.."&serverId="..LoginManager.ServerId
|
.."&serverId="..LoginManager.ServerId
|
||||||
.."&token="..AppConst.MiTokenStr
|
.."&token="..AppConst.MiTokenStr
|
||||||
.."&platform="..1
|
.."&platform="..1
|
||||||
|
|
@ -837,7 +839,7 @@ function this.OnConnect(network)
|
||||||
networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil)
|
networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil)
|
||||||
else
|
else
|
||||||
local str = LoginRoot_Url
|
local str = LoginRoot_Url
|
||||||
.."tk/getUserInfo?openId="..LoginManager.openId
|
.."getUserInfo?openId="..LoginManager.openId
|
||||||
.."&serverId="..LoginManager.ServerId
|
.."&serverId="..LoginManager.ServerId
|
||||||
.."&token="..LoginManager.token
|
.."&token="..LoginManager.token
|
||||||
.."&platform=4"
|
.."&platform=4"
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ function this.GetNotice()
|
||||||
local timeStamp = Time.realtimeSinceStartup
|
local timeStamp = Time.realtimeSinceStartup
|
||||||
local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign))
|
local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign))
|
||||||
RequestPanel.Show(GetLanguageStrById(11128))
|
RequestPanel.Show(GetLanguageStrById(11128))
|
||||||
networkMgr:SendGetHttp(LoginRoot_Url.."tk/getNotice?timestamp="..timeStamp.."&sign="..timeSign, function (str)
|
networkMgr:SendGetHttp(LoginRoot_Url.."getNotice?timestamp="..timeStamp.."&sign="..timeSign, function (str)
|
||||||
RequestPanel.Hide()
|
RequestPanel.Hide()
|
||||||
if str == nil then
|
if str == nil then
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue