From 2362f8bce1fc26a28b3c2a019ae3216efa399de5 Mon Sep 17 00:00:00 2001
From: 15179599649 <zhangyiyao89@qq.com>
Date: Mon, 11 Mar 2024 09:05:22 +0800
Subject: [PATCH] 细节样式调整
---
src/websocket/util/config.ts | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/websocket/util/config.ts b/src/websocket/util/config.ts
index a8ab912..12fa799 100644
--- a/src/websocket/util/config.ts
+++ b/src/websocket/util/config.ts
@@ -1,11 +1,13 @@
import { ELocalStorageKey } from '/@/types/enums'
import { CURRENT_CONFIG } from '/@/api/http/config'
+const { baseUrl: { wsBaseUrl } } = window.globalApiConfig
+
const user = localStorage.getItem('user_info')
export function getWebsocketUrl () {
const token: string = localStorage.getItem(ELocalStorageKey.Token) || '' as string
// const url = CURRENT_CONFIG.websocketURL
- const url = import.meta.env.VITE_WS_API_URL + '?x-auth-token=' + encodeURI(token)
+ const url = (wsBaseUrl || import.meta.env.VITE_WS_API_URL) + '?x-auth-token=' + encodeURI(token)
return url
}
--
Gitblit v1.9.3