scorpio 2 anni fa
parent
commit
61ede5812b
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/layout/top.vue

+ 2 - 1
src/layout/top.vue

@@ -174,7 +174,8 @@ export default {
         window.location.href.indexOf('https') > -1
           ? window.location.href.replace('https', 'wss')
           : window.location.href.replace('http', 'ws')
-      const wsuri = url + '/websocket/' + this.user.info.userId
+      const wsuri = url + 'websocket/' + this.user.info.userId
+      console.log(wsuri)
       this.websock = new WebSocket(wsuri)
       this.websock.onmessage = this.websocketonmessage
       // 连接建立时触发