Explorar el Código

refactor(types): 移除全局类型声明以简化类型定义

yz hace 6 días
padre
commit
870844514e
Se han modificado 1 ficheros con 0 adiciones y 92 borrados
  1. 0 92
      src/types/global.d.ts

+ 0 - 92
src/types/global.d.ts

@@ -2,99 +2,7 @@
 import {AxiosRequestConfig} from "axios";
 
 declare global {
-    interface AxiosResponse<T = any> {
-        data: ApiResponseData<T>;
-        status: number;
-        statusText: string;
-        headers: {
-            [key: string]: string;
-            'content-type'?: string;
-        };
-        config: AxiosRequestConfig;
-    }
 
-    interface ApiResponse<T = any> {
-        data: ApiResponseData<T>;
-        status: number;
-        statusText: string;
-        headers: {
-            [key: string]: string;
-            'content-type'?: string;
-        };
-        config: {
-            method?: string;
-            url?: string;
-            params?: Record<string, any>;
-            headers?: Record<string, any>;
-        };
-    }
-
-    interface ApiResponseData<T = any> {
-        code: number;
-        msg: string;
-        success: boolean;
-        data: T;
-    }
-
-    /**
-     * 用户信息接口
-     * 描述登录成功后存储在Vuex中的用户信息结构
-     */
-    interface UserInfo {
-        /** 访问令牌 */
-        access_token: string;
-        /** 令牌类型 */
-        token_type: string;
-        /** 刷新令牌 */
-        refresh_token: string;
-        /** 令牌过期时间(秒) */
-        expires_in: number;
-        /** 权限范围 */
-        scope: string;
-        /** 租户ID */
-        tenant_id: string;
-        /** 用户名 */
-        user_name: string;
-        /** 部门父级ID */
-        dept_pid: string;
-        /** 真实姓名 */
-        real_name: string;
-        /** 头像URL */
-        avatar: string;
-        /** 公司名称 */
-        corp_name: string;
-        /** 客户端ID */
-        client_id: string;
-        /** 角色名称 */
-        role_name: string;
-        /** 许可证信息 */
-        license: string;
-        /** 岗位ID(逗号分隔的字符串) */
-        post_id: string;
-        /** 用户ID */
-        user_id: string;
-        /** 角色ID */
-        role_id: string;
-        /** 昵称 */
-        nick_name: string;
-        /** 公司地址 */
-        corp_address: string;
-        /** OAuth ID */
-        oauth_id: string;
-        /** 详细信息 */
-        detail: {
-            /** 类型 */
-            type: string;
-        };
-        /** 部门ID */
-        dept_id: string;
-        /** 公司ID */
-        corp_id: string | null;
-        /** 账号 */
-        account: string;
-        /** JWT ID */
-        jti: string;
-    }
 }
 
 export {};