From 2b242367d71b61516e7f4e3e16c67d89505c70e9 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Aug 2025 10:12:16 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=E7=AB=99=E5=86=85=E4=BF=A1=EF=BC=9A?= =?UTF-8?q?=E4=BB=8E=E7=BA=A2=E7=82=B9=E7=82=B9=E8=BF=9B=E5=8E=BB=E5=8F=88?= =?UTF-8?q?=E9=80=80=E5=87=BA=E6=9D=A5=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=B6=88?= =?UTF-8?q?=E9=80=80=E7=BA=A2=E7=82=B9=EF=BC=8C=E6=96=B0=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B9=9F=E6=B2=A1=E9=80=82=E9=85=8D=20#712?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend_nuxt/pages/message-box/index.vue | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/frontend_nuxt/pages/message-box/index.vue b/frontend_nuxt/pages/message-box/index.vue index f5c62630f..abd255dfc 100644 --- a/frontend_nuxt/pages/message-box/index.vue +++ b/frontend_nuxt/pages/message-box/index.vue @@ -8,7 +8,7 @@
-
+
站内信
@@ -147,7 +147,7 @@ const { fetchChannelUnread: refreshChannelUnread, setFromList: setChannelUnreadF useChannelsUnreadCount() let subscription = null -const activeTab = ref('messages') +const activeTab = ref('channels') const channels = ref([]) const loadingChannels = ref(false) const isFloatMode = computed(() => route.query.float === '1') @@ -159,6 +159,7 @@ async function fetchConversations() { toast.error('请先登录') return } + loading.value = true try { const response = await fetch(`${API_BASE_URL}/api/messages/conversations`, { method: 'GET', @@ -215,11 +216,14 @@ async function fetchChannels() { } } +function switchToMessage() { + activeTab.value = 'messages' + fetchConversations() +} + function switchToChannels() { activeTab.value = 'channels' - if (channels.value.length === 0) { - fetchChannels() - } + fetchChannels() } async function goToChannel(id) { @@ -244,12 +248,15 @@ async function goToChannel(id) { } onActivated(async () => { - loading.value = true currentUser.value = await fetchCurrentUser() if (currentUser.value) { - await fetchConversations() - refreshGlobalUnreadCount() // Refresh global count when entering the list + if (activeTab.value === 'messages') { + await fetchConversations() + } else { + await fetchChannels() + } + refreshGlobalUnreadCount() refreshChannelUnread() const token = getToken() if (token && !isConnected.value) { From 1e1ae29d32e56347db45bf11d443ef8eb393e03e Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 26 Aug 2025 10:33:45 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20reactions=E9=9D=A2=E6=9D=BF=EF=BC=8C?= =?UTF-8?q?=E8=B6=85=E8=BF=87=E4=B8=89=E7=A7=8Dreaction=E6=89=8D=E9=87=87?= =?UTF-8?q?=E7=94=A8=E7=9C=81=E7=95=A5=E6=A0=B7=E5=BC=8F=20=E8=80=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E4=B8=89=E4=B8=AA=20#724?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend_nuxt/components/ReactionsGroup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend_nuxt/components/ReactionsGroup.vue b/frontend_nuxt/components/ReactionsGroup.vue index 697cc81e0..ee9774422 100644 --- a/frontend_nuxt/components/ReactionsGroup.vue +++ b/frontend_nuxt/components/ReactionsGroup.vue @@ -6,7 +6,7 @@ @mouseenter="cancelHide" @mouseleave="scheduleHide" > -