refactor: 重构项目接口与API调用体系,统一类型管理

1.  合并拆分的API类型定义到统一的api/interface.ts文件
2.  删除旧的api/client.ts与api/types.ts文件
3.  重构所有页面与组件的API调用方式,统一使用api/index.ts导出的接口
4.  调整组件文件结构,将分散的组件按模块整理
5.  统一类型导入路径,移除冗余的类型重复定义
This commit is contained in:
2026-07-02 14:57:06 +08:00
parent e160476ecf
commit 3451d373bc
54 changed files with 1106 additions and 930 deletions

22
src/Profile/interface.ts Normal file
View File

@@ -0,0 +1,22 @@
import type { AdminProfile, ChangePasswordPayload, UpdateProfilePayload } from "../api";
export type { AdminProfile };
export type ProfileFormValues = UpdateProfilePayload;
export type ChangePasswordFormValues = ChangePasswordPayload & {
confirmPassword: string;
};
export type ProfileSummaryProps = {
profile: AdminProfile | null;
};
export type ProfileInfoListProps = {
profile: AdminProfile | null;
};
export type ProfileInfoItemProps = {
label: string;
value: string;
};