diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index e1818469c..b44166f01 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua @@ -127,7 +127,7 @@ end function this.RequestRegist(name, pw, call) local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign)) 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) RequestPanel.Hide() if str == nil then @@ -176,7 +176,7 @@ end function this.RequestUser(name, pw, call) local sign = Util.MD5Encrypt(string.format("%s%s%s", name, pw, this.sign)) 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() if str == nil then return diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 628145a07..f73d6e279 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -324,7 +324,7 @@ end function this.RequestServerList(userId, callback) RequestPanel.Show(GetLanguageStrById(11121)) 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) Log(str) networkMgr:SendGetHttp(str, callback, nil, nil, nil) @@ -535,7 +535,9 @@ function this.SetServerList(data) PlayerPrefs.SetInt(lastServerIndex, 1) end end - + if lastIndex==nil then + lastIndex=1 + end PlayerManager.serverInfo = this.serverList[lastIndex] LoginManager.SocketAddress = this.serverList[lastIndex].ip LoginManager.SocketPort = tonumber(this.serverList[lastIndex].port) @@ -824,7 +826,7 @@ function this.OnConnect(network) RequestPanel.Show(GetLanguageStrById(11125)) if IsSDKLogin then local str = LoginRoot_Url - .."tk/getUserInfo?openId="..AppConst.OpenId + .."getUserInfo?openId="..AppConst.OpenId .."&serverId="..LoginManager.ServerId .."&token="..AppConst.MiTokenStr .."&platform="..1 @@ -837,7 +839,7 @@ function this.OnConnect(network) networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil) else local str = LoginRoot_Url - .."tk/getUserInfo?openId="..LoginManager.openId + .."getUserInfo?openId="..LoginManager.openId .."&serverId="..LoginManager.ServerId .."&token="..LoginManager.token .."&platform=4" diff --git a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua index 003aaa0ff..c01e6973b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/NoticePopup.lua @@ -59,7 +59,7 @@ function this.GetNotice() local timeStamp = Time.realtimeSinceStartup local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign)) 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() if str == nil then return