【fix】websocket连接路径修改

This commit is contained in:
zhaoxiao
2023-03-10 14:01:03 +08:00
parent 3a1c15fe63
commit 294be7eab5
@@ -198,7 +198,7 @@ export default {
initWebSocket: function () {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
const userId = store.getters.userInfo.id
const url = window._CONFIG.domianWebSocketURL.replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId
const url = window._CONFIG.domianWebSocketURL.replace('https://', 'wss://').replace('http://', 'ws://') + '/jero-boot/websocket/' + userId
// console.log(url);
this.websock = new WebSocket(url)
this.websock.onopen = this.websocketOnopen