【防沉迷】修复切服不生效,添加防沉迷登录提示
parent
1dd4e984cb
commit
45ddf4e09e
|
@ -33,7 +33,7 @@ end
|
||||||
-- 获取包名
|
-- 获取包名
|
||||||
function PackageManager.GetPackageID()
|
function PackageManager.GetPackageID()
|
||||||
-- 优先使用sdk自带的
|
-- 优先使用sdk自带的
|
||||||
if LoginManager.SdkSubChannel then
|
if LoginManager.SdkSubChannel and LoginManager.SdkSubChannel ~= "" then
|
||||||
return LoginManager.SdkSubChannel
|
return LoginManager.SdkSubChannel
|
||||||
end
|
end
|
||||||
-- 否则使用配置的
|
-- 否则使用配置的
|
||||||
|
|
|
@ -44,9 +44,8 @@ function this.Initialize()
|
||||||
AppConst.SdkChannel = result[5] or ""
|
AppConst.SdkChannel = result[5] or ""
|
||||||
this.extData = result[6] or ""
|
this.extData = result[6] or ""
|
||||||
this.p_appId = result[7] or ""
|
this.p_appId = result[7] or ""
|
||||||
this.SdkSubChannel = result[8]
|
this.SdkSubChannel = result[8] or ""
|
||||||
AppConst.SdkPackageName = AndroidDeviceInfo.Instance:GetPackageName()
|
AppConst.SdkPackageName = AndroidDeviceInfo.Instance:GetPackageName()
|
||||||
end
|
|
||||||
-- 判断是否是注册并登录
|
-- 判断是否是注册并登录
|
||||||
if this.isRegister then
|
if this.isRegister then
|
||||||
this.isRegister = false
|
this.isRegister = false
|
||||||
|
@ -64,6 +63,14 @@ function this.Initialize()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLoginSuccess,result[1])
|
Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLoginSuccess,result[1])
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
local errCode = result[2]
|
||||||
|
if not errCode then
|
||||||
|
PopupTipPanel.ShowTip("登录失败")
|
||||||
|
elseif errCode == "101" then
|
||||||
|
MsgPanel.ShowOne("根据国家防沉迷相关规定,我们将不再向未成年人提供服务,敬请谅解!")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
SDKMgr.onSwitchAccountCallback = function(resp)
|
SDKMgr.onSwitchAccountCallback = function(resp)
|
||||||
|
|
Loading…
Reference in New Issue