diff --git a/apps/web-antd/.env.development b/apps/web-antd/.env.development index 4b4e441c9..cff255764 100644 --- a/apps/web-antd/.env.development +++ b/apps/web-antd/.env.development @@ -4,7 +4,7 @@ VITE_PORT=5666 VITE_BASE=/ # 请求路径 -VITE_BASE_URL='http://127.0.0.1:48080' +VITE_BASE_URL=http://127.0.0.1:48080 # 接口地址 VITE_GLOB_API_URL=/admin-api # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务 diff --git a/apps/web-antd/.env.production b/apps/web-antd/.env.production index ab51fee83..910fd64cc 100644 --- a/apps/web-antd/.env.production +++ b/apps/web-antd/.env.production @@ -1,9 +1,9 @@ VITE_BASE=/ # 请求路径 -VITE_BASE_URL='http://127.0.0.1:48080' +VITE_BASE_URL=http://127.0.0.1:48080 # 接口地址 -VITE_GLOB_API_URL=/admin-api +VITE_GLOB_API_URL=http://127.0.0.1:48080/admin-api # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务 VITE_UPLOAD_TYPE=server diff --git a/apps/web-antd/src/api/request.ts b/apps/web-antd/src/api/request.ts index 8c36097ff..fcefa2508 100644 --- a/apps/web-antd/src/api/request.ts +++ b/apps/web-antd/src/api/request.ts @@ -3,7 +3,7 @@ */ import type { RequestClientOptions } from '@vben/request'; -import { useAppConfig } from '@vben/hooks'; +import { isTenantEnable, useAppConfig } from '@vben/hooks'; import { preferences } from '@vben/preferences'; import { authenticateResponseInterceptor, @@ -19,7 +19,8 @@ import { useAuthStore } from '#/store'; import { refreshTokenApi } from './core'; -const { apiURL, tenantEnable } = useAppConfig(import.meta.env, import.meta.env.PROD); +const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD); +const tenantEnable = isTenantEnable(); function createRequestClient(baseURL: string, options?: RequestClientOptions) { const client = new RequestClient({ diff --git a/apps/web-antd/src/components/doc-alert/doc-alert.vue b/apps/web-antd/src/components/doc-alert/doc-alert.vue index 1cff7b990..66b6fcd1d 100644 --- a/apps/web-antd/src/components/doc-alert/doc-alert.vue +++ b/apps/web-antd/src/components/doc-alert/doc-alert.vue @@ -1,6 +1,6 @@