fix:打包后websocket地址问题

This commit is contained in:
jmal 2020-09-20 11:34:09 +08:00
parent 0c246004f0
commit 2d98d33b02

View File

@ -1,4 +1,9 @@
const url = process.env.VUE_APP_WEBSOCKET;
let host = window.location.host;
if (window.location.port.length > 0) {
host = window.location.host.substring(0, window.location.host.length - window.location.port.length - 1)
}
const url = `http://${host}:8088`;
let stompClient = '';
let isConnected = false;
let timer = '';