修正分支合并
This commit is contained in:
@@ -45,13 +45,6 @@ function TASK.removeTask_data(data)
|
||||
end
|
||||
end
|
||||
end
|
||||
function TASK.checkTask_code(code)
|
||||
for i=#tasks,1,-1 do
|
||||
if tasks[i].code==code then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
function TASK.clear()
|
||||
local i=#tasks
|
||||
while i>0 do
|
||||
|
||||
@@ -542,7 +542,7 @@ do--urlencode
|
||||
return out
|
||||
end
|
||||
end
|
||||
do--httpRequest
|
||||
do--httpRequest & wsConnect
|
||||
client=LOADLIB("NETlib")
|
||||
httpRequest=
|
||||
client and function(tick,path,method,header,body)
|
||||
|
||||
@@ -809,28 +809,26 @@ function WIDGET.lnk_swapScene(t,s) return function() SCN.swapTo(t,s) end end
|
||||
function WIDGET.lnk_goNetgame()
|
||||
if LOGIN then
|
||||
if ACCOUNT.access_token then
|
||||
local res=json.encode{
|
||||
email=ACCOUNT.email,
|
||||
access_token=ACCOUNT.access_token,
|
||||
}
|
||||
httpRequest(
|
||||
TICK.httpREQ_checkAccessToken,
|
||||
PATH.api..PATH.access,
|
||||
"GET",
|
||||
{["Content-Type"]="application/json"},
|
||||
res
|
||||
json.encode{
|
||||
email=ACCOUNT.email,
|
||||
access_token=ACCOUNT.access_token,
|
||||
}
|
||||
)
|
||||
else
|
||||
local payload=json.encode{
|
||||
email=ACCOUNT.email,
|
||||
auth_token=ACCOUNT.auth_token,
|
||||
}
|
||||
httpRequest(
|
||||
TICK.httpREQ_getAccessToken,
|
||||
PATH.api..PATH.access,
|
||||
"POST",
|
||||
{["Content-Type"]="application/json"},
|
||||
payload
|
||||
json.encode{
|
||||
email=ACCOUNT.email,
|
||||
auth_token=ACCOUNT.auth_token,
|
||||
}
|
||||
)
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user