From 6cb758b9a39f142ddcac9e5f9ab18fbeefceda67 Mon Sep 17 00:00:00 2001 From: bob <312777916@qq.com> Date: Fri, 13 Sep 2024 23:51:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3token=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=A2=B0=E6=92=9E=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/LayoutContainer.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/layout/LayoutContainer.vue b/src/views/layout/LayoutContainer.vue index 5ecdd87..bd45090 100644 --- a/src/views/layout/LayoutContainer.vue +++ b/src/views/layout/LayoutContainer.vue @@ -19,8 +19,10 @@ const myCardDialog = ref() const myAvatar = ref() const userData = userStore() -onMounted(() => { - wsConnect.createWs() +onMounted(async () => { + setTimeout(() => { + wsConnect.createWs() + }, 3000) // 延迟启动,防止token刷新碰撞 document.addEventListener('click', clickListener) })