diff --git a/catch/login/controller/Index.php b/catch/login/controller/Index.php index ce3d208..90745f5 100644 --- a/catch/login/controller/Index.php +++ b/catch/login/controller/Index.php @@ -47,16 +47,16 @@ class Index extends CatchController ], '登录成功') : CatchResponse::success('', '登录失败'); } - /** - * 登出 - * - * @time 2019年11月28日 - * @return \think\response\Json - * @throws \Exception - */ - public function logout(): \think\response\Json + /** + * 登出 + * + * @time 2019年11月28日 + * @param CatchAuth $auth + * @return \think\response\Json + */ + public function logout(CatchAuth $auth): \think\response\Json { - if (Auth::logout()) { + if ($auth->logout()) { return CatchResponse::success(); } diff --git a/catch/permissions/route.php b/catch/permissions/route.php index 5991de3..5d14b76 100644 --- a/catch/permissions/route.php +++ b/catch/permissions/route.php @@ -1,6 +1,6 @@ resource('role', '\catchAdmin\permissions\controller\Role'); +$router->resource('roles', '\catchAdmin\permissions\controller\Role'); // 角色列表 $router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions'); // 权限