【sdk】登录参数空值处理
parent
8bdda8e1a8
commit
930a16b2e7
|
@ -1938,10 +1938,16 @@ end
|
|||
|
||||
-- 网络url转码
|
||||
function decodeURI(s)
|
||||
if not s then
|
||||
return ""
|
||||
end
|
||||
s = string.gsub(s, '%%(%x%x)', function(h) return string.char(tonumber(h, 16)) end)
|
||||
return s
|
||||
end
|
||||
function encodeURI(s)
|
||||
if not s then
|
||||
return ""
|
||||
end
|
||||
s = string.gsub(s, "([^%w%.%- ])", function(c) return string.format("%%%02X", string.byte(c)) end)
|
||||
return string.gsub(s, " ", "+")
|
||||
end
|
|
@ -37,13 +37,13 @@ function this.Initialize()
|
|||
local result = string.split(loginResp, "#")
|
||||
result[1] = tonumber(result[1])
|
||||
if result[1] == SDK_RESULT.SUCCESS then
|
||||
AppConst.SdkId = result[2]
|
||||
AppConst.OpenId = result[2]
|
||||
this.SdkLoginTimeStamp = result[3]
|
||||
AppConst.TokenStr = result[4]
|
||||
AppConst.SdkChannel = result[5]
|
||||
this.extData = result[6]
|
||||
this.p_appId = result[7]
|
||||
AppConst.SdkId = result[2] or ""
|
||||
AppConst.OpenId = result[2] or ""
|
||||
this.SdkLoginTimeStamp = result[3] or ""
|
||||
AppConst.TokenStr = result[4] or ""
|
||||
AppConst.SdkChannel = result[5] or ""
|
||||
this.extData = result[6] or ""
|
||||
this.p_appId = result[7] or ""
|
||||
AppConst.SdkPackageName = AndroidDeviceInfo.Instance:GetPackageName()
|
||||
end
|
||||
-- 判断是否是注册并登录
|
||||
|
|
Loading…
Reference in New Issue