增加公告/最新版本文字显示时长,删除之前错误代码
This commit is contained in:
@@ -79,17 +79,16 @@ function Tick.httpREQ_launch(data)
|
|||||||
if res then
|
if res then
|
||||||
if res.code==200 then
|
if res.code==200 then
|
||||||
res=json.decode(res.body)
|
res=json.decode(res.body)
|
||||||
LOG.print(res.notice,"message")
|
LOG.print(res.notice,360,color.sky)
|
||||||
if gameVersion==res.version then
|
if gameVersion==res.version then
|
||||||
LOG.print(text.versionIsNew,"message")
|
LOG.print(text.versionIsNew,360,color.sky)
|
||||||
else
|
else
|
||||||
LOG.print(string.gsub(text.versionIsOld,"$1",res.version),"warn")
|
LOG.print(string.gsub(text.versionIsOld,"$1",res.version),"warn")
|
||||||
end
|
end
|
||||||
return true
|
|
||||||
else
|
else
|
||||||
LOG.print("Code error: "..res.code,"warn")
|
LOG.print("Code error: "..res.code,"warn")
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
elseif err then
|
elseif err then
|
||||||
LOG.print(text.getNoticeFail..":"..err,"warn")
|
LOG.print(text.getNoticeFail..":"..err,"warn")
|
||||||
return true
|
return true
|
||||||
@@ -97,7 +96,6 @@ function Tick.httpREQ_launch(data)
|
|||||||
data.time=data.time+1
|
data.time=data.time+1
|
||||||
if data.time==180 then
|
if data.time==180 then
|
||||||
LOG.print(text.httpTimeout,"message")
|
LOG.print(text.httpTimeout,"message")
|
||||||
coroutine.resume(data.selfFunc)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user