Quellcode durchsuchen

fix(frontend): 健康报告页修复 - memberId兜底、移除自定义导航、指标状态标签、文案优化

asus vor 1 Monat
Ursprung
Commit
3ce2e77950

+ 0 - 6
cfc-frontend/pages/health/report-confirm.vue

@@ -182,11 +182,6 @@
                 <text class="ind-symptom-label">症状:</text>
                 <input class="ind-symptom-input" v-model="ind.symptoms" />
               </view>
-              <view class="ind-status-row">
-                <view class="status-tag" :class="'status-' + _cssClass(ind.status)">
-                  {{ statusText(ind.status) }}
-                </view>
-              </view>
             </view>
           </view>
         </view>
@@ -1121,7 +1116,6 @@ export default {
   background: #fff;
   border-radius: 6rpx;
 }
-.ind-status-row { margin-top: 8rpx; }
 .status-tag {
   display: inline-block;
   font-size: 20rpx;

+ 9 - 37
cfc-frontend/pages/health/report-list.vue

@@ -1,12 +1,5 @@
 <template>
   <view class="list-container">
-    <!-- 顶部导航 -->
-    <view class="nav-bar">
-      <text class="nav-back" @click="goBack">‹ 返回</text>
-      <text class="nav-title">健康报告</text>
-      <view class="nav-placeholder"></view>
-    </view>
-
     <!-- 加载状态 -->
     <view class="loading-wrap" v-if="loading">
       <text class="loading-text">加载中...</text>
@@ -59,10 +52,18 @@ export default {
     }
   },
   onLoad(options) {
-    this.memberId = options.memberId ? parseInt(options.memberId) : null
+    this.memberId = options.memberId ? parseInt(options.memberId) : this.getMemberId()
     this.loadData()
   },
   methods: {
+    getMemberId: function() {
+      // 优先当前选中的孩子/成员,兜底用登录用户 ID(与 health-main 一致)
+      var store = this.$store
+      if (store && store.state && store.state.currentChildId) return store.state.currentChildId
+      if (store && store.state && store.state.currentMemberId) return store.state.currentMemberId
+      if (store && store.state && store.state.userId) return store.state.userId
+      return uni.getStorageSync('userId') || ''
+    },
     loadData() {
       var self = this
       self.loading = true
@@ -74,9 +75,6 @@ export default {
       }).finally(function() {
         self.loading = false
       })
-    },
-    goBack() {
-      uni.navigateBack()
     },
 	goToDetail(reportId, reportType) {
 		var detailPages = {
@@ -109,32 +107,6 @@ export default {
   background: #F5F7FA;
 }
 
-/* ===== 导航栏 ===== */
-.nav-bar {
-  position: sticky;
-  top: 0;
-  background: #fff;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: space-between;
-  padding: 20rpx 30rpx;
-  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
-  z-index: 100;
-}
-.nav-back {
-  font-size: 32rpx;
-  color: #5B9BD5;
-}
-.nav-title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-}
-.nav-placeholder {
-  width: 80rpx;
-}
-
 /* ===== 加载状态 ===== */
 .loading-wrap {
   display: flex;

+ 1 - 1
cfc-frontend/pages/health/report-upload.vue

@@ -10,7 +10,7 @@
     <!-- 说明提示 -->
     <view class="tip-banner">
       <text class="tip-icon">📋</text>
-      <text class="tip-text">上传体检报告或肠道检测报告,AI 将为您解读并提供个性化营养方案</text>
+      <text class="tip-text">上传体检报告或肠道检测报告,以便为您解读并提供个性化营养方案</text>
     </view>
 
     <!-- PDF解析预览(提取到信息时显示) -->