初始化

缺陷:主题配色需要优化整体的同风格
This commit is contained in:
2026-08-14 23:21:21 +08:00
parent 6e2769c528
commit bcf54c2727
152 changed files with 13521 additions and 141 deletions

View File

@@ -8,7 +8,11 @@ use Illuminate\Http\JsonResponse;
class LoginController extends BaseController
{
//
/**
* 登录控制器注册在免登录组里,继承来的 CRUD 会变成 /api/list/api/create 这种
* 无需鉴权、指向 LoginService根本没有这些方法的路由必须排除
*/
protected array $exceptRoute = ['list', 'option', 'detail', 'create', 'update', 'delete'];
public function __construct()
{
@@ -54,20 +58,32 @@ class LoginController extends BaseController
);
}
public function logout()
/**
* 退出登录
* @Method POST
* @throws \Exception
*/
public function logout(): JsonResponse
{
return jok(
[],
$this->service->logout(),
'退出成功'
);
}
public function codes()
/**
* 续签 token
*
* 前端拦截器在 401 时调用,此时 token 已过期,所以只能放在免登录组里,
* LoginService::refresh 自己校验签名与 Redis 会话。
* @Method POST
* @throws \Exception
*/
public function refresh(): JsonResponse
{
return jok(
[],
'获取成功'
$this->service->refresh(),
'续签成功'
);
}
}