Browse Source

bug 修复

lilei 3 năm trước cách đây
mục cha
commit
99e3e36804
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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)