refactor: 重命名 API 文件并更新引用路径
- 重命名 13 个 API 文件,去掉 -api 后缀 * src/api/auth-api.ts auth.ts * src/api/codegen-api.ts codegen.ts * src/api/file-api.ts file.ts * src/api/system/*.ts (9个文件) - 批量更新 50+ 处 API 引用路径 - 修复 websocket 和枚举导入路径 - 确保零编码问题(使用 UTF-8 编码)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { store } from "@/store";
|
||||
import DictAPI, { type DictItemOption } from "@/api/system/dict-api";
|
||||
import DictAPI, { type DictItemOption } from "@/api/system/dict";
|
||||
import { STORAGE_KEYS } from "@/constants";
|
||||
|
||||
export const useDictStore = defineStore("dict", () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { constantRoutes } from "@/router";
|
||||
import { store } from "@/store";
|
||||
import router from "@/router";
|
||||
|
||||
import MenuAPI, { type RouteVO } from "@/api/system/menu-api";
|
||||
import MenuAPI, { type RouteVO } from "@/api/system/menu";
|
||||
const modules = import.meta.glob("../../views/**/**.vue");
|
||||
const Layout = () => import("../../layouts/index.vue");
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { store } from "@/store";
|
||||
import TenantAPI, { type TenantInfo } from "@/api/system/tenant-api";
|
||||
import TenantAPI, { type TenantInfo } from "@/api/system/tenant";
|
||||
import { STORAGE_KEYS } from "@/constants";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { store } from "@/store";
|
||||
|
||||
import AuthAPI, { type LoginRequest } from "@/api/auth-api";
|
||||
import UserAPI, { type UserInfo } from "@/api/system/user-api";
|
||||
import AuthAPI from "@/api/auth";
|
||||
import UserAPI from "@/api/system/user";
|
||||
import type { LoginRequest } from "@/types/api";
|
||||
|
||||
import { AuthStorage } from "@/utils/auth";
|
||||
import { usePermissionStoreHook } from "@/store/modules/permission-store";
|
||||
import { useDictStoreHook } from "@/store/modules/dict-store";
|
||||
import { useTagsViewStore } from "@/store";
|
||||
import { cleanupWebSocket } from "@/plugins/websocket";
|
||||
import { cleanupWebSocket } from "@/utils/websocket";
|
||||
|
||||
export const useUserStore = defineStore("user", () => {
|
||||
// 用户信息
|
||||
|
||||
Reference in New Issue
Block a user