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

feat(ui): S-cfc-513 home page beauty tuning 5-6-7-8

5) growth-main: move recommended-reading block before energy sandbox (order only)
6) wealth: pass currentMemberId (family_members.id) instead of userId in loadEnergyData,
   fixing /api/energy/overview SC-X-19 family-isolation 403 (frontend-only fix)
7) diet/recommendation: horizontal overflow guard with ellipsis/max-width/word-break
8) index-home: converge hero-cta-btn to 300x64rpx/22rpx/14rpx (keep heroPulse+brand color), guest-cta-btn likewise
E2E Test Bot 5 часов назад
Родитель
Сommit
1db0b6b5ec

+ 13 - 3
cfc-frontend/pages/diet/recommendation.vue

@@ -1307,8 +1307,8 @@ export default {
   justify-content: space-between;
   margin-bottom: 12rpx;
 }
-.dish-name { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-strong; }
-.dish-cal { font-size: calc(24rpx * var(--font-scale, 1)); color: $brand-primary-deep; font-weight: 600; }
+.dish-name { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-strong; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
+.dish-cal { font-size: calc(24rpx * var(--font-scale, 1)); color: $brand-primary-deep; font-weight: 600; flex-shrink: 0; margin-left: 12rpx; }
 .dish-ingredients {
   display: flex;
   flex-wrap: wrap;
@@ -1321,6 +1321,9 @@ export default {
   border-radius: 24rpx;
   font-size: calc(22rpx * var(--font-scale, 1));
   color: $facade-text-body;
+  max-width: 100%;
+  box-sizing: border-box;
+  word-break: break-word;
 }
 .dish-method {
   margin-bottom: 16rpx;
@@ -1381,7 +1384,7 @@ export default {
   text-align: center;
 }
 .nutrition-card .card-body { background: $flat-bg; border-radius: 0 0 24rpx 24rpx; }
-.nutrition-value { font-size: calc(40rpx * var(--font-scale, 1)); font-weight: 700; color: $brand-primary-deep; display: block; }
+.nutrition-value { font-size: calc(40rpx * var(--font-scale, 1)); font-weight: 700; color: $brand-primary-deep; display: block; word-break: break-word; }
 .nutrition-unit {
   font-size: calc(22rpx * var(--font-scale, 1));
   color: $facade-text-muted;
@@ -1570,6 +1573,7 @@ export default {
   margin-bottom: 16rpx;
   padding-bottom: 16rpx;
   border-bottom: 1rpx solid $facade-fill;
+  word-break: break-word;
 }
 .overview-item {
   padding: 16rpx 0;
@@ -1603,6 +1607,9 @@ export default {
   padding: 4rpx 12rpx;
   border-radius: 16rpx;
   background: $facade-fill-2;
+  max-width: 100%;
+  box-sizing: border-box;
+  word-break: break-word;
 }
 .score-green {
   color: $status-success;
@@ -1796,6 +1803,7 @@ export default {
   font-size: calc(22rpx * var(--font-scale, 1));
   line-height: 1.5;
   color: $mat-red;
+  word-break: break-word;
 }
 
 /* CR-08 第2条:食谱菜卡加工建议 / 配伍避让提示 */
@@ -1807,11 +1815,13 @@ export default {
   font-size: calc(22rpx * var(--font-scale, 1));
   line-height: 1.5;
   color: $status-warning;
+  word-break: break-word;
 }
 .pairing-hint-text {
   font-size: calc(22rpx * var(--font-scale, 1));
   line-height: 1.5;
   color: $status-danger;
+  word-break: break-word;
 }
 
 /* CR-08 第3条:家庭总览调整标记 */

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

@@ -161,6 +161,18 @@
         </view>
       </view>
 
+      <!-- 推荐阅读(2 条预览)· S-cfc-513:移至能量沙盘之前,提升内容曝光 -->
+      <view class="section" v-if="recommendArticles.length > 0">
+        <view class="section-header">
+          <view class="section-header-title">
+            <view class="gi-book"></view>
+            <text class="section-title">推荐阅读</text>
+          </view>
+          <text class="section-more" @click="goMoreArticles">更多 ›</text>
+        </view>
+        <ArticleFeed :articles="recommendArticles" @articleClick="goToArticle" />
+      </view>
+
       <!-- 能量沙盘(2026-12-05 廖总:原首页沙盘迁入本页) -->
       <view class="section">
         <view class="section-header">
@@ -188,18 +200,6 @@
           starHeight="340rpx" />
       </view>
 
-      <!-- 推荐阅读(2 条预览) -->
-      <view class="section" v-if="recommendArticles.length > 0">
-        <view class="section-header">
-          <view class="section-header-title">
-            <view class="gi-book"></view>
-            <text class="section-title">推荐阅读</text>
-          </view>
-          <text class="section-more" @click="goMoreArticles">更多 ›</text>
-        </view>
-        <ArticleFeed :articles="recommendArticles" @articleClick="goToArticle" />
-      </view>
-
       <view class="bottom-spacer" style="height: 40rpx;"></view>
     </view>
   </view>

+ 10 - 10
cfc-frontend/pages/index-home/index.vue

@@ -2155,15 +2155,15 @@ $c-violet-mid:    $violet-700;
 .hero-cta-btn {
   margin: 28rpx auto 0;
   display: block;
-  width: 420rpx;
-  min-height: 88rpx;
-  height: 88rpx;
-  line-height: 88rpx;
+  width: 300rpx;
+  min-height: 64rpx;
+  height: 64rpx;
+  line-height: 64rpx;
   background: $brand-primary;
   color: $app-surface;
-  font-size: calc(28rpx * var(--font-scale, 1));
+  font-size: calc(22rpx * var(--font-scale, 1));
   font-weight: bold;
-  border-radius: 24rpx;
+  border-radius: 14rpx;
   text-align: center;
   border: none;
   box-shadow: 0 8rpx 20rpx rgba($brand-primary, 0.3);
@@ -2307,13 +2307,13 @@ $c-violet-mid:    $violet-700;
 }
 .guest-cta-btn {
   margin-left: 16rpx;
-  padding: 12rpx 28rpx;
+  padding: 10rpx 22rpx;
   background: $brand-primary;
   color: $app-surface;
-  font-size: calc(24rpx * var(--font-scale, 1));
+  font-size: calc(22rpx * var(--font-scale, 1));
   font-weight: bold;
-  border-radius: 24rpx;
-  min-height: 88rpx;
+  border-radius: 14rpx;
+  min-height: 56rpx;
   flex-shrink: 0;
 }
 

+ 4 - 1
cfc-frontend/pages/wealth/index.vue

@@ -691,7 +691,10 @@ export default {
     },
     loadEnergyData: function() {
       var self = this
-      var memberId = uni.getStorageSync('userId') || null
+      // S-cfc-513:/api/energy/overview 的 SC-X-19 守卫要求 memberId 为 family_members.id(后端按此做家庭隔离)。
+      // 原误传 users.id(与 family_members.id 不同 id 空间)→ 被误判跨家庭 → 403「无权访问该成员的能量数据」。
+      // 改为 currentMemberId(登录用户本人 family_members.id)。
+      var memberId = uni.getStorageSync('currentMemberId') || null
       if (!memberId) return
       getEnergyOverview(memberId).then(function(res) {
         if (res && res.data) {