|
@@ -4,10 +4,10 @@ export default {
|
|
|
websock: null,
|
|
|
url: '',
|
|
|
lockReconnect: false, // 是否真正建立连接
|
|
|
- timeout: 30 * 1000, // 25秒一次心跳
|
|
|
- timeoutObj: null, // 心跳心跳倒计时
|
|
|
- serverTimeoutObj: null, // 心跳倒计时
|
|
|
- timeoutnum: null, // 断开 重连倒计时
|
|
|
+ timeout: 30 * 1000, // 30秒一次心跳
|
|
|
+ timeoutObj: {}, // 心跳心跳倒计时
|
|
|
+ serverTimeoutObj: {}, // 心跳倒计时
|
|
|
+ timeoutnum: {}, // 断开 重连倒计时
|
|
|
message: {}
|
|
|
},
|
|
|
getters: {
|
|
@@ -33,8 +33,9 @@ export default {
|
|
|
if (callBack.data === 'heartCheck') {
|
|
|
return
|
|
|
}
|
|
|
- // state.message = callBack.data
|
|
|
- state.message = JSON.parse(JSON.stringify(callBack.data))
|
|
|
+ state.message = callBack.data
|
|
|
+ // state.message = Object.assign([], callBack.data)
|
|
|
+ // this.$store.state.websocket.message = JSON.parse(JSON.stringify(callBack.data))
|
|
|
}
|
|
|
state.websock.onerror = function () { // e错误
|
|
|
// console.log(e)
|