zjxpcyc 6 gadus atpakaļ
vecāks
revīzija
e6c4f464a5
2 mainītis faili ar 6 papildinājumiem un 3 dzēšanām
  1. 2
    2
      src/store/goods/order.js
  2. 4
    1
      src/util/websocket.js

+ 2
- 2
src/store/goods/order.js Parādīt failu

76
           }
76
           }
77
         }).then(res => {
77
         }).then(res => {
78
           commit('updateBusiness', true)
78
           commit('updateBusiness', true)
79
-          resolve(res)
79
+          resolve(true)
80
         })
80
         })
81
       })
81
       })
82
     },
82
     },
89
           }
89
           }
90
         }).then(res => {
90
         }).then(res => {
91
           commit('updateBusiness', false)
91
           commit('updateBusiness', false)
92
-          resolve(res)
92
+          resolve(false)
93
         })
93
         })
94
       })
94
       })
95
     },
95
     },

+ 4
- 1
src/util/websocket.js Parādīt failu

64
     this.client.onmessage = this.on.message
64
     this.client.onmessage = this.on.message
65
     this.client.onerror = this.on.error
65
     this.client.onerror = this.on.error
66
     this.client.onclose = e => {
66
     this.client.onclose = e => {
67
-      _self.on.close(e)
67
+      if (_self.on.close) {
68
+        _self.on.close(e)
69
+      }
70
+
68
       _self._breforeClose(_self.autoConnect)
71
       _self._breforeClose(_self.autoConnect)
69
       _self.client = null
72
       _self.client = null
70
 
73