yuantianjiao 6 years ago
parent
commit
dbbd7cf4fa
2 changed files with 15 additions and 1 deletions
  1. 1
    1
      dist/index.html
  2. 14
    0
      src/pages/system/newOrder/newOrderList/index.vue

+ 1
- 1
dist/index.html View File

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.54e256e9410cfc02f5a984e5b434abb7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.c1411ab79fd2d7a36c58.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.90669cc3fbc21880e606b85d1375e710.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.7e921535e20f729cf046.js></script><script type=text/javascript src=./static/js/app.ee8ac8bcfdbcedb227c3.js></script></body></html>

+ 14
- 0
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -134,8 +134,22 @@ export default {
134 134
   mounted () {
135 135
     setTimeout(window.location.reload, 600 * 1000)
136 136
   },
137
+  beforeRouteLeave (to, from, next) {
138
+    // 导航离开该组件的对应路由时调用
139
+    // 可以访问组件实例 `this`
140
+    console.log(this.websockets)
141
+    Object.keys(this.websockets).forEach((key) => {
142
+      console.log(key, this.websockets[key])
143
+      this.websockets[key].onclose()
144
+    })
145
+    next()
146
+  },
137 147
   methods: {
138 148
     init () {
149
+      Object.keys(this.websockets).forEach((key) => {
150
+        console.log(key, this.websockets[key])
151
+        this.websockets[key].onclose()
152
+      })
139 153
       console.log('init')
140 154
       var param = []
141 155
       if (!this.caseid) {