Browse Source

perf: ip地址自动识别

曾坤森 1 week ago
parent
commit
cb2b701e4c
2 changed files with 1 additions and 4 deletions
  1. 1 1
      src/api/interceptor.ts
  2. 0 3
      src/views/dashboard/plugin/index.vue

+ 1 - 1
src/api/interceptor.ts

@@ -24,7 +24,7 @@ function onRefreshed(token: string) {
 }
 
 const instance = axios.create({
-  baseURL: import.meta.env.VITE_API_BASE_URL,
+  baseURL: '/',
 });
 // 新增一个独立的函数来处理 Token 刷新
 async function handleTokenRefresh(

+ 0 - 3
src/views/dashboard/plugin/index.vue

@@ -150,9 +150,6 @@ import type { TableColumnData } from '@arco-design/web-vue';
 import useLoading from '@/hooks/loading';
 import { useI18n } from 'vue-i18n';
 import { entityTypeList, statusTypeList, DeviceInfo } from './conf';
-import dayjs from 'dayjs';
-import { downLoadFun } from '@/utils/const';
-import { useIntervalFn } from '@vueuse/core';
 import EditDialog from './edit.vue';
 
 const { t } = useI18n();