Explorar o código

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

iwt hai 1 mes
pai
achega
d947eb63d6
Modificáronse 1 ficheiros con 28 adicións e 8 borrados
  1. 28 8
      cfc-frontend/pages/index-home/index.vue

+ 28 - 8
cfc-frontend/pages/index-home/index.vue

@@ -165,16 +165,18 @@
       </view>
     </view>
 
-    <!-- 推荐商品 -->
+    <!-- 今日任务 -->
+    <DailyTaskCard />
+    <!-- 报告上传 -->
     <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="goProductDetail" />
     </view>
 
     <!-- 推荐文章 -->
@@ -189,6 +191,18 @@
         @articleClick="goArticleDetail" />
     </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="goProductDetail" />
+    </view>
+
     <!-- 底部占位 -->
     <view class="bottom-spacer" style="height: 40rpx;"></view>
   </view>
@@ -345,6 +359,7 @@ import FamilyFeed from '../../components/FamilyFeed.vue'
 import DimensionProducts from '../../components/DimensionProducts.vue'
 import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
 import FamilyChallengeCard from '../../components/FamilyChallengeCard.vue'
+import DailyTaskCard from '../../components/daily-task-card.vue'
 import IntentPicker from '../../components/intent-picker.vue'
 import JourneyCard from '../../components/journey-card.vue'
 import { acceptParentInvite, productList, getActivityList, getFeaturedArticles, getFamilyEnergySandbox, getFamilyMemberList, getChildren, getChallengeList, switchToFamilyMember, getMyMembership, updateChallengeProgress, respondChallenge, getTodayTasks, completeTask as completeTaskApi, getTodayParentTasks, completeParentTask as completeParentTaskApi, getTaskHistory, getNotices, getNotificationList, getUserIntent, chooseUserIntent } from '../../utils/api.js'
@@ -361,6 +376,7 @@ export default {
     DimensionProducts,
     ArticleBookshelf,
     FamilyChallengeCard,
+    DailyTaskCard,
     IntentPicker,
     JourneyCard
   },
@@ -841,6 +857,10 @@ export default {
     goMoreArticles: function() {
       uni.navigateTo({ url: '/pages/article-center/index?dimension=action' })
     },
+    goToUploadReport: function() {
+      var id = this.currentChildId || ''
+      uni.navigateTo({ url: '/pages/health/report-upload?memberId=' + id + '&from=index' })
+    },
     _doInit(options) {
       options = options || {}
       if (!this.isLoggedIn()) {