lilei %!s(int64=3) %!d(string=hai) anos
pai
achega
99e3e36804
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/store/modules/websocketStore.js

+ 3 - 1
src/store/modules/websocketStore.js

@@ -53,7 +53,9 @@ export default {
         // console.log('ws发送心跳!')
         if (state.websock.readyState == 3) {
           clearInterval(state.heartInterId)
-          _this.commit('WEBSOCKET_INIT', url)
+          setTimeout(function() {
+            _this.commit('WEBSOCKET_INIT', url)
+          }, 500);
         }
         state.websock.send('ping')
       }, 10000)