From 04271808ae1505ae5fbe4a22d477d6f93f808d98 Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1545929779@qq.com> Date: Wed, 10 Jul 2024 17:02:12 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E8=BF=9E=E7=B1=B3=E5=A4=9A=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E6=9C=8D=E4=BF=AE=E6=94=B9=20=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=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 a5aae7137fcc2835d0b7198658f4481db17cfc8d. --- .../~Lua/Modules/Login/LoginManager.lua | 4 ++-- .../ManagedResources/~Lua/Modules/Login/LoginPanel.lua | 10 ++++------ .../~Lua/Modules/Login/NoticePopup.lua | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index b44166f01..e1818469c 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 .."registerUser?userName="..name .."&password="..pw.."&repeat="..pw.."&sign="..sign, + networkMgr:SendGetHttp(LoginRoot_Url .."tk/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.."userLogin?userName="..name.."&password="..pw.."&sign="..sign, function(str) + networkMgr:SendGetHttp(LoginRoot_Url.."tk/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 f73d6e279..628145a07 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( - "%sgetServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s", + "%stk/getServerList?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,9 +535,7 @@ 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) @@ -826,7 +824,7 @@ function this.OnConnect(network) RequestPanel.Show(GetLanguageStrById(11125)) if IsSDKLogin then local str = LoginRoot_Url - .."getUserInfo?openId="..AppConst.OpenId + .."tk/getUserInfo?openId="..AppConst.OpenId .."&serverId="..LoginManager.ServerId .."&token="..AppConst.MiTokenStr .."&platform="..1 @@ -839,7 +837,7 @@ function this.OnConnect(network) networkMgr:SendGetHttp(str, this.OnReceiveLogin, nil, nil, nil) else local str = LoginRoot_Url - .."getUserInfo?openId="..LoginManager.openId + .."tk/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 c01e6973b..003aaa0ff 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.."getNotice?timestamp="..timeStamp.."&sign="..timeSign, function (str) + networkMgr:SendGetHttp(LoginRoot_Url.."tk/getNotice?timestamp="..timeStamp.."&sign="..timeSign, function (str) RequestPanel.Hide() if str == nil then return