feat(auth): 实现用户认证状态持久化及权限控制优化
- 新增 pinia-plugin-persistedstate 实现用户状态本地存储 - 重构 API 响应类型为统一模块管理 - 优化路由守卫逻辑,支持 token 自动登录 - 修复权限检查逻辑错误,调整 AI 聊天页访问权限 - 新增用户信息获取接口及类型定义
This commit is contained in:
@@ -1,15 +1,11 @@
|
||||
import request from "@/plugins/axios";
|
||||
import type { ApiResponse } from "../response";
|
||||
|
||||
/**
|
||||
* 认证服务 API 类型定义
|
||||
*/
|
||||
|
||||
// 统一响应格式
|
||||
export interface ApiResponse<T = any> {
|
||||
success: boolean;
|
||||
message: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
|
||||
// 登录请求参数
|
||||
export interface LoginRequest {
|
||||
|
||||
Reference in New Issue
Block a user