Kaynağa Gözat

接口接入

scorpio 2 yıl önce
ebeveyn
işleme
61ede5812b
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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
       // 连接建立时触发