|
@@ -32,7 +32,7 @@ const store = new Vuex.Store({
|
|
|
state.socketTask.onOpen(() => dispatch('websocketOnOpen'))
|
|
|
state.socketTask.onMessage(res => dispatch('websocketOnMessage', res))
|
|
|
state.socketTask.onClose(e => dispatch('websocketOnClose', url));
|
|
|
- state.socketTask.onError(e => dispatch('websocketOnError', url));
|
|
|
+ state.socketTask.onError(e => dispatch('websocketOnError'));
|
|
|
},
|
|
|
websocketOnOpen({
|
|
|
commit
|
|
@@ -66,11 +66,7 @@ const store = new Vuex.Store({
|
|
|
websocketOnError({
|
|
|
commit,
|
|
|
dispatch
|
|
|
- }, url) {
|
|
|
- dispatch('websocketClose')
|
|
|
- setTimeout(() => {
|
|
|
- dispatch('websocketInit', url)
|
|
|
- }, 3000)
|
|
|
+ }) {
|
|
|
console.log('WebSocket连接错误')
|
|
|
},
|
|
|
websocketClose({
|