修改登录和权限路由
This commit is contained in:
@@ -47,16 +47,16 @@ class Index extends CatchController
|
|||||||
], '登录成功') : CatchResponse::success('', '登录失败');
|
], '登录成功') : CatchResponse::success('', '登录失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登出
|
* 登出
|
||||||
*
|
*
|
||||||
* @time 2019年11月28日
|
* @time 2019年11月28日
|
||||||
* @return \think\response\Json
|
* @param CatchAuth $auth
|
||||||
* @throws \Exception
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function logout(): \think\response\Json
|
public function logout(CatchAuth $auth): \think\response\Json
|
||||||
{
|
{
|
||||||
if (Auth::logout()) {
|
if ($auth->logout()) {
|
||||||
return CatchResponse::success();
|
return CatchResponse::success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// 角色
|
// 角色
|
||||||
$router->resource('role', '\catchAdmin\permissions\controller\Role');
|
$router->resource('roles', '\catchAdmin\permissions\controller\Role');
|
||||||
// 角色列表
|
// 角色列表
|
||||||
$router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions');
|
$router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions');
|
||||||
// 权限
|
// 权限
|
||||||
|
Reference in New Issue
Block a user