refactor: 将类型定义文件移动到src/types目录下并添加登录相关类型

将types目录移动到src下以保持项目结构一致性
新增登录相关的类型定义文件,包含用户信息、登录返回数据等接口
This commit is contained in:
feige996
2025-06-22 14:04:49 +08:00
parent 8455f09e8c
commit dd11e45d5f
2 changed files with 58 additions and 1 deletions

57
src/api/types/login.ts Normal file
View File

@@ -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
}