Jelajahi Sumber

feat(cfc-frontend): clean dimension tabs + styled action articles

- 身/心/智移除 FamilyRelationshipSection (重要关系) 整个区块
- action 统一化:补 @manage="goFamilyMembers" + goFamilyMembers method
- action 推荐阅读 -> 独立 ActionArticleRecommend 组件,行绿色调卡片造型
- 移除未用导入 getContactList/getHealthAlerts/getMilestones
Sisyphus 3 bulan lalu
induk
melakukan
08528fbb04

+ 222 - 0
cfc-frontend/components/ActionArticleRecommend.vue

@@ -0,0 +1,222 @@
+<template>
+  <view class="rec-section">
+    <view class="rec-header">
+      <view class="rec-header-left">
+        <text class="rec-icon">&#x1F4D6;</text>
+        <text class="rec-title">推荐阅读</text>
+      </view>
+      <text class="rec-more" @click="$emit('moreArticles')">更多 ›</text>
+    </view>
+
+    <!-- 无数据 -->
+    <view v-if="!displayArticles || displayArticles.length === 0" class="rec-empty">
+      <text class="rec-empty-text">{{ isLoggedIn ? '暂无阅读推荐' : '登录后查看更多文章' }}</text>
+    </view>
+
+    <!-- 卡片列表 -->
+    <view v-else class="rec-list">
+      <view
+        class="rec-card"
+        v-for="(article, idx) in displayArticles"
+        :key="article.id || idx"
+        @click="$emit('articleClick', article)"
+      >
+        <!-- 封面图(可选) -->
+        <view class="rec-card-cover" v-if="article.coverImage">
+          <image class="rec-cover-img" :src="article.coverImage" mode="aspectFill" />
+          <view class="rec-cover-dim" :style="{ background: article.categoryColor || gradient(idx) }">{{ article.category || '推荐文章' }}</view>
+        </view>
+
+        <!-- 文字区 -->
+        <view class="rec-card-body" :class="{ 'rec-card-body-no-cover': !article.coverImage }">
+          <view class="rec-category-row" v-if="!article.coverImage">
+            <text class="rec-category-tag" :style="{ background: article.categoryColor || gradient(idx) }">{{ article.category || '推荐文章' }}</text>
+          </view>
+          <text class="rec-card-title">{{ article.title }}</text>
+          <text class="rec-card-desc" v-if="article.summary">{{ article.summary }}</text>
+          <view class="rec-card-foot">
+            <text class="rec-card-date" v-if="article.date">{{ article.date }}</text>
+            <view class="rec-card-stats">
+              <text class="rec-stat">&#x1F441; {{ article.views || '0' }}</text>
+              <text class="rec-stat">&#x2764; {{ article.likes || '0' }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+var defaultGradients = [
+  'linear-gradient(135deg, #10B981, #34D399)',
+  'linear-gradient(135deg, #059669, #10B981)',
+  'linear-gradient(135deg, #047857, #059669)',
+  'linear-gradient(135deg, #34D399, #6EE7B7)',
+  'linear-gradient(135deg, #10B981, #A7F3D0)'
+]
+
+export default {
+  name: 'ActionArticleRecommend',
+  props: {
+    articles: { type: Array, default: function() { return [] } },
+    isLoggedIn: { type: Boolean, default: false }
+  },
+  computed: {
+    displayArticles: function() {
+      return this.articles && this.articles.length ? this.articles : []
+    }
+  },
+  methods: {
+    gradient: function(idx) {
+      return defaultGradients[idx % defaultGradients.length]
+    }
+  }
+}
+</script>
+
+<style scoped>
+.rec-section {
+  margin: 20rpx 20rpx 12rpx;
+}
+.rec-header {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 16rpx;
+  padding: 0 4rpx;
+}
+.rec-header-left {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.rec-icon {
+  font-size: 34rpx;
+  margin-right: 10rpx;
+}
+.rec-title {
+  font-size: 32rpx;
+  font-weight: 700;
+  color: #065F46;
+  letter-spacing: 1rpx;
+}
+.rec-more {
+  font-size: 24rpx;
+  color: #10B981;
+  font-weight: 500;
+}
+
+/* 空状态 */
+.rec-empty {
+  display: flex;
+  justify-content: center;
+  padding: 60rpx 0;
+}
+.rec-empty-text {
+  font-size: 24rpx;
+  color: #9CA3AF;
+}
+
+/* 卡片列表 */
+.rec-list {
+  display: flex;
+  flex-direction: column;
+}
+.rec-card {
+  background: #FFFFFF;
+  border-radius: 24rpx;
+  overflow: hidden;
+  box-shadow: 0 4rpx 16rpx rgba(16, 185, 129, 0.08);
+  margin-bottom: 20rpx;
+}
+.rec-card:active {
+  opacity: 0.92;
+  transform: scale(0.985);
+}
+
+/* 封面图 */
+.rec-card-cover {
+  position: relative;
+  width: 100%;
+  height: 260rpx;
+  background: #f0f0f0;
+}
+.rec-cover-img {
+  width: 100%;
+  height: 100%;
+}
+.rec-cover-dim {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  padding: 10rpx 20rpx;
+  background: rgba(0,0,0,0.45);
+}
+.rec-cover-dim text {
+  font-size: 20rpx;
+  color: #fff;
+  font-weight: 500;
+}
+
+/* 文字内容区 */
+.rec-card-body {
+  padding: 24rpx 24rpx 20rpx;
+}
+.rec-card-body-no-cover {
+  padding-top: 28rpx;
+}
+.rec-category-row {
+  margin-bottom: 12rpx;
+}
+.rec-category-tag {
+  display: inline-block;
+  font-size: 20rpx;
+  color: #FFFFFF;
+  font-weight: 500;
+  padding: 4rpx 20rpx;
+  border-radius: 20rpx;
+}
+.rec-card-title {
+  font-size: 28rpx;
+  font-weight: 700;
+  color: #1F2937;
+  line-height: 1.45;
+  display: block;
+  margin-bottom: 8rpx;
+}
+.rec-card-desc {
+  font-size: 24rpx;
+  color: #6B7280;
+  line-height: 1.55;
+  display: block;
+  margin-bottom: 16rpx;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+.rec-card-foot {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+.rec-card-date {
+  font-size: 22rpx;
+  color: #9CA3AF;
+}
+.rec-card-stats {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.rec-stat {
+  font-size: 22rpx;
+  color: #9CA3AF;
+  margin-left: 20rpx;
+}
+</style>

+ 8 - 5
cfc-frontend/pages/action/index.vue

@@ -75,8 +75,7 @@
       @moreProducts="goMoreProducts" />
 
     <!-- 推荐阅读 -->
-    <DimensionArticles
-      dimensionCode="action"
+    <ActionArticleRecommend
       :articles="actionArticles"
       :isLoggedIn="isLoggedIn"
       @articleClick="goArticleDetail"
@@ -87,7 +86,8 @@
       :contactList="contactList"
       :healthAlerts="healthAlerts"
       :milestones="milestones"
-      :isLoggedIn="isLoggedIn" />
+      :isLoggedIn="isLoggedIn"
+      @manage="goFamilyMembers" />
 
     <!-- 功能入口(4个:活动、商品、课程) -->
     <view class="func-section" v-if="sectionVisible('func_entries')">
@@ -120,7 +120,7 @@ import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
 import DimensionTasks from '../../components/DimensionTasks.vue'
 import DimensionActivities from '../../components/DimensionActivities.vue'
 import DimensionProducts from '../../components/DimensionProducts.vue'
-import DimensionArticles from '../../components/DimensionArticles.vue'
+import ActionArticleRecommend from '../../components/ActionArticleRecommend.vue'
 import ContactCard from '../../components/ContactCard.vue'
 import ContactImport from '../../components/ContactImport.vue'
 import FamilyRelationshipSection from '../../components/FamilyRelationshipSection.vue'
@@ -129,7 +129,7 @@ import WuxingSandbox from '../../components/wuxing-sandbox.vue'
 import { getVisibleSections, getEnergyOverview, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getContactList, getVisibleFamilyMembers, getFeaturedArticles, getHealthAlerts, getMilestones } from '../../utils/api.js'
 
 export default {
-  components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, ContactCard, ContactImport, FamilyRelationGraph, FamilyRelationshipSection, WuxingSandbox },
+  components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, ActionArticleRecommend, ContactCard, ContactImport, FamilyRelationGraph, FamilyRelationshipSection, WuxingSandbox },
   data() {
     return {
       showTabTransition: true,
@@ -464,6 +464,9 @@ export default {
     goMoreArticles: function() {
       uni.navigateTo({ url: '/pages/article-center/index?dimension=action' })
     },
+    goFamilyMembers: function() {
+      uni.navigateTo({ url: '/pages/profile/family-members' })
+    },
     loadRelationshipHealth: function() {
       var self = this
       getHealthAlerts({}).then(function(res) {

+ 119 - 74
cfc-frontend/pages/body/index.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <view class="body-container">
     <!-- Tabbar 切换过渡页 -->
     <tab-transition v-if="showTabTransition" dimCode="body" />
@@ -37,6 +37,16 @@
       :intimacyMap="intimacyMapForGraph"
       @memberTap="goMemberDetail" />
 
+    <!-- 登录后:用户快捷入口 -->
+    <UserQuickEntry
+      v-if="isLoggedIn"
+      :userName="userName"
+      roleName="家长"
+      :currentChildName="activeChildName"
+      :children="children"
+      @childChanged="onChildChanged"
+      @scrollTo="scrollToSection" />
+
       <!-- 雷达图 -->
       <view class="section" v-if="dimensionData">
         <view class="section-header" v-if="dimensionData.isAverage">
@@ -77,22 +87,67 @@
       </view>
     </view>
 
-    <!-- 快捷操作按钮 -->
-    <view class="section quick-actions" v-if="isLoggedIn">
-      <view class="action-btn" @click="goToHealthReport">
-        <text class="action-icon">📋</text>
-        <text class="action-text">报告详情</text>
+    <!-- 健康报告摘要(登录后可见) -->
+    <view class="section" v-if="sectionVisible('health_report') && isLoggedIn">
+      <view class="section-header">
+        <text class="section-title">健康报告</text>
+        <text class="section-more" @click="goToHealthReport">查看详情 ›</text>
       </view>
-      <view class="action-btn" @click="goToCheckin">
-        <text class="action-icon">🏃</text>
-        <text class="action-text">健康打卡</text>
+      <view class="report-card" v-if="latestReport">
+        <view class="report-type-tag">{{ reportTypeLabel }}</view>
+        <view class="report-score-row">
+          <view class="score-circle">
+            <text class="score-value">{{ latestReport.overallScore || '--' }}</text>
+            <text class="score-label">综合评分</text>
+          </view>
+          <view class="report-meta">
+            <view class="meta-item" v-if="latestReport.gutHealthScore">
+              <text class="meta-label">肠道健康</text>
+              <text class="meta-value">{{ latestReport.gutHealthScore }}</text>
+            </view>
+            <view class="meta-item" v-if="latestReport.nutritionScore">
+              <text class="meta-label">营养状况</text>
+              <text class="meta-value">{{ latestReport.nutritionScore }}</text>
+            </view>
+            <view class="meta-item" v-if="latestReport.gutAge">
+              <text class="meta-label">肠道年龄</text>
+              <text class="meta-value">{{ latestReport.gutAge }}</text>
+            </view>
+          </view>
+        </view>
+        <text class="report-date">报告日期:{{ formatDate(latestReport.reportDate) }}</text>
       </view>
-      <view class="action-btn" @click="goToNutritionProfile">
-        <text class="action-icon">🥗</text>
-        <text class="action-text">营养档案</text>
+      <view class="report-empty" v-else>
+        <text class="empty-tip">暂无健康报告</text>
+        <text class="empty-sub">规划师录入后将自动显示</text>
       </view>
     </view>
 
+    <!-- ===== 精准营养(上传报告+产品+文章) ===== -->
+    <view class="section nutrition-section" v-if="isLoggedIn">
+      <view class="section-header">
+        <text class="section-title">🥗 精准营养</text>
+      </view>
+
+      <!-- 上传报告入口 -->
+      <view class="nutrition-report-card" @click="goToUploadReport">
+        <view class="nutrition-report-left">
+          <text class="nutrition-icon-large">📋</text>
+        </view>
+        <view class="nutrition-report-right">
+          <text class="nutrition-title">上传健康报告</text>
+          <text class="nutrition-desc">上传体检报告或肠道检测报告,AI智能解读分析,获取个性化营养方案</text>
+          <view class="nutrition-report-tags">
+            <text class="tag">体检报告</text>
+            <text class="tag">肠道检测</text>
+            <text class="tag">AI解读</text>
+          </view>
+        </view>
+        <text class="nutrition-arrow">›</text>
+      </view>
+
+      </view>
+
     <!-- 维度任务 -->
     <DimensionTasks
       v-if="isLoggedIn"
@@ -124,6 +179,24 @@
       @articleClick="goArticleDetail"
       @moreArticles="goMoreArticles" />
 
+    <!-- 快捷操作按钮 -->
+    <view class="section quick-actions" v-if="isLoggedIn">
+      <view class="action-btn" @click="goToHealthReport">
+        <text class="action-icon">📋</text>
+        <text class="action-text">报告详情</text>
+      </view>
+      <view class="action-btn" @click="goToCheckin">
+        <text class="action-icon">🏃</text>
+        <text class="action-text">健康打卡</text>
+      </view>
+      <view class="action-btn" @click="goToNutritionProfile">
+        <text class="action-icon">🥗</text>
+        <text class="action-text">营养档案</text>
+      </view>
+    </view>
+
+    
+
     <!-- 底部占位 -->
     <view class="bottom-spacer"></view>
     <AIFloatingAvatar />
@@ -135,6 +208,7 @@ import TabTransition from '../../components/tab-transition.vue'
 import PageBanner from '../../components/PageBanner.vue'
 import LoginGuideCard from '../../components/LoginGuideCard.vue'
 import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
+import UserQuickEntry from '../../components/UserQuickEntry.vue'
 import DimensionTasks from '../../components/DimensionTasks.vue'
 import DimensionActivities from '../../components/DimensionActivities.vue'
 import DimensionProducts from '../../components/DimensionProducts.vue'
@@ -143,7 +217,8 @@ import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
 import RadarChart from '../../components/RadarChart.vue'
 import HealthDimensionsSection from '../../components/HealthDimensionsSection.vue'
 import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
-import { getVisibleSections, getEnergyOverview, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getVisibleFamilyMembers, getDimensionOverview, getFeaturedArticles, getContactList, getHealthAlerts, getMilestones } from '../../utils/api.js'
+
+import { getVisibleSections, getEnergyOverview, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getVisibleFamilyMembers, getDimensionOverview, getFeaturedArticles } from '../../utils/api.js'
 import config from '../../config.js'
 
 var BASE_URL = config.api('')
@@ -174,7 +249,7 @@ const healthRequest = function(url, data) {
 }
 
 export default {
-  components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, FamilyRelationGraph, RadarChart, HealthDimensionsSection, AIFloatingAvatar },
+  components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, UserQuickEntry, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, FamilyRelationGraph, RadarChart, HealthDimensionsSection, AIFloatingAvatar },
   data() {
     return {
       isLoggedIn: false,
@@ -200,12 +275,9 @@ export default {
         { icon: '\u{1F3C3}', label: '运动', needLogin: true, page: '/pages/body/exercise-record' },
         { icon: '\u{1F957}', label: '饮食', needLogin: true, page: '/pages/body/meal-record' },
         { icon: '\u{1F634}', label: '作息', needLogin: true, page: '/pages/body/sleep-record' },
-        { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '/pages/health/meditation-index' }
-      ],
-      contactList: [],
-      healthAlerts: [],
-      milestones: []
-    }
+        { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '/pages/health/meditation-index' },
+        { icon: '\u{1F4CA}', label: '舌诊', needLogin: true, page: '/pages/health/report-upload?reportType=tongue' }
+      }
   },
   computed: {
     reportTypeLabel: function() {
@@ -243,7 +315,6 @@ export default {
     if (this.isLoggedIn) {
       this.loadChildren()
       this.loadFamilyMembersVisible()
-      this.loadRelationshipHealth()
     }
     // 游客也能浏览活动和商品
     this.loadDimensionActivities()
@@ -287,12 +358,14 @@ export default {
               break
             }
           }
-          // FIX: 不再自动选择第一个孩子。仅在用户通过 UserQuickEntry 切换时设置 activeChildId
-          // 默认情况下,页面显示当前登录用户自己的数据(由 API 根据 token 推断)
-          if (found) {
+          if (!found && self.children.length > 0) {
+            self.activeChildId = self.children[0].childId
+            self.activeChildName = self.children[0].name || self.children[0].nickname || '孩子'
+            uni.setStorageSync('currentChildId', self.activeChildId)
+          }
+          if (self.activeChildId) {
             self.loadDashboardData()
           }
-          self.loadContacts()
         }
       }).catch(function(e) {
         console.log('获取孩子列表失败', e)
@@ -392,7 +465,7 @@ export default {
     },
     loadFeaturedArticles: function() {
       var self = this
-      getFeaturedArticles({ size: 5, dimensionCode: 'body' }).then(function(res) {
+      getFeaturedArticles({ size: 5 }).then(function(res) {
         if (res.code === 200 && res.data) {
           var gradientColors = [
             'linear-gradient(135deg, #FF8C42, #FFB074)',
@@ -481,74 +554,46 @@ export default {
         return
       }
       if (item.page === 'health-dimensions') {
-        uni.navigateTo({ url: '/pages/body-detail/health-dimensions?childId=' + (this.activeChildId || '') })
+        if (!this.activeChildId) {
+          uni.showToast({ title: '请先选择孩子', icon: 'none' })
+          return
+        }
+        uni.navigateTo({ url: '/pages/body-detail/health-dimensions?childId=' + this.activeChildId })
         return
       }
       if (item.page) uni.navigateTo({ url: item.page })
     },
     goToHealthReport: function() {
-      var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
+      var id = this.activeChildId || uni.getStorageSync('currentChildId')
+      if (!id) {
+        uni.showToast({ title: '请先选择成员', icon: 'none' })
+        return
+      }
       uni.navigateTo({ url: '/pages/body-detail/health-report?childId=' + id })
     },
     goDimensionDetail: function(dimKey) {
       uni.navigateTo({ url: '/pages/body/dimension-detail?dimension=' + dimKey + '&childId=' + this.activeChildId })
     },
     goToCheckin: function() {
-      var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
+      var id = this.activeChildId || uni.getStorageSync('currentChildId')
+      if (!id) {
+        uni.showToast({ title: '请先选择成员', icon: 'none' })
+        return
+      }
       uni.navigateTo({ url: '/pages/body-detail/checkin?childId=' + id })
     },
     goToNutritionProfile: function() {
-      var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
+      var id = this.activeChildId || uni.getStorageSync('currentChildId')
+      if (!id) {
+        uni.showToast({ title: '请先选择成员', icon: 'none' })
+        return
+      }
       uni.navigateTo({ url: '/pages/health/nutrition-profile?childId=' + id })
     },
     goToUploadReport: function() {
       var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
       uni.navigateTo({ url: '/pages/health/report-upload?childId=' + id + '&from=body' })
     },
-    // ===== 重要关系 =====
-    loadContacts: function() {
-      var self = this
-      getContactList({}).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.contactList = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function(e) {
-        console.log('获取联系人失败', e)
-      })
-    },
-    loadRelationshipHealth: function() {
-      var self = this
-      getHealthAlerts({}).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.healthAlerts = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function() {
-        self.healthAlerts = []
-      })
-      getMilestones({}, 30).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.milestones = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function() {
-        self.milestones = []
-      })
-    },
-    onContactClick: function(item) {
-      uni.navigateTo({ url: '/pages/body-detail/contact-detail?id=' + item.id })
-    },
-    onShowImport: function() {
-      uni.showToast({ title: '导入通讯录', icon: 'none' })
-    },
-    goInteractionLog: function(memberId) {
-      if (memberId) {
-        uni.navigateTo({ url: '/pages/body-detail/interaction-log?memberId=' + memberId })
-      } else {
-        uni.navigateTo({ url: '/pages/body-detail/interaction-log' })
-      }
-    },
-    goRelationshipQuestionnaire: function() {
-      uni.navigateTo({ url: '/pages/body-detail/relationship-questionnaire' })
-    },
     formatDate: function(dateStr) {
       if (!dateStr) return '--'
       try {

+ 4 - 46
cfc-frontend/pages/mind/index.vue

@@ -284,6 +284,8 @@
       </view>
     </view>
 
+    
+
     <!-- 底部占位 -->
     <view class="bottom-spacer"></view>
     <AIFloatingAvatar />
@@ -305,7 +307,7 @@ import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
 
 import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
 import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
-import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones } from '../../utils/api.js'
+import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview } from '../../utils/api.js'
 import config from '../../config.js'
 
 export default {
@@ -375,9 +377,6 @@ export default {
       dimensionTasks: [],
       dimensionActivities: [],
       dimensionProducts: [],
-      contactList: [],
-      healthAlerts: [],
-      milestones: []
     }
   },
   computed: {
@@ -566,9 +565,6 @@ export default {
       this.loadGutData()
       this.loadEnergyData()
       this.loadTraditionalCultureData()
-      this.loadContacts()
-      this.loadHealthAlerts()
-      this.loadMilestones()
     }
     // 游客也能浏览活动和商品
     this.loadDimensionActivities()
@@ -681,7 +677,7 @@ export default {
     },
     loadFeaturedArticles: function() {
       var self = this
-      getFeaturedArticles({ size: 5, dimensionCode: 'mind' }).then(function(res) {
+      getFeaturedArticles({ size: 5 }).then(function(res) {
         if (res.code === 200 && res.data) {
           var gradientColors = [
             'linear-gradient(135deg, #8B5CF6, #A78BFA)',
@@ -906,44 +902,6 @@ export default {
     goAssessment: function() { uni.navigateTo({ url: '/pages/assessment/apply' }) },
     goLogin: function() { uni.navigateTo({ url: '/pages/login/login' }) },
 
-    // ===== 传统文化数据 =====
-    // ===== 联系人 / 关系健康 =====
-    loadContacts: function() {
-      var self = this
-      getContactList({}).then(function(res) {
-        if (res.code === 200) {
-          self.contactList = Array.isArray(res.data) ? res.data : []
-        } else {
-          self.contactList = []
-        }
-      }).catch(function() {
-        self.contactList = []
-      })
-    },
-    loadHealthAlerts: function() {
-      var self = this
-      getHealthAlerts({}).then(function(res) {
-        if (res.code === 200) {
-          self.healthAlerts = Array.isArray(res.data) ? res.data : []
-        } else {
-          self.healthAlerts = []
-        }
-      }).catch(function() {
-        self.healthAlerts = []
-      })
-    },
-    loadMilestones: function() {
-      var self = this
-      getMilestones({}, 30).then(function(res) {
-        if (res.code === 200) {
-          self.milestones = Array.isArray(res.data) ? res.data : []
-        } else {
-          self.milestones = []
-        }
-      }).catch(function() {
-        self.milestones = []
-      })
-    },
     loadTraditionalCultureData: function() {
       var self = this
       var memberId = this.currentChildId

+ 6 - 86
cfc-frontend/pages/wisdom/index.vue

@@ -27,13 +27,12 @@
       :dualDimension="dualDimension" />
 
     <!-- 4. 认知雷达图(登录后) -->
-    <view class="section" v-if="isLoggedIn">
+    <view class="section" v-if="isLoggedIn && cognitiveReport">
       <view class="section-header">
         <text class="section-title">认知雷达</text>
         <text class="section-more" @click="goCognitiveReport">查看详情 ›</text>
       </view>
       <RadarChart
-        v-if="cognitiveReport"
         :dimensions="cognitiveDimensions"
         :scores="cognitiveScores"
         :avg-scores="cognitiveAvgScores"
@@ -41,11 +40,6 @@
         fillColor="#6366F1"
         gridColor="#E0E7FF"
         labelColor="#3730A3" />
-      <view v-else class="no-report-hint" @click="goAssessment">
-        <text class="no-report-icon">📊</text>
-        <text class="no-report-text">完成认知测评后查看六维能力雷达图</text>
-        <text class="no-report-action">点击预约测评 ›</text>
-      </view>
     </view>
 
     <!-- 5. 家庭成员关系图谱(登录后) -->
@@ -145,6 +139,8 @@
       </view>
     </view>
 
+    
+
     <!-- 底部占位 -->
     <view class="bottom-spacer"></view>
     <AIFloatingAvatar />
@@ -164,7 +160,8 @@ import DimensionProducts from '../../components/DimensionProducts.vue'
 import DimensionArticles from '../../components/DimensionArticles.vue'
 import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
 import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
-import { getVisibleSections, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getAssessmentLatestResult, getFeaturedArticles, getContactList, getHealthAlerts, getMilestones } from '../../utils/api.js'
+
+import { getVisibleSections, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getAssessmentLatestResult, getFeaturedArticles } from '../../utils/api.js'
 
 export default {
   components: { TabTransition, PageBanner, LoginGuideCard, RadarChart, FamilyEnergyBar, UserQuickEntry, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, FamilyRelationGraph, AIFloatingAvatar },
@@ -189,9 +186,6 @@ export default {
       wisdomTips: [],
       /** Mock 平均值(6维认知):感知/专注/记忆/逻辑/空间/加工速度 */
       cognitiveAvgScores: [70, 65, 72, 68, 66, 71],
-      contactList: [],
-      healthAlerts: [],
-      milestones: [],
       funcList: [
         { icon: '\u{1F4CA}', label: '认知报告', needLogin: true, page: '/pages/wisdom-detail/cognitive-report' },
         { icon: '\u{270F}\uFE0F', label: '自己出题', needLogin: true, page: '/pages/wisdom-detail/self-quiz' },
@@ -266,7 +260,6 @@ export default {
       this.loadChildren()
       this.loadFamilyMembersVisible()
       this.loadCognitiveReport()
-      this.loadRelationshipHealth()
     }
     this.loadDimensionActivities()
     this.loadDimensionProducts()
@@ -319,7 +312,6 @@ export default {
           // Load cognitive report AFTER activeChildId is confirmed set
           self.loadCognitiveReport()
         }
-        self.loadContacts()
       }).catch(function(e) {})
     },
     loadFamilyMembersVisible: function() {
@@ -336,7 +328,7 @@ export default {
     },
     loadCognitiveReport: function() {
       var self = this
-      var childId = self.activeChildId
+      var childId = this.activeChildId
       if (!childId) return
       getAssessmentLatestResult(childId).then(function(res) {
         if (res.code === 200 && res.data) {
@@ -496,50 +488,6 @@ export default {
       uni.navigateTo({ url: '/pages/mind-detail/article-detail?id=' + (article.id || article) })
     },
 
-    // ===== 重要关系 =====
-    loadContacts: function() {
-      var self = this
-      getContactList({}).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.contactList = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function(e) {
-        console.log('获取联系人失败', e)
-      })
-    },
-    loadRelationshipHealth: function() {
-      var self = this
-      getHealthAlerts({}).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.healthAlerts = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function() {
-        self.healthAlerts = []
-      })
-      getMilestones({}, 30).then(function(res) {
-        if (res.code === 200 && res.data) {
-          self.milestones = Array.isArray(res.data) ? res.data : []
-        }
-      }).catch(function() {
-        self.milestones = []
-      })
-    },
-    onContactClick: function(item) {
-      uni.navigateTo({ url: '/pages/wisdom-detail/contact-detail?id=' + item.id })
-    },
-    onShowImport: function() {
-      uni.showToast({ title: '导入通讯录', icon: 'none' })
-    },
-    goInteractionLog: function(memberId) {
-      if (memberId) {
-        uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log?memberId=' + memberId })
-      } else {
-        uni.navigateTo({ url: '/pages/wisdom-detail/interaction-log' })
-      }
-    },
-    goRelationshipQuestionnaire: function() {
-      uni.navigateTo({ url: '/pages/wisdom-detail/relationship-questionnaire' })
-    },
     _watchPageReady() {
       var self = this
       var unwatch = this.$watch(function() {
@@ -639,34 +587,6 @@ export default {
   color: #999;
 }
 
-/* ===== 认知雷达无数据提示 ===== */
-.no-report-hint {
-  background: #fff;
-  border-radius: 20rpx;
-  padding: 48rpx 30rpx;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
-}
-
-.no-report-icon {
-  font-size: 64rpx;
-  margin-bottom: 16rpx;
-}
-
-.no-report-text {
-  font-size: 26rpx;
-  color: #666;
-  margin-bottom: 20rpx;
-}
-
-.no-report-action {
-  font-size: 24rpx;
-  color: #6366F1;
-  font-weight: 500;
-}
-
 /* ===== 智慧小贴士 ===== */
 .tips-list {
   display: flex;