From fa0045dec30afff824b1efdafeb437a7b4f21c7e Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Thu, 16 Jan 2025 10:08:16 +0800
Subject: [PATCH] 打印ws信息
---
src/websocket/util/config.ts | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/websocket/util/config.ts b/src/websocket/util/config.ts
index a8ab912..4653047 100644
--- a/src/websocket/util/config.ts
+++ b/src/websocket/util/config.ts
@@ -1,3 +1,12 @@
+/*
+ * @Author: GuLiMmo 2820890765@qq.com
+ * @Date: 2024-03-12 18:01:28
+ * @LastEditors: GuLiMmo 2820890765@qq.com
+ * @LastEditTime: 2024-08-27 16:10:38
+ * @FilePath: /drone-web/src/websocket/util/config.ts
+ * @Description:
+ * Copyright (c) 2024 by GuLiMmo, All Rights Reserved.
+ */
import { ELocalStorageKey } from '/@/types/enums'
import { CURRENT_CONFIG } from '/@/api/http/config'
@@ -5,7 +14,7 @@
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 = (window?.globalApiConfig?.baseUrl?.wsBaseUrl || import.meta.env.VITE_WS_API_URL) + '?x-auth-token=' + encodeURI(token.replace('bearer ', ''))
return url
}
--
Gitblit v1.9.3