logout
This commit is contained in:
parent
f913f76bd2
commit
b4bb0a1910
@ -49,15 +49,10 @@ class Index extends CatchController
|
|||||||
* 登出
|
* 登出
|
||||||
*
|
*
|
||||||
* @time 2019年11月28日
|
* @time 2019年11月28日
|
||||||
* @param CatchAuth $auth
|
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function logout(CatchAuth $auth): \think\response\Json
|
public function logout(): \think\response\Json
|
||||||
{
|
{
|
||||||
if ($auth->logout()) {
|
return CatchResponse::success();
|
||||||
return CatchResponse::success();
|
|
||||||
}
|
|
||||||
|
|
||||||
return CatchResponse::fail('登出失败');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
# 登入
|
# 登入
|
||||||
$router->post('login', '\catchAdmin\login\controller\Index@login');
|
$router->post('login', '\catchAdmin\login\controller\Index@login');
|
||||||
|
$router->post('logout', '\catchAdmin\login\controller\Index@logout');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user