|
@@ -144,20 +144,11 @@ function json($data, int $options = JSON_UNESCAPED_UNICODE): Response
|
|
|
|
|
|
function json_success($message, $data = '', $options = JSON_UNESCAPED_UNICODE)
|
|
|
{
|
|
|
- ini_set('json_encode_max_depth', 1024); // 设置最大深度
|
|
|
- ini_set('json_encode_max_int_length', 4096); // 设置最大整数长度
|
|
|
- ini_set('json_encode_max_other_length', 4096); // 设置其他类型值的最大长度
|
|
|
-
|
|
|
- \support\Log::info("开始打包返回数据");
|
|
|
$return = [
|
|
|
'code' => 200,
|
|
|
'message' => $message,
|
|
|
'data' => $data,
|
|
|
];
|
|
|
-
|
|
|
- \support\Log::info("返回数据打包完成");
|
|
|
-
|
|
|
-
|
|
|
return new Response(200, ['Content-Type' => 'application/json'], json_encode($return, $options));
|
|
|
}
|
|
|
|