diff --git a/app/Exception/Handler/ErrExceptionHandler.php b/app/Exception/Handler/ErrExceptionHandler.php index ceadcbf..862e13a 100644 --- a/app/Exception/Handler/ErrExceptionHandler.php +++ b/app/Exception/Handler/ErrExceptionHandler.php @@ -2,7 +2,6 @@ namespace App\Exception\Handler; -use App\Constants\ReturnCode; use App\Exception\ErrException; use App\Lib\AdminReturn; use App\Lib\ApiReturn; diff --git a/app/Middleware/Admin/JwtAuthMiddleware.php b/app/Middleware/Admin/JwtAuthMiddleware.php index 3e260d5..a8ccf82 100644 --- a/app/Middleware/Admin/JwtAuthMiddleware.php +++ b/app/Middleware/Admin/JwtAuthMiddleware.php @@ -42,11 +42,11 @@ class JwtAuthMiddleware implements MiddlewareInterface } //单点登录 - if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) { - return $this->response->json( - $this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR) - ); - } +// if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) { +// return $this->response->json( +// $this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR) +// ); +// } Context::set('admin_id',$userJwt['data']->id); Context::set('role_id',$userJwt['data']->role);