修改登录

This commit is contained in:
wuyanwen 2019-12-14 22:54:24 +08:00
parent 6ac4b8784e
commit 2d6d074d94

View File

@ -48,15 +48,16 @@ class Index extends CatchController
* 登出 * 登出
* *
* @time 2019年11月28日 * @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()) { if (Auth::logout()) {
return redirect(url('login')); return CatchResponse::success();
} }
return false; return CatchResponse::fail('登出失败');
} }
/** /**