From 3c640615d14113a97297927a07d4397070643e2d Mon Sep 17 00:00:00 2001 From: luyisha Date: Tue, 8 Aug 2023 17:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/config.js | 4 +++- src/views/cultrue/index.vue | 2 +- src/views/index.vue | 2 +- src/views/ty/index.vue | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/config.js b/public/config.js index c748526..5580298 100644 --- a/public/config.js +++ b/public/config.js @@ -2,5 +2,7 @@ window.publicConfig={ BASE_API:"http://192.168.66.16/api", // BASE_API:"http://10.97.121.2/api", // socket url - WS_URL: 'ws://10.97.121.2/ws' + WS_URL_TY: 'ws://10.97.121.2/ty', + WS_URL_WH: 'ws://10.97.121.2/wh', + WS_URL_ZL: 'ws://10.97.121.2/zl' } diff --git a/src/views/cultrue/index.vue b/src/views/cultrue/index.vue index ae69612..fcf03cd 100644 --- a/src/views/cultrue/index.vue +++ b/src/views/cultrue/index.vue @@ -890,7 +890,7 @@ export default { // 获取实时数据 getsckdata(){ let that = this; - ws = new WebSocket("ws://192.168.66.16/wh"); + ws = new WebSocket(publicConfig.WS_URL_WH); ws.onopen = function() {}; // 连接关闭时触发 ws.onclose = function(event) { diff --git a/src/views/index.vue b/src/views/index.vue index 75ecd68..df3fc9b 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -935,7 +935,7 @@ export default { getsckdata(){ let that = this; // websocket - ws = new WebSocket("ws://192.168.66.16/zl"); + ws = new WebSocket(publicConfig.WS_URL_ZL); ws.onopen = function() { // console.log("ws connected success!") }; diff --git a/src/views/ty/index.vue b/src/views/ty/index.vue index c498408..76ea207 100644 --- a/src/views/ty/index.vue +++ b/src/views/ty/index.vue @@ -911,7 +911,7 @@ export default { // 获取实时数据 getsckdata(){ let that = this; - ws = new WebSocket("ws://192.168.66.16/ty"); + ws = new WebSocket(publicConfig.WS_URL_TY); ws.onopen = function() {}; // 连接关闭时触发 ws.onclose = function(event) {