mac
|
cafa8bc840
|
feat(auth): support local username login mode
|
2026-07-16 16:19:25 +08:00 |
|
mac
|
81d2a8a60b
|
refactor(frontend): merge authserver web login
|
2026-07-15 14:47:42 +08:00 |
|
wonder
|
3de59c4fc2
|
feat(frontend): 对接后端统一响应格式,增强错误处理
- 新增 types/api.ts,定义 ApiResponse/PaginatedData 泛型类型和业务错误码常量
- 增强 request.ts 拦截器:提取后端错误信息、映射 HTTP 状态码和业务错误码为中文提示
- 为 auth/audit/subsystem API 添加泛型返回类型
- 为各视图添加 try/catch 防止未处理的 Promise 拒绝
|
2026-07-15 10:52:41 +08:00 |
|
wonder
|
84394f4674
|
feat(frontend): 添加基础设施模块
工具函数:
- utils/auth.ts,Token 存储、解析、过期校验
API 模块:
- api/request.ts,Axios 实例封装,请求/响应拦截器
状态管理:
- stores/auth.ts,认证状态管理(Pinia)
组合式函数:
- composables/useAuth.ts,认证逻辑封装
路由配置:
- router/index.ts,路由表定义、路由守卫(未登录重定向)
|
2026-07-14 15:39:19 +08:00 |
|