Просмотр исходного кода

feat(frontend): 心身智三页肠脑轴卡片-情绪/认知指标过滤+身体异常告警

- mind-detail: 情绪与肠胃卡片常驻显示,无报告引导上传,副标题心生身
- wisdom-detail: 新增肠胃与认知卡片,含认知指标(谷氨酸/多巴胺/色氨酸等)+引导上传
- body-detail: 新增指标告警卡片,疾病风险(非低风险)+营养素/氨基酸异常(仅异常项)
- api.js: 新增 getGutCognitionIndicators/getBodyAbnormalIndicators

Ultraworked with [Sisyphus](https://github.com/OhMyOpenCode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
E2E Test Bot 2 месяцев назад
Родитель
Сommit
dda4ce4ae8

+ 149 - 1
cfc-frontend/pages/body-detail/index.vue

@@ -55,6 +55,49 @@
       accent-color="#FF8C42"
       accent-color="#FF8C42"
       :dims="healthSubDims" />
       :dims="healthSubDims" />
 
 
+    <!-- 指标告警:疾病风险+营养/氨基酸异常(仅显示异常项) -->
+    <view class="section alert-card" v-if="isLoggedIn && bodyAbnormalData">
+      <view class="section-header">
+        <text class="section-title">⚠️ 指标告警</text>
+        <text class="section-subtitle">仅显示异常指标</text>
+      </view>
+      <template v-if="!bodyAbnormalData.hasReport">
+        <view class="alert-empty">
+          <text class="alert-empty-text">上传菌群报告后查看异常指标</text>
+          <button class="alert-upload-btn" @click="goToUploadReport">去上传</button>
+        </view>
+      </template>
+      <template v-else>
+        <!-- 疾病风险 -->
+        <view class="alert-group" v-if="bodyAbnormalData.diseaseRisks && bodyAbnormalData.diseaseRisks.length > 0">
+          <text class="alert-group-title">🩺 疾病风险</text>
+          <view class="alert-item" v-for="(risk, idx) in bodyAbnormalData.diseaseRisks" :key="'dr' + idx">
+            <text class="alert-item-name">{{ risk.name }}</text>
+            <text :class="['alert-item-level', 'level-' + (risk.level === '高风险' ? 'high' : 'warn')]">{{ risk.level }}</text>
+          </view>
+        </view>
+        <!-- 主要营养素异常 -->
+        <view class="alert-group" v-if="bodyAbnormalData.nutritionAbnormal && bodyAbnormalData.nutritionAbnormal.length > 0">
+          <text class="alert-group-title">🥗 主要营养素</text>
+          <view class="alert-item" v-for="(item, idx) in bodyAbnormalData.nutritionAbnormal" :key="'nt' + idx">
+            <text class="alert-item-name">{{ item.name }}</text>
+            <text class="alert-item-status">{{ item.status }}</text>
+          </view>
+        </view>
+        <!-- 氨基酸异常 -->
+        <view class="alert-group" v-if="bodyAbnormalData.aminoAcidAbnormal && bodyAbnormalData.aminoAcidAbnormal.length > 0">
+          <text class="alert-group-title">🧬 氨基酸</text>
+          <view class="alert-item" v-for="(item, idx) in bodyAbnormalData.aminoAcidAbnormal" :key="'aa' + idx">
+            <text class="alert-item-name">{{ item.name }}</text>
+            <text class="alert-item-status">{{ item.status }}</text>
+          </view>
+        </view>
+        <view class="alert-no-data" v-if="(!bodyAbnormalData.diseaseRisks || bodyAbnormalData.diseaseRisks.length === 0) && (!bodyAbnormalData.nutritionAbnormal || bodyAbnormalData.nutritionAbnormal.length === 0) && (!bodyAbnormalData.aminoAcidAbnormal || bodyAbnormalData.aminoAcidAbnormal.length === 0)">
+          <text class="alert-no-data-text">暂无异常指标,保持健康状态</text>
+        </view>
+      </template>
+    </view>
+
     <!-- 功能入口 -->
     <!-- 功能入口 -->
     <view class="func-section" v-if="sectionVisible('func_entries')">
     <view class="func-section" v-if="sectionVisible('func_entries')">
       <view class="func-grid">
       <view class="func-grid">
@@ -109,7 +152,7 @@ import DimensionSubDims from '../../components/DimensionSubDims.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
 import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
-import { getVisibleSections, getEnergyOverview, getChildren, getFamilyEnergySandbox, getEnergySandbox, getFamilyMemberList, getDimensionOverview } from '../../utils/api.js'
+import { getVisibleSections, getEnergyOverview, getChildren, getFamilyEnergySandbox, getEnergySandbox, getFamilyMemberList, getDimensionOverview, getBodyAbnormalIndicators } from '../../utils/api.js'
 
 
 export default {
 export default {
   components: { TabTransition, FamilyEnergyBar, RadarChart, DimensionSubDims, FloatingAvatar, FamilyMemberStrip, DimensionIntroCard },
   components: { TabTransition, FamilyEnergyBar, RadarChart, DimensionSubDims, FloatingAvatar, FamilyMemberStrip, DimensionIntroCard },
@@ -133,6 +176,7 @@ export default {
       dualDimension: null,
       dualDimension: null,
       visibleSections: [],
       visibleSections: [],
       dimensionData: null,
       dimensionData: null,
+      bodyAbnormalData: null,
       /** Mock 平均值(7维):生长发育/睡眠质量/视力健康/免疫力/营养均衡/肠胃健康/运动活力 */
       /** Mock 平均值(7维):生长发育/睡眠质量/视力健康/免疫力/营养均衡/肠胃健康/运动活力 */
       radarAvgScores: [72, 68, 75, 70, 73, 69, 71],
       radarAvgScores: [72, 68, 75, 70, 73, 69, 71],
       funcList: [
       funcList: [
@@ -217,6 +261,7 @@ export default {
     if (this.isLoggedIn) {
     if (this.isLoggedIn) {
       this.loadChildren()
       this.loadChildren()
       this.loadFamilyMembersVisible()
       this.loadFamilyMembersVisible()
+      this.loadBodyAbnormalData()
     }
     }
     // 游客也能浏览活动和商品
     // 游客也能浏览活动和商品
     // 游客也能浏览文章
     // 游客也能浏览文章
@@ -408,6 +453,20 @@ export default {
       var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
       var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
       uni.navigateTo({ url: '/pages/health/report-upload?memberId=' + id + '&from=body' })
       uni.navigateTo({ url: '/pages/health/report-upload?memberId=' + id + '&from=body' })
     },
     },
+    loadBodyAbnormalData: function() {
+      var self = this
+      var memberId = self.activeChildId || uni.getStorageSync('currentChildId') || ''
+      if (!memberId) return
+      getBodyAbnormalIndicators(memberId).then(function(res) {
+        if (res.code === 200 && res.data) {
+          self.bodyAbnormalData = res.data
+        } else {
+          self.bodyAbnormalData = null
+        }
+      }).catch(function() {
+        self.bodyAbnormalData = null
+      })
+    },
     _watchPageReady() {
     _watchPageReady() {
       var self = this
       var self = this
       var unwatch = this.$watch(function() {
       var unwatch = this.$watch(function() {
@@ -857,4 +916,93 @@ export default {
   color: #9A3412;
   color: #9A3412;
   font-weight: 500;
   font-weight: 500;
 }
 }
+
+/* ===== 指标告警卡片 ===== */
+.alert-card {
+  background: #fff;
+  border-radius: 20rpx;
+  padding: 24rpx;
+  margin: 16rpx 24rpx;
+  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
+}
+.section-subtitle {
+  font-size: 22rpx;
+  color: #999;
+  margin-left: 12rpx;
+}
+.alert-group {
+  margin-bottom: 16rpx;
+}
+.alert-group-title {
+  font-size: 26rpx;
+  font-weight: 600;
+  color: #333;
+  margin-bottom: 10rpx;
+  display: block;
+}
+.alert-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 10rpx 0;
+  border-bottom: 1rpx solid #f5f5f5;
+}
+.alert-item:last-child {
+  border-bottom: none;
+}
+.alert-item-name {
+  font-size: 24rpx;
+  color: #555;
+}
+.alert-item-level {
+  font-size: 22rpx;
+  padding: 4rpx 16rpx;
+  border-radius: 8rpx;
+  font-weight: 500;
+}
+.alert-item-level.level-high {
+  background: #FEE2E2;
+  color: #DC2626;
+}
+.alert-item-level.level-warn {
+  background: #FEF3C7;
+  color: #D97706;
+}
+.alert-item-status {
+  font-size: 22rpx;
+  padding: 4rpx 16rpx;
+  border-radius: 8rpx;
+  background: #FEE2E2;
+  color: #DC2626;
+}
+.alert-empty {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 30rpx 0;
+}
+.alert-empty-text {
+  font-size: 24rpx;
+  color: #999;
+  margin-bottom: 20rpx;
+}
+.alert-upload-btn {
+  background: linear-gradient(135deg, #FF8C42, #FFA366);
+  color: #fff;
+  font-size: 26rpx;
+  font-weight: 600;
+  border: none;
+  border-radius: 40rpx;
+  padding: 14rpx 60rpx;
+  line-height: 1.6;
+  margin: 0;
+}
+.alert-no-data {
+  text-align: center;
+  padding: 30rpx 0;
+}
+.alert-no-data-text {
+  font-size: 24rpx;
+  color: #999;
+}
 </style>
 </style>

+ 69 - 27
cfc-frontend/pages/mind-detail/index.vue

@@ -78,25 +78,33 @@
           </view>
           </view>
         </view>
         </view>
 
 
-        <!-- 肠脑轴情绪卡片 -->
-        <view class="section" v-if="gutIndicators && gutIndicators.length > 0">
+        <!-- 肠脑轴情绪卡片(有菌群报告显示指标,无报告引导上传) -->
+        <view class="section gut-card" v-if="isLoggedIn">
           <view class="section-header">
           <view class="section-header">
             <text class="section-title">🌱 情绪与肠胃</text>
             <text class="section-title">🌱 情绪与肠胃</text>
           </view>
           </view>
-          <view class="gut-insight-text" v-if="gutInsight">
-            <text>{{ gutInsight }}</text>
-          </view>
-          <view class="gut-indicator-list">
-            <view class="gut-indicator-item" v-for="ind in gutIndicators" :key="ind.id">
-              <view class="gut-indicator-left">
-                <text class="gut-indicator-name">{{ ind.indicatorName || ind.name }}</text>
-              </view>
-              <view class="gut-indicator-bar-track">
-                <view class="gut-indicator-bar-fill" :style="{ width: (ind.value || 0) + '%', background: indicatorColor(ind.status) }"></view>
+          <text class="gut-card-subtitle">心生身 · 情绪状态,透过肠道菌群看见</text>
+          <template v-if="gutIndicators && gutIndicators.length > 0">
+            <view class="gut-insight-text" v-if="gutInsight">
+              <text>{{ gutInsight }}</text>
+            </view>
+            <view class="gut-indicator-list">
+              <view class="gut-indicator-item" v-for="ind in gutIndicators" :key="ind.id">
+                <view class="gut-indicator-left">
+                  <text class="gut-indicator-name">{{ ind.indicatorName || ind.name }}</text>
+                </view>
+                <view class="gut-indicator-bar-track">
+                  <view class="gut-indicator-bar-fill" :style="{ width: (ind.value || 0) + '%', background: indicatorColor(ind.status) }"></view>
+                </view>
+                <text class="gut-indicator-value">{{ ind.value }}{{ ind.unit || '%' }}</text>
+                <text :class="['gut-indicator-status', 'status-' + (ind.status || 'normal')]">{{ statusLabel(ind.status) }}</text>
               </view>
               </view>
-              <text class="gut-indicator-value">{{ ind.value }}{{ ind.unit || '%' }}</text>
-              <text :class="['gut-indicator-status', 'status-' + (ind.status || 'normal')]">{{ statusLabel(ind.status) }}</text>
             </view>
             </view>
+          </template>
+          <view class="gut-empty" v-else>
+            <text class="gut-empty-icon">📄</text>
+            <text class="gut-empty-text">上传菌群报告,查看情绪相关指标</text>
+            <button class="gut-upload-btn" @click="goReportUpload">去上传</button>
           </view>
           </view>
         </view>
         </view>
 
 
@@ -166,7 +174,7 @@ import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
 import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
-import { getVisibleSections, getEmiReport, getFamilyEnergySandbox, getEnergySandbox, getChildren, getFamilyMemberList, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
+import { getVisibleSections, getEmiReport, getFamilyEnergySandbox, getEnergySandbox, getChildren, getFamilyMemberList, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune, getEmotionIndicators } from '../../utils/api.js'
 import nav from '../../utils/nav.js'
 import nav from '../../utils/nav.js'
 import config from '../../config.js'
 import config from '../../config.js'
 import { parseDate } from '../../utils/format.js'
 import { parseDate } from '../../utils/format.js'
@@ -625,20 +633,17 @@ var descList = descMap[this.dominantElement] || descMap.wood
       var memberId = self.currentChildId
       var memberId = self.currentChildId
       if (!memberId) return
       if (!memberId) return
       var token = uni.getStorageSync('token')
       var token = uni.getStorageSync('token')
-      // 获取神经递质指标
-      uni.request({
-        url: config.API_BASE_URL + '/api/mind/neurotransmitters',
-        method: 'POST',
-        header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
-        data: { memberId: memberId },
-        success: function(r) {
-          if (r.statusCode === 200 && r.data && r.data.code === 200) {
-            var list = r.data.data
-            if (Array.isArray(list) && list.length > 0) {
-              self.gutIndicators = list.slice(0, 4)
-            }
+      getEmotionIndicators(memberId).then(function(res) {
+        if (res.code === 200 && res.data) {
+          var list = res.data
+          if (Array.isArray(list) && list.length > 0) {
+            self.gutIndicators = list.slice(0, 6)
+          } else {
+            self.gutIndicators = []
           }
           }
         }
         }
+      }).catch(function() {
+        self.gutIndicators = []
       })
       })
       // 获取情绪洞察摘要
       // 获取情绪洞察摘要
       uni.request({
       uni.request({
@@ -906,6 +911,9 @@ var descList = descMap[this.dominantElement] || descMap.wood
     goDanUpload: function(dimension) {
     goDanUpload: function(dimension) {
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
     },
     },
+    goReportUpload: function() {
+      uni.navigateTo({ url: '/pages/health/report-upload' })
+    },
     viewDanReport: function(report) {
     viewDanReport: function(report) {
       var reportId = report.sourceReportId || report.id
       var reportId = report.sourceReportId || report.id
       uni.navigateTo({ url: '/pages/health/report-detail?reportType=dan&reportId=' + reportId })
       uni.navigateTo({ url: '/pages/health/report-detail?reportType=dan&reportId=' + reportId })
@@ -1955,6 +1963,40 @@ var descList = descMap[this.dominantElement] || descMap.wood
   color: #D97706;
   color: #D97706;
 }
 }
 
 
+/* ===== 肠脑轴卡片 - 新生身副标题/空态引导 ===== */
+.gut-card-subtitle {
+  font-size: 24rpx;
+  color: #FF6B9D;
+  margin-bottom: 16rpx;
+  display: block;
+}
+.gut-empty {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 40rpx 0;
+}
+.gut-empty-icon {
+  font-size: 56rpx;
+  margin-bottom: 16rpx;
+}
+.gut-empty-text {
+  font-size: 26rpx;
+  color: #999;
+  margin-bottom: 24rpx;
+}
+.gut-upload-btn {
+  background: linear-gradient(135deg, #FF6B9D, #FF9EC4);
+  color: #fff;
+  font-size: 26rpx;
+  font-weight: 600;
+  border: none;
+  border-radius: 40rpx;
+  padding: 16rpx 64rpx;
+  line-height: 1.6;
+  margin: 0;
+}
+
 /* ===== 关键信息(家庭+个人) ===== */
 /* ===== 关键信息(家庭+个人) ===== */
 .key-info-card {
 .key-info-card {
   background: #fff;
   background: #fff;

+ 151 - 1
cfc-frontend/pages/wisdom-detail/index.vue

@@ -83,6 +83,33 @@
       </view>
       </view>
     </view>
     </view>
 
 
+    <!-- 肠胃与认知卡片(有菌群报告显示认知指标,无报告引导上传) -->
+    <view class="section gut-cognition-card" v-if="isLoggedIn">
+      <view class="section-header">
+        <text class="section-title">🦠 肠胃与认知</text>
+      </view>
+      <text class="gut-cog-subtitle">肠脑轴 · 肠道菌群,影响学习与思维</text>
+      <template v-if="cognitionGutIndicators && cognitionGutIndicators.length > 0">
+        <view class="gut-indicator-list">
+          <view class="gut-indicator-item" v-for="ind in cognitionGutIndicators" :key="ind.id">
+            <view class="gut-indicator-left">
+              <text class="gut-indicator-name">{{ ind.indicatorName || ind.name }}</text>
+            </view>
+            <view class="gut-indicator-bar-track">
+              <view class="gut-indicator-bar-fill" :style="{ width: (ind.value || 0) + '%', background: indicatorColor(ind.status) }"></view>
+            </view>
+            <text class="gut-indicator-value">{{ ind.value }}{{ ind.unit || '%' }}</text>
+            <text :class="['gut-indicator-status', 'status-' + (ind.status || 'normal')]">{{ statusLabel(ind.status) }}</text>
+          </view>
+        </view>
+      </template>
+      <view class="gut-empty" v-else>
+        <text class="gut-empty-icon">📄</text>
+        <text class="gut-empty-text">上传菌群报告,查看认知相关指标</text>
+        <button class="gut-upload-btn" @click="goReportUpload">去上传</button>
+      </view>
+    </view>
+
     <!-- 6. 功能入口 -->
     <!-- 6. 功能入口 -->
     <view class="func-section" v-if="sectionVisible('func_entries')">
     <view class="func-section" v-if="sectionVisible('func_entries')">
       <view class="func-grid">
       <view class="func-grid">
@@ -133,7 +160,7 @@ import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
 import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
 import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
 import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
-import { getVisibleSections, getChildren, getFamilyEnergySandbox, getEnergySandbox, getAssessmentLatestResult, getDanReportByChild } from '../../utils/api.js'
+import { getVisibleSections, getChildren, getFamilyEnergySandbox, getEnergySandbox, getAssessmentLatestResult, getDanReportByChild, getGutCognitionIndicators } from '../../utils/api.js'
 import { parseDate } from '../../utils/format.js'
 import { parseDate } from '../../utils/format.js'
 
 
 export default {
 export default {
@@ -159,6 +186,7 @@ export default {
       /** Mock 平均值(7维认知):感知/专注/记忆/逻辑/空间/加工速度/成长型思维 */
       /** Mock 平均值(7维认知):感知/专注/记忆/逻辑/空间/加工速度/成长型思维 */
       cognitiveAvgScores: [70, 65, 72, 68, 66, 71, 70],
       cognitiveAvgScores: [70, 65, 72, 68, 66, 71, 70],
       danReports: [],
       danReports: [],
+      cognitionGutIndicators: [],
       funcList: [
       funcList: [
         { icon: '\u{1F4CA}', label: '认知报告', needLogin: true, page: '/pages/wisdom-detail/cognitive-report' },
         { icon: '\u{1F4CA}', label: '认知报告', needLogin: true, page: '/pages/wisdom-detail/cognitive-report' },
         { icon: '\u{1F9E0}', label: '训练中心', needLogin: true, page: '/pages/wisdom-detail/training-hub' },
         { icon: '\u{1F9E0}', label: '训练中心', needLogin: true, page: '/pages/wisdom-detail/training-hub' },
@@ -252,6 +280,7 @@ export default {
       this.loadFamilyMembersVisible()
       this.loadFamilyMembersVisible()
       this.loadCognitiveReport()
       this.loadCognitiveReport()
       this.loadDanReports()
       this.loadDanReports()
+      this.loadGutCognitionData()
     }
     }
     // 游客也能浏览文章
     // 游客也能浏览文章
     this._watchPageReady()
     this._watchPageReady()
@@ -396,6 +425,38 @@ export default {
         }
         }
       }).catch(function() {})
       }).catch(function() {})
     },
     },
+    // ===== 肠胃与认知(肠脑轴认知指标) =====
+    loadGutCognitionData: function() {
+      var self = this
+      var memberId = self.activeChildId
+      if (!memberId) return
+      getGutCognitionIndicators(memberId).then(function(res) {
+        if (res.code === 200 && res.data) {
+          var list = res.data
+          self.cognitionGutIndicators = Array.isArray(list) ? list.slice(0, 6) : []
+        } else {
+          self.cognitionGutIndicators = []
+        }
+      }).catch(function() {
+        self.cognitionGutIndicators = []
+      })
+    },
+    indicatorColor: function(status) {
+      if (status === 'abnormal' || status === '偏高' || status === '偏低' || status === '过高' || status === '缺乏') return '#EF4444'
+      if (status === 'warning' || status === '注意' || status === '不足') return '#F59E0B'
+      return '#10B981'
+    },
+    statusLabel: function(status) {
+      if (status === 'normal') return '正常'
+      if (status === 'abnormal') return '异常'
+      if (status === 'warning') return '警讯'
+      if (status === '过高' || status === '过多') return '偏高'
+      if (status === '缺乏' || status === '不足') return '偏低'
+      return status || '正常'
+    },
+    goReportUpload: function() {
+      uni.navigateTo({ url: '/pages/health/report-upload' })
+    },
     goDanUpload: function() {
     goDanUpload: function() {
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
       uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
     },
     },
@@ -724,4 +785,93 @@ export default {
   color: #3730A3;
   color: #3730A3;
   font-weight: 500;
   font-weight: 500;
 }
 }
+
+/* ===== 肠胃与认知卡片 ===== */
+.gut-cog-subtitle {
+  font-size: 24rpx;
+  color: #6366F1;
+  margin-bottom: 16rpx;
+  display: block;
+}
+.gut-indicator-list {
+  display: flex;
+  flex-direction: column;
+  gap: 12rpx;
+}
+.gut-indicator-item {
+  display: flex;
+  align-items: center;
+  gap: 12rpx;
+}
+.gut-indicator-left {
+  width: 80rpx;
+  flex-shrink: 0;
+}
+.gut-indicator-name {
+  font-size: 22rpx;
+  color: #666;
+}
+.gut-indicator-bar-track {
+  flex: 1;
+  height: 16rpx;
+  background: #F0F0F0;
+  border-radius: 8rpx;
+  overflow: hidden;
+}
+.gut-indicator-bar-fill {
+  height: 100%;
+  border-radius: 8rpx;
+  transition: width 0.3s;
+}
+.gut-indicator-value {
+  font-size: 22rpx;
+  color: #666;
+  width: 60rpx;
+  text-align: right;
+}
+.gut-indicator-status {
+  font-size: 20rpx;
+  padding: 2rpx 12rpx;
+  border-radius: 10rpx;
+  width: 60rpx;
+  text-align: center;
+}
+.status-normal {
+  background: #D1FAE5;
+  color: #059669;
+}
+.status-abnormal {
+  background: #FEE2E2;
+  color: #DC2626;
+}
+.status-warning {
+  background: #FEF3C7;
+  color: #D97706;
+}
+.gut-empty {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 40rpx 0;
+}
+.gut-empty-icon {
+  font-size: 56rpx;
+  margin-bottom: 16rpx;
+}
+.gut-empty-text {
+  font-size: 26rpx;
+  color: #999;
+  margin-bottom: 24rpx;
+}
+.gut-upload-btn {
+  background: linear-gradient(135deg, #6366F1, #818CF8);
+  color: #fff;
+  font-size: 26rpx;
+  font-weight: 600;
+  border: none;
+  border-radius: 40rpx;
+  padding: 16rpx 64rpx;
+  line-height: 1.6;
+  margin: 0;
+}
 </style>
 </style>

+ 8 - 0
cfc-frontend/utils/api.js

@@ -1783,6 +1783,14 @@ export const getExerciseList = (data) => request('/api/health/exercise/list', 'P
 export const getMindCheckinList = (data) => request('/api/mind/checkin/list', 'POST', data)
 export const getMindCheckinList = (data) => request('/api/mind/checkin/list', 'POST', data)
 export const getHealthMealList = (data) => request('/api/health/meal/list', 'POST', data)
 export const getHealthMealList = (data) => request('/api/health/meal/list', 'POST', data)
 
 
+// ===== 菌群报告 · 肠脑轴 =====
+// 心页面"情绪与肠胃":只返回与情绪状态直接相关的菌群报告指标
+export const getEmotionIndicators = (memberId) => request('/api/mind/neurotransmitters', 'POST', { memberId })
+// 智页面"肠胃与认知":返回与认知/智力相关的菌群报告指标
+export const getGutCognitionIndicators = (memberId) => request('/api/wisdom/gut-cognition', 'POST', { memberId })
+// 身体页面"指标告警":疾病风险(非低风险) + 营养/氨基酸异常指标
+export const getBodyAbnormalIndicators = (memberId) => request('/api/health/report/body-abnormal', 'POST', { memberId })
+
 // ===== 定期调研 =====
 // ===== 定期调研 =====
 export const getSurveyStatus = (data) => request('/api/survey/status', 'POST', data)
 export const getSurveyStatus = (data) => request('/api/survey/status', 'POST', data)
 export const getActiveTemplates = () => request('/api/survey/template/active', 'POST', {})
 export const getActiveTemplates = () => request('/api/survey/template/active', 'POST', {})