From 78f371960a34b1daaf4f43d0e811317199d9025d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=96=87=E5=8F=AF?= <1041367524@qq.com> Date: Mon, 16 May 2022 11:27:08 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20IM=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 ++- src/layouts/default.vue | 4 ++-- src/store/modules/chat/chat.js | 15 +++++++++------ src/views/chat/index.vue | 25 +++++++++++++++++++++---- vite.config.js | 4 ++-- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/.env b/.env index f6cfe6f..95809c2 100644 --- a/.env +++ b/.env @@ -1,3 +1,4 @@ VITE_BASE_URL=/api -VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws +#VITE_SOCKET_URL=wss://k8s-horse-gateway.mashibing.cn/ws +VITE_SOCKET_URL=ws://192.168.10.93:8090/ws VITE_REQUEST_TIMEOUT=5000 diff --git a/src/layouts/default.vue b/src/layouts/default.vue index da1ca78..f7a0f8f 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -22,8 +22,8 @@ import LayoutMain from './components/main.vue'; import LayoutMenu from './components/menu.vue'; import LayoutTabs from './components/tabs.vue'; - // const store = useStore(); - // store.dispatch('chat/connect'); + const store = useStore(); + store.dispatch('chat/connect');