refactor:优化 VITE_APP_TENANT_ENABLE、VITE_APP_CAPTCHA_ENABLE 变量的加载,不使用 useAppConfig 处理

This commit is contained in:
YunaiV
2025-04-22 21:18:10 +08:00
parent e9f2b5701c
commit f202e1c69c
13 changed files with 93 additions and 88 deletions

View File

@@ -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({