From f61fefa46d0fbacb80eb87b7153a709b2f35ad4d Mon Sep 17 00:00:00 2001 From: luojiayi <1712054227@qq.com> Date: Mon, 21 Apr 2025 18:22:01 +0800 Subject: [PATCH] =?UTF-8?q?2025=E5=B9=B404=E6=9C=8821=E6=97=A518:21:59?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 7 +++++-- .env.production | 5 +++-- src/layout/index.vue | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index 4a94903..287520d 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,5 @@ -VITE_APP_URL = 'http://192.168.3.116:8001' -VITE_APP_URL_WEBSOCKET = 'http://192.168.3.116:8000/api/websocket' +# VITE_APP_URL = 'http://192.168.3.116:8001/' +# VITE_APP_URL_WEBSOCKET = 'http://192.168.3.116:8000/api/websocket' + +VITE_APP_URL = 'http://api.handcuff.youaikang.cn' +VITE_APP_URL_WEBSOCKET = 'ws://device.handcuff.youaikang.cn:8000/api/websocket' diff --git a/.env.production b/.env.production index 27e4db4..d5da010 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ -VITE_APP_URL = 'http://192.168.3.116:8001/' -VITE_APP_URL_WEBSOCKET = 'http://192.168.3.116:8000/api/websocket' +VITE_APP_URL = 'http://api.handcuff.youaikang.cn' +VITE_APP_URL_WEBSOCKET = 'http://device.handcuff.youaikang.cn:8000/api/websocket' + diff --git a/src/layout/index.vue b/src/layout/index.vue index cde39e7..6da8509 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -69,9 +69,9 @@ onMounted(() => { // }); // } - // if (ws.socket == null) { - // ws.connect(); - // } + if (ws.socket == null) { + ws.connect(); + } }); onMounted(() => {