修改已知问题

This commit is contained in:
qq787203167
2022-06-01 09:28:25 +08:00
parent d73f86baa9
commit 69f916ef3c
-4
View File
@@ -37,22 +37,18 @@ export default new Vuex.Store({
that.commit('start')
}
state.ws.onmessage = function(res) {
console.log(res)
if (res.data === 'heartCheck') {
// 收到服务器信息,心跳重置
that.commit('reset')
console.log('socket-heartCheck')
} else {
state.msg = res
}
}
state.ws.onclose = function(res) {
console.log('Connection closed...')
//重连
that.commit('reconnect')
}
state.ws.onerror = function(res) {
console.log('Connection error...')
//重连
that.commit('reconnect')
}