修改之前场景名打错,准备好获取房间列表的api

This commit is contained in:
MrZ626
2020-12-27 21:49:33 +08:00
parent e6221b5f42
commit b769d1b1d5
9 changed files with 9 additions and 9 deletions

View File

@@ -143,7 +143,7 @@ PATH={--Network API paths
users="/users", users="/users",
auth="/auth", auth="/auth",
access="/auth/access", access="/auth/access",
versus="/online/versus", rooms="/online/rooms",
chat="/chat", chat="/chat",
} }

View File

@@ -243,7 +243,7 @@ return{
restart="Retry (R)", restart="Retry (R)",
quit="Quit (Q)", quit="Quit (Q)",
}, },
net_menumenu={ net_menu={
ffa="FFA", ffa="FFA",
rooms="Rooms", rooms="Rooms",
chat="Chat", chat="Chat",

View File

@@ -222,7 +222,7 @@ return{
restart="Réessayer (R)", restart="Réessayer (R)",
quit="Quitter (Q)", quit="Quitter (Q)",
}, },
net_menumenu={ net_menu={
-- ffa="FFA", -- ffa="FFA",
-- rooms="Rooms", -- rooms="Rooms",
-- chat="Chat", -- chat="Chat",

View File

@@ -226,7 +226,7 @@ return{
restart="Reiniciar (R)", restart="Reiniciar (R)",
quit= "Finalizar (Q)", quit= "Finalizar (Q)",
}, },
net_menumenu={ net_menu={
-- ffa="FFA", -- ffa="FFA",
-- rooms="Rooms", -- rooms="Rooms",
-- chat="Chat", -- chat="Chat",

View File

@@ -246,7 +246,7 @@ return{
restart="重新开始(R)", restart="重新开始(R)",
quit= "退出(Q)", quit= "退出(Q)",
}, },
net_menumenu={ net_menu={
ffa="FFA", ffa="FFA",
rooms="房间列表", rooms="房间列表",
chat="聊天室", chat="聊天室",

View File

@@ -8,7 +8,7 @@ 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.go("net_menumenu") SCN.go("net_menu")
elseif response.code==403 or response.code==401 then elseif response.code==403 or response.code==401 then
httpRequest( httpRequest(
TICK.httpREQ_getAccessToken, TICK.httpREQ_getAccessToken,

View File

@@ -6,7 +6,7 @@ end
scene.widgetList={ scene.widgetList={
WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=NULL}, WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=NULL},
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=WIDGET.lnk_goScene("net_menurooms")}, WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=WIDGET.lnk_goScene("net_rooms")},
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,font=40,code=WIDGET.lnk_goScene("chat")}, WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,font=40,code=WIDGET.lnk_goScene("chat")},
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK}, WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK},
} }

View File

@@ -37,7 +37,7 @@ local function fresh()
rooms=nil rooms=nil
httpRequest( httpRequest(
task_fetchRooms, task_fetchRooms,
PATH.api..PATH.access, PATH.api..PATH.rooms,
"GET" "GET"
) )
end end

View File

@@ -11,7 +11,7 @@ function Tick.httpREQ_getAccessToken(task)
LOG.print(text.accessSuccessed) LOG.print(text.accessSuccessed)
USER.access_token=res.access_token USER.access_token=res.access_token
FILE.save(USER,"conf/user") FILE.save(USER,"conf/user")
SCN.swapTo("net_menumenu") SCN.swapTo("net_menu")
else else
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn") LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
end end