From 47b2684389271ce345dd034052e15027af1873f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Mon, 25 Aug 2025 19:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=9A=84=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/Controller/LoginController.lua | 14 ++++++++++++-- lua_probject/base_project/Game/Protocol.lua | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua index acff8bff..c4914d79 100644 --- a/lua_probject/base_project/Game/Controller/LoginController.lua +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -70,6 +70,16 @@ local function __Login(cmd, _data, callBack) end) end +local function __getCode(_data, callBack) + local _client = ControllerManager.WebClient + _client:send(Protocol.WEB_GET_CODE, { id = _data.id }, function(res) + if (res.ReturnCode == 0) then + _data["uuidCode"] = res.Data.code + __Login(Protocol.WEB_ID_PASSWORD_LOGIN, _data, callBack) + end + end) +end + --手机登录 function M:PhoneLogin(phone, code, callback) local _data = {} @@ -90,8 +100,8 @@ function M:IdPasswordLogin(uid, password, callback) local _data = {} _data["id"] = tonumber(uid) _data["password"] = password - _data["deviceCode"] = UnityEngine.SystemInfo.unsupportedIdentifier - __Login(Protocol.WEB_ID_PASSWORD_LOGIN, _data, callback) + _data["deviceCode"] = UnityEngine.SystemInfo.deviceUniqueIdentifier + __getCode(_data, callback) end function M:Login(callback) diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua index 1fafb370..af68dbed 100644 --- a/lua_probject/base_project/Game/Protocol.lua +++ b/lua_probject/base_project/Game/Protocol.lua @@ -27,6 +27,9 @@ Protocol = { -- 实名认证 WEB_REAL_NAME_IDENTIFY = "acc/certification", + -- getcode + WEB_GET_CODE = "acc/get_code", + ----map mode---- WEB_GET_PROVINCES = "acc/get_provinces",