nexus clients

This commit is contained in:
xiaomlove
2021-04-21 00:07:32 +08:00
parent be9b8634c4
commit c7a6616618
23 changed files with 897 additions and 31 deletions

View File

@@ -428,6 +428,12 @@ function getBaseUrl()
return trim($url, '/');
}
function nexus_json_encode($data)
{
return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}
function api(...$args)
{
if (!isset($args[2])) {
@@ -459,7 +465,7 @@ function api(...$args)
'ret' => (int)$ret,
'msg' => (string)$msg,
'data' => $data,
'timeuse' => (float)number_format(microtime(true) - $start, 3),
'time' => (float)number_format(microtime(true) - $start, 3),
];
}