From 1a03783d265ec58fb89c114693abf227ca23311e Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Mon, 20 Jan 2020 14:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E5=92=8C?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/login/controller/Index.php | 18 +++++++++--------- catch/permissions/route.php | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) 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'); // 权限