fix 修复 环境变量书写错误

This commit is contained in:
疯狂的狮子Li 2023-11-03 22:40:18 +08:00
parent b829ba4aa0
commit caa9d0fcdc
2 changed files with 2 additions and 1 deletions

1
src/types/env.d.ts vendored
View File

@ -69,6 +69,7 @@ interface ImportMetaEnv {
VITE_APP_ENV: string; VITE_APP_ENV: string;
VITE_APP_RSA_PUBLIC_KEY: string; VITE_APP_RSA_PUBLIC_KEY: string;
VITE_APP_CLIENT_ID: string; VITE_APP_CLIENT_ID: string;
VITE_APP_WEBSOCKET: boolean;
} }
interface ImportMeta { interface ImportMeta {
readonly env: ImportMetaEnv; readonly env: ImportMetaEnv;

View File

@ -33,7 +33,7 @@ let socketError = 0 as number; // 错误次数
// 初始化socket // 初始化socket
export const initWebSocket = (url: any) => { export const initWebSocket = (url: any) => {
if (import.meta.env.VITE_APP_WEBSOCKET) { if (!import.meta.env.VITE_APP_WEBSOCKET) {
return; return;
} }
socketUrl = url; socketUrl = url;