Bladeren bron

fix(frontend): 健康页推荐阅读增加更多入口,修复字段风险详情溢出

- health-main 推荐阅读区块增加'更多'入口跳转文章中心
- parent-index 推荐阅读区块增加'更多'入口
- gut-flora-risks-detail 增加 content-inner 包裹修复 scroll-view 内容溢出
- growth-main 饮食推荐入口回归 /pages/diet/index
liaoxg 1 week geleden
bovenliggende
commit
8c557b32ec

+ 2 - 2
cfc-frontend/pages/growth-main/index.vue

@@ -315,8 +315,8 @@ export default {
       uni.navigateTo({ url: '/pages/growth/caution-detail' + (mid ? '?memberId=' + mid : '') })
     },
     goToFoods: function() {
-      var mid = uni.getStorageSync('currentChildId') || uni.getStorageSync('currentMemberId') || ''
-      uni.navigateTo({ url: '/pages/health/gut-flora-foods-detail' + (mid ? '?memberId=' + mid : '') })
+      // 饮食推荐入口回归原有饮食首页(今日共餐/菜篮/食谱推荐/共餐配置)
+      uni.navigateTo({ url: '/pages/diet/index' })
     },
     goToArticle: function(article) { var id = article && article.id ? article.id : article; if (!id) return; uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id }) },
     goToProduct: function(prod) { var id = prod && prod.id ? prod.id : prod; if (!id) return; uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + id }) },

+ 8 - 1
cfc-frontend/pages/health-main/index.vue

@@ -221,7 +221,14 @@
         </view>
       </view>
 
-      <ArticleBookshelf :articles="healthArticles" :isLoggedIn="true" @articleClick="goArticleDetail" @moreArticles="goMoreArticles" />
+      <!-- 推荐阅读 -->
+      <view class="section" v-if="healthArticles.length > 0">
+        <view class="section-header">
+          <text class="section-title">📖 推荐阅读</text>
+          <text class="section-more" @click="goMoreArticles">更多 ›</text>
+        </view>
+        <ArticleBookshelf :articles="healthArticles" :isLoggedIn="true" @articleClick="goArticleDetail" />
+      </view>
     </block>
   </view>
 </template>

+ 4 - 1
cfc-frontend/pages/health/gut-flora-risks-detail.vue

@@ -19,6 +19,7 @@
     </view>
 
     <scroll-view class="content" scroll-y>
+      <view class="content-inner">
       <!-- 重要风险 -->
       <view class="section-header" v-if="importantRisks.length > 0">
         <view class="section-line"></view>
@@ -97,6 +98,7 @@
 
       <view class="empty-hint" v-if="risks.length === 0">暂无疾病风险评估</view>
       <view class="bottom-spacer"></view>
+      </view>
     </scroll-view>
 
     <!-- 疾病知识库弹窗 -->
@@ -319,7 +321,8 @@ export default {
   margin-top: 6rpx;
 }
 
-.content { padding: 0 24rpx; height: calc(100vh - 200rpx); }
+.content { height: calc(100vh - 200rpx); }
+.content-inner { padding: 0 24rpx; }
 
 /* ===== 区块标题 ===== */
 .section-header {

+ 15 - 7
cfc-frontend/pages/home-pages/parent-index.vue

@@ -387,13 +387,18 @@
       </view>
 
       <!-- ===== 推荐阅读(书册风格) ===== -->
-      <ArticleBookshelf
-        :articles="indexArticles"
-        :loading="articlesLoading"
-        :isLoggedIn="isLoggedIn"
-        @articleClick="goArticleDetail"
-        @moreArticles="goArticles"
-      />
+      <view class="article-section animate-fade-in animate-stagger-11">
+        <view class="article-header">
+          <view class="section-title">📖 推荐阅读</view>
+          <text class="article-more" @click="goArticles">更多 ›</text>
+        </view>
+        <ArticleBookshelf
+          :articles="indexArticles"
+          :loading="articlesLoading"
+          :isLoggedIn="isLoggedIn"
+          @articleClick="goArticleDetail"
+        />
+      </view>
 
       <!-- ===== h) 待审核任务 ===== -->
       <view class="review-section animate-fade-in animate-stagger-11" v-if="pendingReviewTasks.length > 0">
@@ -1810,6 +1815,9 @@ export default {
   align-items: center;
   margin-bottom: var(--space-md);
 }
+.article-header .section-title {
+  margin-bottom: 0;
+}
 .article-more {
   font-size: 26rpx;
   color: var(--color-primary, #F97316);