fix: 修改环境变量类型原因导致websocket无法关闭问题
Signed-off-by: Lau <1807121535@qq.com>
This commit is contained in:
parent
9e89ab5bae
commit
d034236ce3
2
src/types/env.d.ts
vendored
2
src/types/env.d.ts
vendored
@ -69,7 +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;
|
VITE_APP_WEBSOCKET: string;
|
||||||
}
|
}
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
readonly env: ImportMetaEnv;
|
readonly env: ImportMetaEnv;
|
||||||
|
@ -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 === 'false') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
socketUrl = url;
|
socketUrl = url;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user