【登录】获取服务器列表和登录时的Channel差异化处理,分开配置,用于区分相同服务器列表的不同包

dev_chengFeng
JieLing 2021-06-30 09:16:28 +08:00
parent d492b01b5f
commit aae1e82a1c
2 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@ ServerConfigManager.SettingConfig = {
IS_NO_TALKING = "IS_NO_TALKING", -- 禁言 IS_NO_TALKING = "IS_NO_TALKING", -- 禁言
IS_LOAD_STREAMING = "IS_LOAD_STREAMING", -- 是否加载外部资源 IS_LOAD_STREAMING = "IS_LOAD_STREAMING", -- 是否加载外部资源
CURVED_TEXT_CODE = "CURVED_TEXT_CODE", -- 是否加载外部资源 CURVED_TEXT_CODE = "CURVED_TEXT_CODE", -- 是否加载外部资源
USER_CHANNEL = "USER_CHANNEL", -- 获取登录信息渠道
} }

View File

@ -21,6 +21,7 @@ local LoginRoot_Channel = ServerConfigManager.GetVersionInfo("channel")
local LoginRoot_Version = ServerConfigManager.GetVersionInfo("version") local LoginRoot_Version = ServerConfigManager.GetVersionInfo("version")
local LoginRoot_PackageVersion = ServerConfigManager.GetVersionInfo("packageVersion") local LoginRoot_PackageVersion = ServerConfigManager.GetVersionInfo("packageVersion")
local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.NOTICE_CHANNEL) or "" local LoginRoot_NoticeChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.NOTICE_CHANNEL) or ""
local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or ""
local orginLayer local orginLayer
local timeStamp = Time.realtimeSinceStartup local timeStamp = Time.realtimeSinceStartup
@ -601,13 +602,14 @@ end
function this.RequestHttpLogin() function this.RequestHttpLogin()
RequestPanel.Show(Language[11144]) RequestPanel.Show(Language[11144])
local url = "" local url = ""
local user_channel = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel
if IsSDKLogin then if IsSDKLogin then
url = LoginRoot_Url url = LoginRoot_Url
.. "jl_loginserver/getUserInfo?openId=" .. AppConst.OpenId .. "jl_loginserver/getUserInfo?openId=" .. AppConst.OpenId
.. "&serverId=" .. LoginManager.ServerId .. "&serverId=" .. LoginManager.ServerId
.. "&token=" .. AppConst.TokenStr .. "&token=" .. AppConst.TokenStr
.. "&platform=" .. 1 .. "&platform=" .. 1
.. "&channel=" .. LoginRoot_Channel .. "&channel=" .. user_channel
.. "&sub_channel=" .. LoginRoot_SubChannel .. "&sub_channel=" .. LoginRoot_SubChannel
.. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId .. "&pid=" .. AppConst.SdkChannel --LoginManager.pt_pId
.. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId .. "&gid=" .. AppConst.SdkPackageName --LoginManager.pt_gId
@ -625,7 +627,7 @@ function this.RequestHttpLogin()
.. "&serverId=" .. LoginManager.ServerId .. "&serverId=" .. LoginManager.ServerId
.. "&token=111" .. "&token=111"
.. "&platform=1" .. "&platform=1"
.. "&channel=" .. LoginRoot_Channel .. "&channel=" .. user_channel
.. "&sub_channel=" .. LoginRoot_SubChannel .. "&sub_channel=" .. LoginRoot_SubChannel
.. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0" .. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0"
.. "&version=" .. LoginRoot_PackageVersion .. "&version=" .. LoginRoot_PackageVersion
@ -636,7 +638,7 @@ function this.RequestHttpLogin()
.. "&serverId=" .. LoginManager.ServerId .. "&serverId=" .. LoginManager.ServerId
.. "&token=" .. LoginManager.token .. "&token=" .. LoginManager.token
.. "&platform=4" .. "&platform=4"
.. "&channel=" .. LoginRoot_Channel .. "&channel=" .. user_channel
.. "&sub_channel=" .. LoginRoot_SubChannel .. "&sub_channel=" .. LoginRoot_SubChannel
.. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0" .. "&admin=d53b3e8ef74bf72d8aafce3a1c8671a0"
.. "&version=" .. LoginRoot_PackageVersion .. "&version=" .. LoginRoot_PackageVersion