update
This commit is contained in:
@@ -190,8 +190,12 @@ function CLLPSplash.updateRes()
|
||||
CLLPSplash.selectServer(
|
||||
function(result)
|
||||
server = result
|
||||
Prefs.setCurrServer(json.encode(server))
|
||||
CLLPSplash.checkHotUpgrade()
|
||||
if server == nil then
|
||||
CLUIUtl.showConfirm("未取得服务器,请联系管理员!", nil)
|
||||
else
|
||||
Prefs.setCurrServer(json.encode(server))
|
||||
CLLPSplash.checkHotUpgrade()
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -201,23 +205,29 @@ end
|
||||
CLLPSplash.selectServer = function(callback)
|
||||
local onGetServers = function(content, orgs)
|
||||
local content = json.decode(content)
|
||||
|
||||
local servers = content[CLCfgBase.self.appUniqueID] or {}
|
||||
local userName = Prefs.getUserName()
|
||||
DBUser.isWhiteUser(
|
||||
userName,
|
||||
function(iswhite)
|
||||
if iswhite then
|
||||
getPanelAsy("PanelSelectServer", onLoadedPanelTT, {servers = content.data, callback = callback})
|
||||
getPanelAsy("PanelSelectServer", onLoadedPanelTT, {servers = servers, callback = callback})
|
||||
else
|
||||
--//TODO:取得正式环境的信息
|
||||
Utl.doCallback(callback)
|
||||
--取得正式环境的信息
|
||||
local server
|
||||
for key, v in pairs(servers) do
|
||||
if v.isDev == 0 then
|
||||
server = v
|
||||
end
|
||||
end
|
||||
Utl.doCallback(callback, server)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
local url = "" --//TODO:不要token验证,传appid,以便可以区分服务器
|
||||
local url = joinStr(CLVerManager.self.baseUrl, "/servers.json")
|
||||
WWWEx.get(
|
||||
url,
|
||||
Utl.urlAddTimes(url),
|
||||
nil,
|
||||
CLAssetType.text,
|
||||
onGetServers,
|
||||
@@ -408,7 +418,7 @@ function CLLPSplash.goNext()
|
||||
if CLCfgBase.self.isDirectEntry then
|
||||
CLCfgBase.self.isDirectEntry = false
|
||||
end
|
||||
CLPanelManager.getPanelAsy("PanelStart", onLoadedPanel, {user, server})
|
||||
CLPanelManager.getPanelAsy("PanelStart", onLoadedPanel, {server = server})
|
||||
end
|
||||
|
||||
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
||||
|
||||
Reference in New Issue
Block a user