兼容linux

This commit is contained in:
xx
2024-05-28 15:12:37 +08:00
parent b8b2ff12bf
commit bdbe5f34dd
34 changed files with 331 additions and 713 deletions

View File

@@ -1,8 +1,23 @@
local dkjson = require 'dkjson'
function json(data)
response:header("Content-Type","application/json")
response:send(dkjson.encode(data))
end
function session()
return request:session(request:token())
end
function param(name)
return request:param(name,false)
end
function param_throw(name)
return request:param(name,true)
end
function reply(code,msg,data)
local data ={
code =code,
msg = msg,
data = data
}
json(data)
end