From 597f2b4461eb38626cfcfc243ca0eefaf076069c Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期六, 23 十二月 2023 19:38:34 +0800
Subject: [PATCH] fix 修复 websocket 非index页面刷新无法重连问题

---
 src/views/index.vue |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/views/index.vue b/src/views/index.vue
index 57c5373..3f853a3 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -96,13 +96,6 @@
 </template>
 
 <script setup name="Index" lang="ts">
-import { initWebSocket } from '@/utils/websocket';
-
-onMounted(() => {
-  let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';
-  initWebSocket(protocol + window.location.host + import.meta.env.VITE_APP_BASE_API + '/resource/websocket');
-});
-
 const goTarget = (url: string) => {
   window.open(url, '__blank');
 };

--
Gitblit v1.9.3