From 042da4b2ad539b4b4c7e66ac42216daef15e9df2 Mon Sep 17 00:00:00 2001 From: bianyaqi Date: Thu, 24 Jul 2025 17:36:31 +0800 Subject: [PATCH] =?UTF-8?q?websocket=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 5 +++-- src/components/360View/commonForm/optometryForm.vue | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index db32132..3ce3127 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,8 @@ NODE_ENV=development VUE_APP_NODE_ENV=dev -VUE_APP_LOGIN_URL='http://47.110.224.240:8036/xiangan-crf' +#VUE_APP_LOGIN_URL='http://47.110.224.240:8036/xiangan-crf' +VUE_APP_LOGIN_URL='http://192.168.4.24:8036/xiangan-crf' # 免登录链接 VUE_APP_SINGLE_URL='https://10.80.3.194:8002/oauth/authorize' @@ -10,5 +11,5 @@ VUE_APP_PACS_URL='http://192.168.0.85:8001' # VUE_APP_PACS_URL='http://z1.huimucloud.com:8085' # websocket地址 -VUE_APP_WS_URL='ws://192.168.0.151:1894/data' +VUE_APP_WS_URL='ws://192.168.0.129:1894/data' # VUE_APP_WS_URL='ws://192.168.0.119:8036/xiangan-crf/websocket/2017710013' diff --git a/src/components/360View/commonForm/optometryForm.vue b/src/components/360View/commonForm/optometryForm.vue index 1021659..e5d3079 100644 --- a/src/components/360View/commonForm/optometryForm.vue +++ b/src/components/360View/commonForm/optometryForm.vue @@ -593,6 +593,7 @@ export default { clearTimeout(this.timeoutnum) clearTimeout(this.timeoutObj) clearTimeout(this.serverTimeoutObj) + this.ws.close() this.ws = null } }, @@ -769,14 +770,12 @@ export default { self.connectFlag = true self.start() } - this.ws.onclose = function(err) { + this.ws.onclose = function() { self.connectFlag = false - console.log('closed', err) - self.reconnect() + // self.reconnect() } - this.ws.onerror = function(err) { + this.ws.onerror = function() { self.connectFlag = false - console.log('error', err) self.reconnect() } this.ws.onmessage = (msg) => {