From edefc99702aca7d8890fe0508f79446d7999acb9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Sun, 22 Jun 2025 13:02:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor(api):=20=E5=B0=86=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0types=E7=9B=AE=E5=BD=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 2 +- src/api/login.typings.ts | 57 ---------------------------------------- src/store/user.ts | 2 +- 3 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 src/api/login.typings.ts diff --git a/src/api/login.ts b/src/api/login.ts index ad5b26d..9732650 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -1,4 +1,4 @@ -import type { ICaptcha, IUpdateInfo, IUpdatePassword, IUserInfoVo, IUserLogin } from './login.typings' +import type { ICaptcha, IUpdateInfo, IUpdatePassword, IUserInfoVo, IUserLogin } from './types/login' import { http } from '@/utils/http' /** diff --git a/src/api/login.typings.ts b/src/api/login.typings.ts deleted file mode 100644 index d0638cf..0000000 --- a/src/api/login.typings.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * 用户信息 - */ -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 -} diff --git a/src/store/user.ts b/src/store/user.ts index da73da3..cec931a 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -1,4 +1,4 @@ -import type { IUserInfoVo } from '@/api/login.typings' +import type { IUserInfoVo } from '@/api/types/login' import { defineStore } from 'pinia' import { ref } from 'vue' import {