修复登录场景返回乱跳
This commit is contained in:
@@ -27,7 +27,7 @@ function scene.mouseDown(_,_,k)
|
|||||||
LOG.print("Old version detected & setting file deleted, please restart the game",600,COLOR.yellow)
|
LOG.print("Old version detected & setting file deleted, please restart the game",600,COLOR.yellow)
|
||||||
else
|
else
|
||||||
if newVersionLaunch then
|
if newVersionLaunch then
|
||||||
SCN.push("main","fade")
|
SCN.push("main")
|
||||||
SCN.swapTo("history","fade")
|
SCN.swapTo("history","fade")
|
||||||
LOG.print(text.newVersion,"warn",COLOR.lBlue)
|
LOG.print(text.newVersion,"warn",COLOR.lBlue)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ local function tick_httpREQ_checkAccessToken(task)
|
|||||||
if response then
|
if response then
|
||||||
if response.code==200 then
|
if response.code==200 then
|
||||||
LOG.print(text.accessSuccessed)
|
LOG.print(text.accessSuccessed)
|
||||||
SCN.pop()
|
|
||||||
SCN.go("netgame")
|
SCN.go("netgame")
|
||||||
elseif response.code==403 or response.code==401 then
|
elseif response.code==403 or response.code==401 then
|
||||||
httpRequest(
|
httpRequest(
|
||||||
|
|||||||
@@ -11,12 +11,9 @@ function Tick.httpREQ_getAccessToken(task)
|
|||||||
LOG.print(text.accessSuccessed)
|
LOG.print(text.accessSuccessed)
|
||||||
ACCOUNT.access_token=res.access_token
|
ACCOUNT.access_token=res.access_token
|
||||||
FILE.save(ACCOUNT,"account","")
|
FILE.save(ACCOUNT,"account","")
|
||||||
SCN.pop()
|
SCN.swapTo("netgame")
|
||||||
SCN.go("netgame")
|
|
||||||
else
|
else
|
||||||
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
|
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
|
||||||
SCN.pop()
|
|
||||||
SCN.go("main")
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
LOGIN=false
|
LOGIN=false
|
||||||
@@ -28,8 +25,6 @@ function Tick.httpREQ_getAccessToken(task)
|
|||||||
else
|
else
|
||||||
LOG.print(text.loginFailed..": "..text.netErrorCode,"warn")
|
LOG.print(text.loginFailed..": "..text.netErrorCode,"warn")
|
||||||
end
|
end
|
||||||
SCN.pop()
|
|
||||||
SCN.go("main")
|
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
elseif request_error then
|
elseif request_error then
|
||||||
|
|||||||
Reference in New Issue
Block a user