【用户协议】添加功能开启配置
parent
9a3c8508c4
commit
068bf059a5
|
@ -18,8 +18,9 @@ ServerConfigManager.SettingConfig = {
|
|||
PACKAGE_CONFIG = "PACKAGE_CONFIG", -- 包配置
|
||||
IS_NO_TALKING = "IS_NO_TALKING", -- 禁言
|
||||
IS_LOAD_STREAMING = "IS_LOAD_STREAMING", -- 是否加载外部资源
|
||||
CURVED_TEXT_CODE = "CURVED_TEXT_CODE", -- 是否加载外部资源
|
||||
CURVED_TEXT_CODE = "CURVED_TEXT_CODE", -- 曲线文字组件
|
||||
USER_CHANNEL = "USER_CHANNEL", -- 获取登录信息渠道
|
||||
USER_PROTO = "USER_PROTO", -- 用户协议功能是否开启
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfig
|
|||
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or ""
|
||||
local orginLayer
|
||||
|
||||
local IsUserProtoActive = ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.USER_PROTO)
|
||||
|
||||
local timeStamp = Time.realtimeSinceStartup
|
||||
local timeSign = Util.MD5Encrypt(string.format("%s%s", timeStamp, LoginManager.sign))
|
||||
|
||||
|
@ -107,6 +109,7 @@ function this:InitComponent()
|
|||
this.privacyBtn = Util.GetGameObject(this.gameObject, "protos/privacyBtn")
|
||||
this.ConfirmBtn = Util.GetGameObject(this.gameObject, "protos/Confirm")
|
||||
this.ConfirmImg = Util.GetGameObject(this.ConfirmBtn, "gou")
|
||||
this.protos:SetActive(IsUserProtoActive)
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -372,13 +375,19 @@ function this.RequestProtos(userId)
|
|||
this.ConfirmImg:SetActive(PlayerPrefs.GetInt("IHaveConfirmProtos") == 1)
|
||||
UrlList[1] = ""
|
||||
UrlList[2] = ""
|
||||
if not IsUserProtoActive then
|
||||
Log("用户和隐私协议功能未开启")
|
||||
return
|
||||
end
|
||||
|
||||
local ChannelID = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
|
||||
local PackageID = PackageManager.GetPackageID()
|
||||
if PackageID then
|
||||
ChannelID = ChannelID .. PackageID
|
||||
end
|
||||
networkMgr:SendGetHttp(LoginRoot_Url.."jl_loginserver/getAgreement?gamePack="..ChannelID, function (str)
|
||||
local url = LoginRoot_Url.."jl_loginserver/getAgreement?gamePack="..ChannelID
|
||||
Log(url)
|
||||
networkMgr:SendGetHttp(url, function (str)
|
||||
local json = require 'cjson'
|
||||
local data = json.decode(str)
|
||||
if data.parms then
|
||||
|
@ -665,7 +674,7 @@ end
|
|||
|
||||
this.isLoginClick = false
|
||||
function this.OnLoginClick()
|
||||
if HaveConfirm and PlayerPrefs.GetInt("IHaveConfirmProtos") == 0 then
|
||||
if IsUserProtoActive and HaveConfirm and PlayerPrefs.GetInt("IHaveConfirmProtos") == 0 then
|
||||
PopupTipPanel.ShowTip("为了保证您的个人隐私和隐私安全,请详细阅读并同意用户协议及隐私政策")
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue