Bläddra i källkod

fix(ui): 首页未登录态热门商品恢复商城两列大卡 + 健康页推荐阅读修复不显示

任务: ui-article-feed-unify(补全)
- pages/index-home/index.vue:未登录态「热门商品」自绘左图右文列表 -> DimensionProducts layout=mall(与已登录态/商城一致,两列大卡片)
- pages/health-main/index.vue:推荐阅读去掉外层 v-if,让 ArticleFeed 自行渲染空态/列表(此前数据未就绪时整块隐藏导致不显示)
Agnes Agent 1 vecka sedan
förälder
incheckning
a695deef60
2 ändrade filer med 2 tillägg och 14 borttagningar
  1. 1 1
      cfc-frontend/pages/health-main/index.vue
  2. 1 13
      cfc-frontend/pages/index-home/index.vue

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

@@ -224,7 +224,7 @@
       </view>
 
       <!-- 推荐阅读 -->
-      <view class="section" v-if="healthArticles.length > 0">
+      <view class="section">
         <view class="section-header">
           <text class="section-title">📖 推荐阅读</text>
           <text class="section-more" @click="goMoreArticles">更多 ›</text>

+ 1 - 13
cfc-frontend/pages/index-home/index.vue

@@ -409,19 +409,7 @@
         <view v-if="hotProducts.length === 0" class="empty-state" style="padding: 40rpx 0;">
           <text class="empty-text">暂无商品</text>
         </view>
-        <view class="product-list" v-else>
-          <view class="product-card" v-for="prod in hotProducts" :key="prod.id" @click="goHotProduct(prod)">
-            <image class="product-cover" :src="getImageUrl(prod.coverImage) || '/static/default-product.png'" mode="aspectFill" />
-            <view class="product-info">
-              <text class="product-name line-clamp-1">{{ prod.name }}</text>
-              <text class="product-desc line-clamp-1">{{ prod.desc }}</text>
-              <view class="product-bottom">
-                <text class="product-fee" v-if="prod.price">¥{{ prod.price }}</text>
-                <text class="product-fee" v-else>立即查看 ›</text>
-              </view>
-            </view>
-          </view>
-        </view>
+        <DimensionProducts v-else :products="hotProducts" layout="mall" @productClick="goHotProduct" />
       </view>
     </view>