diff --git a/src/api/platform/core/controller/user.ts b/src/api/platform/core/controller/user.ts index 04a7bb3..c87f37a 100644 --- a/src/api/platform/core/controller/user.ts +++ b/src/api/platform/core/controller/user.ts @@ -23,7 +23,7 @@ export const login = (params: LoginParams, options?: boolean | RequestOptions) = // 非对称密钥AES加密处理 const user = encryptionLogin({ data: params, - key: import.meta.env.VITE_GATEWAY_ASE_ENCODE_SECRET, + key: import.meta.env['VITE_GATEWAY_ASE_ENCODE_SECRET'], param: ['password'] }); diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index cfddf8e..e1cd129 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -108,7 +108,7 @@ const transform: AxiosTransform = { requestInterceptors: (config, options) => { // 请求之前处理config const token = getAccessToken(); - const clientId = import.meta.env.VITE_CLIENT_ID, clientSecret = import.meta.env.VITE_CLIENT_SECRET; + const clientId = import.meta.env['VITE_CLIENT_ID'], clientSecret = import.meta.env['VITE_CLIENT_SECRET']; const { clientId: customClientId , clientSecret: customClientSecret } = options?.requestOptions || {}; // 使用token进行请求 if (token && (config as Recordable)?.requestOptions?.withToken !== false) {