许成详 6 years ago
parent
commit
142c8a1c86
3 changed files with 9 additions and 6 deletions
  1. 4
    4
      config/index.js
  2. 0
    1
      dist/index.html
  3. 5
    1
      src/pages/system/newOrder/newOrderList/index.vue

+ 4
- 4
config/index.js View File

@@ -15,8 +15,8 @@ module.exports = {
15 15
         // target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://127.0.0.1:8080', 
17 17
         // target: 'http://192.168.0.11:8080', //ys
18
-        target: 'http://192.168.0.125:8080', //hyq
19
-        // target: 'http://dev.ycjcjy.com/', //frp
18
+        // target: 'http://192.168.0.125:8080', //hyq
19
+        target: 'http://dev.ycjcjy.com', //frp
20 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
21 21
         // pathRewrite: {
22 22
         //   '^/api': 'api'
@@ -25,7 +25,7 @@ module.exports = {
25 25
     },
26 26
     // Various Dev Server settings
27 27
     host: '0.0.0.0', // can be overwritten by process.env.HOST
28
-    port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
28
+    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
29 29
     autoOpenBrowser: false,
30 30
     errorOverlay: true,
31 31
     notifyOnErrors: true,
@@ -44,7 +44,7 @@ module.exports = {
44 44
      */
45 45
 
46 46
     // https://webpack.js.org/configuration/devtool/#development
47
-    devtool: 'cheap-module-eval-source-map',
47
+    devtool: 'source-map',
48 48
 
49 49
     // If you have problems debugging vue-files in devtools,
50 50
     // set this to false - it *may* help

+ 0
- 1
dist/index.html View File

@@ -1 +0,0 @@
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.7b8890c3ad5926e05dfe005152e45a63.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.72fd297fb65876bd6e37.js></script></body></html>

+ 5
- 1
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -144,6 +144,7 @@ export default {
144 144
     Object.keys(this.websockets).forEach((key) => {
145 145
       console.log(key, this.websockets[key])
146 146
       this.websockets[key].close()
147
+      clearInterval(this.websockets[key].interval)
147 148
     })
148 149
     this.websockets = {}
149 150
     next()
@@ -312,11 +313,14 @@ export default {
312 313
         this.websockets[wsRealPath].onopen = console.log
313 314
         this.websockets[wsRealPath].onmessage = this.websocketonmessage
314 315
         this.websockets[wsRealPath].onclose = this.reloadWebSocket
315
-        setInterval(() => this.websockets[wsRealPath].send(10), 120000)
316
+        this.websockets[wsRealPath].interval = setInterval(() => this.websockets[wsRealPath].send(10), 120000)
316 317
       }
317 318
     },
318 319
     reloadWebSocket (e) {
319 320
       console.log(e.currentTarget.url)
321
+      Object.keys(this.websockets).forEach((key) => {
322
+        clearInterval(this.websockets[key].interval)
323
+      })
320 324
       if (this.needReload) { // 此变量判断是否需要重连
321 325
         this.websockets = {}
322 326
         this.initWebSocket()