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);