refactor: 重构前端骨架,及admin模块子路由和懒加载

refactor: 优化多次请求,并使用pinia状态管理
This commit is contained in:
sophie committed 2026-06-03 10:30:16 +08:00
1 parent f877f61efd
commit 61693d014d
74 files changed
+9493 -6418

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
/**
* shared/api/client.ts
* 转发至现有 api/client,后续迁移实现到此文件。
*/
export {
BusinessError,
isEnvelope,
requestJson,
type ApiSuccessEnvelope,
type ApiErrorBody,
type ApiErrorEnvelope,
} from '@/api/client';
+10
View File
@@ -0,0 +1,10 @@
/** 无需登录即可访问的路由 path */
export const PUBLIC_PATHS = ['/', '/workspace', '/casdoor-callback', '/reset-password'] as const;
/** 登录后首页默认跳转的 Agent ID */
export const DEFAULT_CHAT_AGENT_ID = 16;
export type PublicPath = (typeof PUBLIC_PATHS)[number];
export const isPublicPath = (path: string): path is PublicPath =>
(PUBLIC_PATHS as readonly string[]).includes(path);
+1
View File
@@ -0,0 +1 @@
export type { AuthUser } from '@/utils/auth';