首包逻辑处理
This commit is contained in:
parent
4a7e11114a
commit
755c9937b3
@ -55,12 +55,6 @@ function First:initLanguage()
|
||||
end
|
||||
PlayerPrefs.SetString("SELECTED_LANGUAGE", self.language)
|
||||
end
|
||||
-- 根据语言来,不切换
|
||||
self.language = self:getSystemLanguage()
|
||||
if self.language == nil then
|
||||
self.language = BFPlatform.GetCurrentLanguageInfo():GetFallbackLanguage()
|
||||
end
|
||||
PlayerPrefs.SetString("SELECTED_LANGUAGE", self.language)
|
||||
|
||||
self.stringMap = firstText.data
|
||||
self.strNoNetwork = self.stringMap["STR_NO_NETWORK_CONNECTION"][self.language]
|
||||
@ -411,16 +405,31 @@ function First:tryShowRequestAddrErrorBox(connectStartTimes, callback, reqAddrEr
|
||||
print("tryShowRequestAddrErrorBox errorType:" .. reqAddrErrorType .. " hasRecord:" .. tostring(hasRecord) .. " times:" .. times .. " totalTimes:" .. totalTimes)
|
||||
|
||||
if times > REQUEST_ADDR_MAX_RETRY_TIMES then
|
||||
-- 尝试弹出错误框
|
||||
if not self.showAddrErrorBox then
|
||||
if self.hasReceiveAddrSuccess then
|
||||
return
|
||||
end
|
||||
self.hasReceiveAddrSuccess = true
|
||||
CS.BF.BFMain.IsStandAlone = true
|
||||
self.showAddrErrorBox = true
|
||||
self:showDialog(self.dialogStr[100], function()
|
||||
self.showAddrErrorBox = false
|
||||
if self.hasReceiveAddrSuccess then -- 延迟成功了 不需要重新request
|
||||
self:setShenHeLanguageAndReqATT()
|
||||
-- 上报版本请求成功
|
||||
local args = {
|
||||
client_version = BFLaunchMgr:GetCurrentVersion(),
|
||||
client_version_url = BFPlatform.GetLoginCenterURL(),
|
||||
client_connect_time = (os.clock() - connectStartTimes)*1000,
|
||||
client_retry_times = totalTimes - 1
|
||||
}
|
||||
CS.BF.BFMain.Instance.SDKMgr.BFThirdReportSDKMgr:PostThinkingAnalyticsEvent("client_request_version_success", json.encode(args))
|
||||
|
||||
if callback then
|
||||
callback("")
|
||||
callback(self.requestAddressRsp)
|
||||
end
|
||||
else
|
||||
CS.BF.BFMain.Instance.TaskMgr:EasyTimer(0, function()
|
||||
self:requestAddress(callback, 0, totalTimes) -- 重新开始
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
else -- 静默重试
|
||||
-- 重试
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user