代码优化

This commit is contained in:
Zheng Jie
2022-05-24 18:18:03 +08:00
parent 98a8001a24
commit 29cc20ea30
3 changed files with 1 additions and 4 deletions

View File

@@ -147,7 +147,7 @@ export default {
})
},
initWebSocket() {
const wsUri = process.env.VUE_APP_WS_API + '/webSocket/deploy'
const wsUri = (process.env.VUE_APP_WS_API === '/' ? '' : process.env.VUE_APP_WS_API) + 'webSocket/deploy'
this.websock = new WebSocket(wsUri)
this.websock.onerror = this.webSocketOnError
this.websock.onmessage = this.webSocketOnMessage