wlzboy
2025-11-01 82d6b98f5b6b88e223259547208ab59829ad723e
app/pages/index.vue
@@ -246,6 +246,13 @@
      
      // 加载未读消息数量
      loadUnreadMessageCount() {
        // 检查用户是否已登录
        const userId = this.currentUser.userId
        if (!userId) {
          console.log('用户未登录,跳过获取未读消息数量')
          return
        }
        getUnreadCount().then(response => {
          if (response.code === 200) {
            this.unreadMessageCount = response.data || 0