修复conf/account没改完导致账户信息存不上文件

This commit is contained in:
MrZ626
2020-12-16 00:35:10 +08:00
parent 13b176d515
commit 32b0937ad9
3 changed files with 4 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ for _,v in next,{"conf","record","replay"}do
::NEXT:: ::NEXT::
end end
--Delete useless mode record file --Delete useless files
for _,v in next,{ for _,v in next,{
"tech_ultimate.dat", "tech_ultimate.dat",
"tech_ultimate+.dat", "tech_ultimate+.dat",
@@ -51,6 +51,7 @@ for _,v in next,{
"marathon_ultimate.dat", "marathon_ultimate.dat",
"infinite.dat", "infinite.dat",
"infinite_dig.dat", "infinite_dig.dat",
"conf/account",
}do }do
if fs.getInfo(v)then fs.remove(v)end if fs.getInfo(v)then fs.remove(v)end
end end

View File

@@ -11,7 +11,7 @@ local function tick_httpREQ_newLogin(task)
LOG.print(text.loginSuccessed) LOG.print(text.loginSuccessed)
USER.email=res.email USER.email=res.email
USER.auth_token=res.auth_token USER.auth_token=res.auth_token
FILE.save(USER,"conf/account","q") FILE.save(USER,"conf/user","q")
httpRequest( httpRequest(
TICK.httpREQ_getAccessToken, TICK.httpREQ_getAccessToken,

View File

@@ -10,7 +10,7 @@ function Tick.httpREQ_getAccessToken(task)
if res then if res then
LOG.print(text.accessSuccessed) LOG.print(text.accessSuccessed)
USER.access_token=res.access_token USER.access_token=res.access_token
FILE.save(USER,"conf/account") FILE.save(USER,"conf/user")
SCN.swapTo("netgame") SCN.swapTo("netgame")
else else
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn") LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")