From 0187cbec681fffcd6a77190b5ed35d185d5bcfcb Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 14 一月 2026 13:37:04 +0800
Subject: [PATCH] 1
---
utils/common.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/utils/common.js b/utils/common.js
index 2002e39..77074ff 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]+":18080/WS"
+ }else if(httpUrl.indexOf("https://") === 0) {
+ httpUrl = httpUrl.replace("https://", "")
+ httpUrl = "wss://" + httpUrl.split(":")[0]+":18080/WS"
+ }else{
+ // 鎻愮ず浼犲叆杩炴帴閿欒
+ }
+
+ return httpUrl
+ }
}
export const CommonUtils = new commonUtils()
\ No newline at end of file
--
Gitblit v1.9.1