From 5426a0b7887cf67f6d3e021b82b5a80a6ba4cf89 Mon Sep 17 00:00:00 2001 From: liapples Date: Sun, 7 Nov 2021 09:48:36 +0800 Subject: [PATCH] =?UTF-8?q?code-2=E6=94=B9=E4=B8=BA-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Middleware/ApiAuth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/ApiAuth.php b/app/Http/Middleware/ApiAuth.php index b820dc7..06a33e7 100644 --- a/app/Http/Middleware/ApiAuth.php +++ b/app/Http/Middleware/ApiAuth.php @@ -22,7 +22,7 @@ class ApiAuth if (empty($auth)) { return response()->json([ - 'code' => -2, + 'code' => -1, 'msg' => '关键认证参数缺失', 'data' => [], 'status' => 500, @@ -33,7 +33,7 @@ class ApiAuth $user_id = Cache::get($auth); if (empty($user_id) || $user_id != User::query()->where(['id' => $user_id, 'status' => 1])->value('id')) { return response()->json([ - 'code' => -2, + 'code' => -1, 'msg' => '用户不存在或登录已超时,请重新登录', 'data' => [], 'status' => 403,