From c538ca5ea7392170332aa39037e2a9ac2d946b21 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Sun, 8 Oct 2023 11:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E5=AE=A2=E7=99=BB=E5=BD=95=E4=BD=BF?= =?UTF-8?q?=E7=94=A8pathea=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/login/login_servlet.lua | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/server/login/login_servlet.lua b/server/login/login_servlet.lua index 9f0cb6ca..ca0540be 100644 --- a/server/login/login_servlet.lua +++ b/server/login/login_servlet.lua @@ -62,20 +62,18 @@ function LoginServlet:on_account_login_req(session, cmd_id, body, session_id) end local device_id = body.device_id local account_params = {} - if platform >= PLATFORM_PASSWORD then - body.ip = session.ip - --登录验证 - local result = event_mgr:notify_listener("on_platform_login", platform, open_id, access_token, body, account_params) - local ok, code, sdk_open_id, sdk_device_id = tunpack(result) - local login_failed, login_code = qfailed(code, ok) - if login_failed then - log_err("[LoginServlet][on_account_login_req] verify failed! open_id: {} token:{} code:{}", open_id, access_token, login_code) - client_mgr:callback_errcode(session, cmd_id, login_code, session_id) - return false - end - -- 三方信息 - open_id, device_id = sdk_open_id, sdk_device_id + body.ip = session.ip + --登录验证 + local result = event_mgr:notify_listener("on_platform_login", platform, open_id, access_token, body, account_params) + local ok, code, sdk_open_id, sdk_device_id = tunpack(result) + local login_failed, login_code = qfailed(code, ok) + if login_failed then + log_err("[LoginServlet][on_account_login_req] verify failed! open_id: {} token:{} code:{}", open_id, access_token, login_code) + client_mgr:callback_errcode(session, cmd_id, login_code, session_id) + return false end + -- 三方信息 + open_id, device_id = sdk_open_id, sdk_device_id --加载账号信息 local account = login_dao:load_account(open_id) if not account then