From 9d33b6786273b98646aaa9636e94fcb7542e25ac Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1545929779@qq.com> Date: Thu, 11 Jul 2024 17:19:13 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=E8=BF=9E=E7=B1=B3=E5=A4=9A?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=9C=8D=E4=BF=AE=E6=94=B9=20=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E8=B7=AF=E5=BE=84=E5=8E=BB=E6=8E=89tk/""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 04271808ae1505ae5fbe4a22d477d6f93f808d98. --- .../~Lua/Modules/Login/LoginManager.lua | 4 ++-- .../ManagedResources/~Lua/Modules/Login/LoginPanel.lua | 10 ++++++---- .../~Lua/Modules/Login/NoticePopup.lua | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) 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