|  | @@ -21,12 +21,12 @@ export default {
 | 
	
		
			
				|  |  |        const that = this
 | 
	
		
			
				|  |  |        state.websock = new WebSocket(url)
 | 
	
		
			
				|  |  |        state.url = url
 | 
	
		
			
				|  |  | -      state.websock.onopen = function () {
 | 
	
		
			
				|  |  | +      state.websock.onopen = () => {
 | 
	
		
			
				|  |  |          console.log('连接成功')
 | 
	
		
			
				|  |  |          // 发送心跳包
 | 
	
		
			
				|  |  |          that.commit('websocket/start')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      state.websock.onmessage = function (callBack) {
 | 
	
		
			
				|  |  | +      state.websock.onmessage = (callBack) => {
 | 
	
		
			
				|  |  |          // 重置心跳
 | 
	
		
			
				|  |  |          // console.log('callBack = ' + callBack.data)
 | 
	
		
			
				|  |  |          that.commit('websocket/reset')
 | 
	
	
		
			
				|  | @@ -37,11 +37,11 @@ export default {
 | 
	
		
			
				|  |  |          // state.message = Object.assign([], callBack.data)
 | 
	
		
			
				|  |  |          // this.$store.state.websocket.message = JSON.parse(JSON.stringify(callBack.data))
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      state.websock.onerror = function () { // e错误
 | 
	
		
			
				|  |  | +      state.websock.onerror = () => { // e错误
 | 
	
		
			
				|  |  |          // console.log(e)
 | 
	
		
			
				|  |  |          that.commit('websocket/reconnect')
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      state.websock.onclose = function () { // e关闭
 | 
	
		
			
				|  |  | +      state.websock.onclose = () => { // e关闭
 | 
	
		
			
				|  |  |          // console.log(e)
 | 
	
		
			
				|  |  |          that.commit('websocket/reconnect')
 | 
	
		
			
				|  |  |        }
 |