refactor: 调整 http 模块目录结构

This commit is contained in:
pany 2024-11-26 11:29:20 +08:00
parent ea098a6eaa
commit df2821ebe9
12 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
import type * as Login from "./types/login" import type * as Login from "./type"
import { request } from "@/http/request" import { request } from "@/http/request"
/** 获取登录验证码 */ /** 获取登录验证码 */

View File

@ -1,4 +1,4 @@
import type * as Table from "./types/table" import type * as Table from "./type"
import { request } from "@/http/request" import { request } from "@/http/request"
/** 增 */ /** 增 */

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useFetchSelect } from "@/composables/useFetchSelect" import { useFetchSelect } from "@/composables/useFetchSelect"
import { getSelectDataApi } from "@/http/composable-demo/use-fetch-select" import { getSelectDataApi } from "@/http/apis/composable-demo/use-fetch-select"
const { loading, options, value } = useFetchSelect({ const { loading, options, value } = useFetchSelect({
api: getSelectDataApi api: getSelectDataApi

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useFullscreenLoading } from "@/composables/useFullscreenLoading" import { useFullscreenLoading } from "@/composables/useFullscreenLoading"
import { getErrorApi, getSuccessApi } from "@/http/composable-demo/use-fullscreen-loading" import { getErrorApi, getSuccessApi } from "@/http/apis/composable-demo/use-fullscreen-loading"
import { ElMessage } from "element-plus" import { ElMessage } from "element-plus"
const svg = ` const svg = `

View File

@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { LoginRequestData } from "@/http/login/types/login" import type { LoginRequestData } from "@/http/apis/login/type"
import type { FormInstance, FormRules } from "element-plus" import type { FormInstance, FormRules } from "element-plus"
import ThemeSwitch from "@/components/ThemeSwitch/index.vue" import ThemeSwitch from "@/components/ThemeSwitch/index.vue"
import { getLoginCodeApi } from "@/http/login" import { getLoginCodeApi } from "@/http/apis/login"
import { useUserStore } from "@/pinia/stores/user" import { useUserStore } from "@/pinia/stores/user"
import { Key, Loading, Lock, Picture, User } from "@element-plus/icons-vue" import { Key, Loading, Lock, Picture, User } from "@element-plus/icons-vue"
import { ElMessage } from "element-plus" import { ElMessage } from "element-plus"

View File

@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CreateOrUpdateTableRequestData, TableData } from "@/http/table/types/table" import type { CreateOrUpdateTableRequestData, TableData } from "@/http/apis/table/type"
import type { FormInstance, FormRules } from "element-plus" import type { FormInstance, FormRules } from "element-plus"
import { usePagination } from "@/composables/usePagination" import { usePagination } from "@/composables/usePagination"
import { createTableDataApi, deleteTableDataApi, getTableDataApi, updateTableDataApi } from "@/http/table" import { createTableDataApi, deleteTableDataApi, getTableDataApi, updateTableDataApi } from "@/http/apis/table"
import { CirclePlus, Delete, Download, Refresh, RefreshRight, Search } from "@element-plus/icons-vue" import { CirclePlus, Delete, Download, Refresh, RefreshRight, Search } from "@element-plus/icons-vue"
import { ElMessage, ElMessageBox } from "element-plus" import { ElMessage, ElMessageBox } from "element-plus"
import { cloneDeep } from "lodash-es" import { cloneDeep } from "lodash-es"

View File

@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { TableResponseData } from "@/http/table/types/table" import type { TableResponseData } from "@/http/apis/table/type"
import type { ElMessageBoxOptions } from "element-plus" import type { ElMessageBoxOptions } from "element-plus"
import type { VxeFormInstance, VxeFormProps, VxeGridInstance, VxeGridProps, VxeModalInstance, VxeModalProps } from "vxe-table" import type { VxeFormInstance, VxeFormProps, VxeGridInstance, VxeGridProps, VxeModalInstance, VxeModalProps } from "vxe-table"
import { deleteTableDataApi, getTableDataApi } from "@/http/table" import { deleteTableDataApi, getTableDataApi } from "@/http/apis/table"
import { ElMessage, ElMessageBox } from "element-plus" import { ElMessage, ElMessageBox } from "element-plus"
import { nextTick, reactive, ref } from "vue" import { nextTick, reactive, ref } from "vue"
import { RoleColumnSolts } from "./tsx/RoleColumnSolts" import { RoleColumnSolts } from "./tsx/RoleColumnSolts"

View File

@ -1,6 +1,6 @@
import type { LoginRequestData } from "@/http/login/types/login" import type { LoginRequestData } from "@/http/apis/login/type"
import { routeSettings } from "@/config/route" import { routeSettings } from "@/config/route"
import { getUserInfoApi, loginApi } from "@/http/login" import { getUserInfoApi, loginApi } from "@/http/apis/login"
import { pinia } from "@/pinia" import { pinia } from "@/pinia"
import { resetRouter } from "@/router" import { resetRouter } from "@/router"
import { getToken, removeToken, setToken } from "@/utils/cache/cookies" import { getToken, removeToken, setToken } from "@/utils/cache/cookies"