From fbe87c8d043cb038d384df7721bc071676a0c24c Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期二, 03 三月 2026 14:38:49 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
utils/common.js | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/utils/common.js b/utils/common.js
index 6905022..80c909d 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -498,16 +498,24 @@
httpFormatWs(httpUrl=this.serverUrl) {
if(httpUrl.indexOf("http://") === 0){
httpUrl = httpUrl.replace("http://", "")
- httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws"
+ httpUrl = httpUrl.substring(0, httpUrl.length - 1)
+ let BackSlashLast = httpUrl.lastIndexOf('/')
+ httpUrl = httpUrl.substring(0, BackSlashLast)
+ httpUrl = "ws://" + httpUrl.split(":")[0]+":8888/ws"
}else if(httpUrl.indexOf("https://") === 0) {
httpUrl = httpUrl.replace("https://", "")
- httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws"
+ httpUrl = httpUrl.substring(0, httpUrl.length - 1)
+ let BackSlashLast = httpUrl.lastIndexOf('/')
+ httpUrl = httpUrl.substring(0, BackSlashLast)
+ httpUrl = "wss://" + httpUrl.split(":")[0]+":8888/ws"
}else{
// 鎻愮ず浼犲叆杩炴帴閿欒
}
return httpUrl
}
+
+
}
export const CommonUtils = new commonUtils()
\ No newline at end of file
--
Gitblit v1.9.1