diff --git a/src/components/call/CallWindow.vue b/src/components/call/CallWindow.vue index 2eb8991..b35a634 100644 --- a/src/components/call/CallWindow.vue +++ b/src/components/call/CallWindow.vue @@ -450,7 +450,7 @@ watch( currentFlvUrl = newFlvUrl } }, - { immediate: true } + { immediate: true, deep: true } ) // 组件卸载时清理 FLV 播放器 diff --git a/src/views/chat/ChatView.vue b/src/views/chat/ChatView.vue index 77597e7..f2e7d87 100644 --- a/src/views/chat/ChatView.vue +++ b/src/views/chat/ChatView.vue @@ -2308,8 +2308,8 @@ watch(currentTab, (newTab) => { onMounted(async () => { // 每次页面加载/刷新时都验证 token 并获取最新用户信息 - const isValid = await authStore.checkAuth() - if (!isValid) { router.push('/login'); return } + const isValid = await authStore.checkAuth() + if (!isValid) { router.push('/login'); return } if (authStore.user) { await wsManager.connect(authStore.user.id)