From 2d6d074d94db93112bd8ea14cf62cc48d7b94dec Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Sat, 14 Dec 2019 22:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catchAdmin/login/controller/Index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/catchAdmin/login/controller/Index.php b/catchAdmin/login/controller/Index.php index 1ff1667..a8cf774 100644 --- a/catchAdmin/login/controller/Index.php +++ b/catchAdmin/login/controller/Index.php @@ -48,15 +48,16 @@ class Index extends CatchController * 登出 * * @time 2019年11月28日 - * @return bool + * @return \think\response\Json + * @throws \Exception */ - public function logout(): bool + public function logout(): \think\response\Json { if (Auth::logout()) { - return redirect(url('login')); + return CatchResponse::success(); } - return false; + return CatchResponse::fail('登出失败'); } /**