diff --git a/app/middleware/JwtAuthMiddleware.php b/app/middleware/JwtAuthMiddleware.php index e76e104..90cfc1e 100644 --- a/app/middleware/JwtAuthMiddleware.php +++ b/app/middleware/JwtAuthMiddleware.php @@ -74,6 +74,10 @@ class JwtAuthMiddleware implements MiddlewareInterface if (false !== strstr($controller->name, 'admin') || false !== strstr($controller->name, 'generalization')) { return response('', 401, ['error' => '无权限']); } + $user=User::find($decoded['id']); + if($user->status==0){ + return response('',401,['error' => '用户封禁']); + } break; case 'generalization':