scorpio %!s(int64=2) %!d(string=hai) anos
pai
achega
c7dd13697d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/layout/top.vue

+ 4 - 1
src/layout/top.vue

@@ -170,7 +170,10 @@ export default {
   },
   methods: {
     initWebSocket() {
-      const wsuri = config.wss + this.user.info.userId
+      const wsuri =
+        location.host.indexOf('dev') > -1
+          ? 'ws://dev.wutongshucloud.com/ws/websocket/'
+          : config.wss + this.user.info.userId
       this.websock = new WebSocket(wsuri)
       this.websock.onmessage = this.websocketonmessage
       // 连接建立时触发