【bug】修复老包报错
parent
097d754111
commit
5d149e54fa
|
@ -18,15 +18,9 @@ end
|
||||||
function ServerConfigManager.IsSettingActive(settingType)
|
function ServerConfigManager.IsSettingActive(settingType)
|
||||||
local s_isActive = "Setting."..settingType..".isActive"
|
local s_isActive = "Setting."..settingType..".isActive"
|
||||||
local s_versionCode = "Setting."..settingType..".versionCode"
|
local s_versionCode = "Setting."..settingType..".versionCode"
|
||||||
local isActive = ServerConfigManager.GetConfigInfo(s_isActive) == "1"
|
local isActive = ServerConfigManager.GetConfigInfo(s_isActive)
|
||||||
if isActive then -- 激活
|
if isActive and isActive == "1" then -- 激活
|
||||||
if not AppConst.isSDK then
|
return true
|
||||||
return true
|
|
||||||
end
|
|
||||||
local vc = AndroidDeviceInfo.Instance:GetVersionCode()
|
|
||||||
if vc >= tonumber(ServerConfigManager.GetConfigInfo(s_versionCode)) then --符合包版本
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -40,23 +34,27 @@ end
|
||||||
|
|
||||||
-- 获取version信息(老版本信息,新版中用于获取版本号,包版本号,)
|
-- 获取version信息(老版本信息,新版中用于获取版本号,包版本号,)
|
||||||
function ServerConfigManager.GetVersionInfo(key)
|
function ServerConfigManager.GetVersionInfo(key)
|
||||||
-- 包版本大于启用的版本使用新的配置
|
local v = ServerConfigManager.GetConfigInfo(key)
|
||||||
if not AppConst.isSDK or AndroidDeviceInfo.Instance:GetVersionCode() >= _ActiveCode then
|
if not v then
|
||||||
local v = ServerConfigManager.GetConfigInfo(key)
|
v = VersionManager:GetVersionInfo(key)
|
||||||
if not v then
|
|
||||||
v = VersionManager:GetVersionInfo(key)
|
|
||||||
end
|
|
||||||
return v
|
|
||||||
else
|
|
||||||
return VersionManager:GetVersionInfo(key)
|
|
||||||
end
|
end
|
||||||
|
return v
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
function ServerConfigManager.GetConfigInfo(key)
|
function ServerConfigManager.GetConfigInfo(key)
|
||||||
if not ConfigMgr then
|
-- 包版本大于启用的版本使用新的配置
|
||||||
ConfigMgr=App.ConfigMgr
|
if AppConst.isSDK then
|
||||||
|
LogError(tostring(AppConst.isSDK))
|
||||||
|
LogError(tostring(AndroidDeviceInfo.Instance:GetVersionCode()))
|
||||||
|
LogError(tostring(_ActiveCode))
|
||||||
|
LogError(tostring(AndroidDeviceInfo.Instance:GetVersionCode() >= _ActiveCode))
|
||||||
|
end
|
||||||
|
if not AppConst.isSDK or AndroidDeviceInfo.Instance:GetVersionCode() >= _ActiveCode then
|
||||||
|
if not ConfigMgr then
|
||||||
|
ConfigMgr=App.ConfigMgr
|
||||||
|
end
|
||||||
|
local s = ConfigMgr:GetConfigInfo(key)
|
||||||
|
return s
|
||||||
end
|
end
|
||||||
local s = ConfigMgr:GetConfigInfo(key)
|
|
||||||
return s
|
|
||||||
end
|
end
|
Loading…
Reference in New Issue