From 951aacd10e070d3c9867dbb19404bc470f2e3aad Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Wed, 29 Nov 2023 10:20:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/demo' into demo

---
 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