From b254d76c8b7777897ed19e87a7ab72761658f8b0 Mon Sep 17 00:00:00 2001 From: yanzai Date: Wed, 28 Aug 2024 20:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E6=B1=89?= =?UTF-8?q?=E5=AD=97=20=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Http/Middleware/Log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Laravel/app/Http/Middleware/Log.php b/Laravel/app/Http/Middleware/Log.php index c8ff022..38edea2 100644 --- a/Laravel/app/Http/Middleware/Log.php +++ b/Laravel/app/Http/Middleware/Log.php @@ -30,7 +30,7 @@ class Log // 在关联数组中添加 code 字段 // $data['code'] = 200; $data['code'] = $response->getStatusCode(); - $modifiedContent = json_encode($data); // 编码修改后的关联数组为 JSON 字符串 + $modifiedContent = json_encode($data,JSON_UNESCAPED_UNICODE); // 编码修改后的关联数组为 JSON 字符串 $response->setContent($modifiedContent); if(env('REQUEST_LOG') and $response->getStatusCode()==200){ //如果返回状态为200进行log