Kaynağa Gözat

refactor(body): merge health actions into quick-action bar, remove separate report/nutrition sections

User 2 ay önce
ebeveyn
işleme
6b48636a12
1 değiştirilmiş dosya ile 14 ekleme ve 71 silme
  1. 14 71
      cfc-frontend/pages/body/index.vue

+ 14 - 71
cfc-frontend/pages/body/index.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <view class="body-container">
     <!-- Tabbar 切换过渡页 -->
     <tab-transition v-if="showTabTransition" dimCode="body" />
@@ -75,69 +75,25 @@
           <text class="func-label">{{ item.label }}</text>
         </view>
       </view>
+</view>
     </view>
 
-    <!-- 健康报告摘要(登录后可见) -->
-    <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 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="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 class="action-btn" @click="goToCheckin">
+        <text class="action-icon">🏃</text>
+        <text class="action-text">健康打卡</text>
       </view>
-      <view class="report-empty" v-else>
-        <text class="empty-tip">暂无健康报告</text>
-        <text class="empty-sub">规划师录入后将自动显示</text>
+      <view class="action-btn" @click="goToNutritionProfile">
+        <text class="action-icon">🥗</text>
+        <text class="action-text">营养档案</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"
@@ -170,20 +126,7 @@
       @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>
+    
 
     <!-- ===== 重要关系维护 + 关系健康概览 ===== -->
     <FamilyRelationshipSection