From 1d2b47834c164878bf40e7932cbe11fabbf9c8a2 Mon Sep 17 00:00:00 2001 From: liapples Date: Wed, 28 Jul 2021 18:52:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=99=BB=E5=BD=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9Ecode=3D-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Middleware/AuthApi.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Middleware/AuthApi.php b/app/Http/Middleware/AuthApi.php index c49da1e..dace1c9 100644 --- a/app/Http/Middleware/AuthApi.php +++ b/app/Http/Middleware/AuthApi.php @@ -24,16 +24,16 @@ class AuthApi 'code' => -1, 'msg' => 'header参数缺失', 'data' => [], - 'status' => '500', + 'status' => 500, ]); } // TODO 登录部分待优化 if (!Cache::get($auth)) { return response()->json([ - 'code' => -1, + 'code' => -2, 'msg' => '请先登录', 'data' => [], - 'status' => '500', + 'status' => 500, ]); } if (!Cache::get($appid)) { @@ -41,7 +41,7 @@ class AuthApi 'code' => -1, 'msg' => 'lose appid', 'data' => [], - 'status' => '500', + 'status' => 500, ]); } return $next($request);