登录的两个字段
parent
80cd2d8f28
commit
47b2684389
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue