From dd11e45d5fd1e15040f143a3e6d96ac1fbe3002c Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sun, 22 Jun 2025 14:04:49 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=96=87=E4=BB=B6=E7=A7=BB=E5=8A=A8=E5=88=B0?= =?UTF-8?q?src/types=E7=9B=AE=E5=BD=95=E4=B8=8B=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将types目录移动到src下以保持项目结构一致性 新增登录相关的类型定义文件,包含用户信息、登录返回数据等接口 --- .gitignore | 2 +- src/api/types/login.ts | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 src/api/types/login.ts diff --git a/.gitignore b/.gitignore index 5a73675..34ddbdf 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,7 @@ dist docs/.vitepress/dist docs/.vitepress/cache -types +src/types # lock 文件还是不要了,我主要的版本写死就好了 # pnpm-lock.yaml diff --git a/src/api/types/login.ts b/src/api/types/login.ts new file mode 100644 index 0000000..d0638cf --- /dev/null +++ b/src/api/types/login.ts @@ -0,0 +1,57 @@ +/** + * 用户信息 + */ +export interface IUserInfoVo { + id: number + username: string + avatar: string + token: string +} + +/** + * 登录返回的信息 + */ +export interface IUserLogin { + id: string + username: string + token: string +} + +/** + * 获取验证码 + */ +export interface ICaptcha { + captchaEnabled: boolean + uuid: string + image: string +} +/** + * 上传成功的信息 + */ +export interface IUploadSuccessInfo { + fileId: number + originalName: string + fileName: string + storagePath: string + fileHash: string + fileType: string + fileBusinessType: string + fileSize: number +} +/** + * 更新用户信息 + */ +export interface IUpdateInfo { + id: number + name: string + sex: string +} +/** + * 更新用户信息 + */ +export interface IUpdatePassword { + id: number + oldPassword: string + newPassword: string + confirmPassword: string +}