From 9b2bf18d4be98e8da39b01e6efbd726a76c45428 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 16 一月 2026 09:38:57 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
utils/common.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/utils/common.js b/utils/common.js
index 2002e39..4c609a4 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -494,6 +494,21 @@
return item[e.ColmCols]
})
}
+
+ httpFormatWs(httpUrl=this.serverUrl) {
+ console.log('httpUrl: ',httpUrl);
+ if(httpUrl.indexOf("http://") === 0){
+ httpUrl = httpUrl.replace("http://", "")
+ httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws"
+ }else if(httpUrl.indexOf("https://") === 0) {
+ httpUrl = httpUrl.replace("https://", "")
+ httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws"
+ }else{
+ // 鎻愮ず浼犲叆杩炴帴閿欒
+ }
+
+ return httpUrl
+ }
}
export const CommonUtils = new commonUtils()
\ No newline at end of file
--
Gitblit v1.9.1