implemented register and login function

This commit is contained in:
Particle_G
2020-11-24 02:18:35 +08:00
committed by MrZ626
parent 9265101025
commit 8f2b62ccc0
15 changed files with 106 additions and 52 deletions

View File

@@ -434,7 +434,7 @@ function love.errorhandler(msg)
setFont(100)gc.print(":(",100,40,0,1.2)
setFont(40)gc.printf(text.errorMsg,100,200,SCR.w0-100)
setFont(20)
gc.print(SYSTEM.."-"..VERSION,100,660)
gc.print(SYSTEM.."-"..VERSION_NAME,100,660)
gc.print("scene:"..SCN.cur,400,660)
gc.printf(err[1],626,360,1260-626)
gc.print("TRACEBACK",626,426)

View File

@@ -4,7 +4,7 @@ local ins,rem=table.insert,table.remove
local debugMesList={}
local debugMesHistory={
"Version: "..VERSION,
"Version: "..VERSION_NAME,
os.date("Launched at %Y/%m/%d %H:%M"),
}
local LOG={}

View File

@@ -166,9 +166,10 @@ end
do--httpRequest
client=LOADLIB("NETlib")
httpRequest=
client and function(tick,api,method,header,body)
client and function(tick,path,method,header,body)
local task,err=client.httpraw{
url="http://47.103.200.40/"..api,
-- url="http://47.103.200.40/"..path,
url="http://127.0.0.1:10026"..path,
method=method or"GET",
header=header,
body=body,
@@ -302,8 +303,7 @@ do--json
end
function json.encode(val)
local a,b=pcall(encode,val)
if a then return b else return""end
return pcall(encode,val)
end
-------------------------------------------------------------------------------
@@ -530,8 +530,7 @@ do--json
return res
end
function json.decode(str)
local a,b=pcall(decode,str)
if a then return b else return""end
return pcall(decode,str)
end
end