登录的两个字段

master
罗家炜 2025-08-25 19:23:57 +08:00
parent 80cd2d8f28
commit 47b2684389
2 changed files with 15 additions and 2 deletions

View File

@ -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)

View File

@ -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",