Browse Source

feat(growth): 今日任务和报告上传移到推荐阅读上方,推荐商品移到底部

iwt 1 month ago
parent
commit
a238c60257
1 changed files with 20 additions and 6 deletions
  1. 20 6
      cfc-frontend/pages/growth-main/index.vue

+ 20 - 6
cfc-frontend/pages/growth-main/index.vue

@@ -245,13 +245,18 @@
         </view>
       </view>
       <DimensionActivities :isLoggedIn="true" @activityClick="goActivityDetail" @moreActivities="goMoreActivities" style="margin-bottom:60rpx" />
-      <!-- 推荐商品 -->
+      <!-- 今日任务 -->
+      <DailyTaskCard v-if="isLoggedIn" />
+      <!-- 报告上传 -->
       <view class="section">
-        <view class="section-header">
-          <text class="section-title">🛍️ 推荐商品</text>
-          <text class="section-more" @click="goMoreProducts">更多 ›</text>
+        <view class="action-card" @click="goToUploadReport">
+          <text class="action-icon">📷</text>
+          <view class="action-info">
+            <text class="action-title">上传报告</text>
+            <text class="action-desc">体检报告 · 菌群检测 · 认知测评 · 心理测评 · 情绪打卡</text>
+          </view>
+          <text class="action-arrow">›</text>
         </view>
-        <DimensionProducts :isLoggedIn="true" :showMore="false" @productClick="goToProduct" />
       </view>
       <!-- 推荐阅读 -->
       <view class="section" v-if="recommendArticles.length > 0">
@@ -261,6 +266,14 @@
         </view>
         <ArticleBookshelf :articles="recommendArticles" :isLoggedIn="true" @articleClick="goToArticle" />
       </view>
+      <!-- 推荐商品(放最底部) -->
+      <view class="section">
+        <view class="section-header">
+          <text class="section-title">🛍️ 推荐商品</text>
+          <text class="section-more" @click="goMoreProducts">更多 ›</text>
+        </view>
+        <DimensionProducts :isLoggedIn="true" :showMore="false" @productClick="goToProduct" />
+      </view>
       <view class="bottom-spacer" style="height: 40rpx;"></view>
     </view>
   </view>
@@ -271,10 +284,11 @@ import LoginGuideCard from '../../components/LoginGuideCard.vue'
 import DimensionActivities from '../../components/DimensionActivities.vue'
 import DimensionProducts from '../../components/DimensionProducts.vue'
 import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
+import DailyTaskCard from '../../components/daily-task-card.vue'
 import { healthCheckinList, getHealthMealList, getFoodCautionList, getGrowthRecommendations, getExerciseRecords, getSleepRecords, getEmotionCheckinList, getCheckinList, getLatestHealthReport } from '../../utils/api.js'
 import { parseDate } from '../../utils/format.js'
 export default {
-  components: { PageBanner, LoginGuideCard, DimensionActivities, DimensionProducts, ArticleBookshelf },
+  components: { PageBanner, LoginGuideCard, DimensionActivities, DimensionProducts, ArticleBookshelf, DailyTaskCard },
   data() { return { memberId: '', todayDate: '', hasIncomplete: false, incompleteCount: 0, progressItems: [], streakDays: 0, activeChallenges: 0, completeness: 0, cautionCount: 0,
       healthArticles: [],
       growthArticles: [],