Jelajahi Sumber

U8: index-home template extraction + style cleanup. 11 components extracted (SelfTestCard GuideBar MemberEntryCard QuickFunctionBar TaskQuickList HeroSection ValuePropSection HowItWorksSection ActivityFeedSection ArticleFeedSection LoginFooter); page styles cleaned (removed 775 dead lines); index.vue: 3306→2372 lines (-28%); build passes. Dead-style cleanup: removed hero, value-prop, how-it-works, brand-strap, member-entry, login, loading-container, role-switch, btn, self-test-badge, guide-bar, quick, task-quick, self-test-badge blocks; kept splash/greet/section/challenge/discover/palette vars used by remaining template

Sisyphus Agent 3 minggu lalu
induk
melakukan
67e8c5851d

+ 168 - 0
cfc-frontend/pages/index-home/components/ActivityFeedSection.vue

@@ -0,0 +1,168 @@
+<template>
+  <view class="section">
+    <view class="section-header">
+      <text class="section-title">🔥 热门活动</text>
+      <text class="section-more" @click="$emit('view-all')">查看更多 ›</text>
+    </view>
+    <view v-if="activities.length === 0" class="empty-state" style="padding: 40rpx 0;">
+      <text class="empty-text">暂无活动</text>
+    </view>
+    <view class="activity-list" v-else>
+      <view class="activity-card" v-for="act in activities" :key="act.id" @click="$emit('tap-activity', act)">
+        <image class="activity-cover" :src="coverOf(act)" mode="aspectFill" />
+        <view class="activity-info">
+          <text class="activity-name line-clamp-1">{{ act.title }}</text>
+          <view class="activity-meta">
+            <text class="activity-time">{{ act.startTime }}</text>
+          </view>
+          <view class="activity-bottom">
+            <text class="activity-status" :class="'status-' + (act.status || 'upcoming')">{{ act.status === 'ongoing' ? '进行中' : act.status === 'ended' ? '已结束' : '即将开始' }}</text>
+            <text class="activity-fee" v-if="act.price && act.price > 0">¥{{ (act.price / 100).toFixed(0) }}</text>
+            <text class="activity-fee fee-free" v-else>免费</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import config from '@/config.js'
+
+export default {
+  name: 'ActivityFeedSection',
+  props: {
+    activities: {
+      type: Array,
+      default: function() { return [] }
+    }
+  },
+  methods: {
+    coverOf: function(act) {
+      return this.resolveUrl(act && act.coverImage) || '/static/default-activity.png'
+    },
+    resolveUrl: function(path) {
+      var s = String(path || '').trim()
+      if (!s || s === 'null' || s === 'undefined' || s === '/null') return ''
+      if (s.indexOf('http://') === 0 || s.indexOf('https://') === 0) return s
+      return config.API_BASE_URL + (s.charAt(0) === '/' ? s : '/' + s)
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* 未登录态 — 热门活动(无条件展示);样式与 pages/index-home/index.vue 原内联区块一致。
+   页面专有色阶(状态色)局部定义并注释来源(见 uni.scss §1 Material 色板) */
+$c-success-tint:  $mat-green-tint;   // green-50 极浅底
+$c-success-ink:   $mat-green-strong; // green-800 深文字
+$c-info-tint:     $mat-blue-tint;    // blue-50 极浅底
+$c-info-ink:      $mat-blue-strong;  // blue-800 深文字
+
+.section {
+  margin: 20rpx $uni-space-lg;
+}
+.section-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20rpx;
+}
+.section-title {
+  font-size: calc(30rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+}
+.section-more {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+}
+.empty-state {
+  display: flex;
+  justify-content: center;
+  padding: 60rpx 0;
+}
+.empty-text {
+  font-size: calc(26rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+}
+
+/* 活动列表 */
+.activity-list {
+  display: flex;
+  flex-direction: column;
+  gap: 16rpx;
+}
+.activity-card {
+  background: $app-surface;
+  border-radius: 16rpx;
+  overflow: hidden;
+  display: flex;
+  flex-direction: row;
+  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
+}
+.activity-card:active {
+  opacity: 0.8;
+}
+.activity-cover {
+  width: 200rpx;
+  height: 160rpx;
+  flex-shrink: 0;
+  background: $facade-fill;
+}
+.activity-info {
+  flex: 1;
+  padding: 16rpx;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+.activity-name {
+  font-size: calc(28rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+  margin-bottom: 8rpx;
+}
+.line-clamp-1 {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.activity-meta {
+  display: flex;
+  align-items: center;
+  margin-bottom: 8rpx;
+}
+.activity-time {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+}
+.activity-bottom {
+  display: flex;
+  align-items: center;
+  gap: 12rpx;
+}
+.activity-status {
+  font-size: calc(20rpx * var(--font-scale, 1));
+  padding: 2rpx 10rpx;
+  border-radius: 8rpx;
+  background: $c-success-tint;
+  color: $c-success-ink;
+}
+.activity-status.status-upcoming {
+  background: $c-info-tint;
+  color: $c-info-ink;
+}
+.activity-status.status-ended {
+  background: $facade-fill-2;
+  color: $facade-text-muted;
+}
+.activity-fee {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+  font-weight: bold;
+}
+.activity-fee.fee-free {
+  color: $mat-green;
+}
+</style>

+ 177 - 0
cfc-frontend/pages/index-home/components/ArticleFeedSection.vue

@@ -0,0 +1,177 @@
+<template>
+  <view class="section">
+    <view class="section-header">
+      <text class="section-title">📖 推荐阅读</text>
+      <text class="section-more" @click="$emit('view-all')">更多 ›</text>
+    </view>
+    <view class="article-list">
+      <view v-if="loading" class="loading-state" style="padding: 40rpx 0;">
+        <text class="loading-text">加载中...</text>
+      </view>
+      <!-- 无数据时显示占位卡片 -->
+      <template v-else-if="articles.length === 0">
+        <view class="article-card" v-for="(item, i) in [1,2,3]" :key="i">
+          <view class="article-category" :style="{ background: gradientColors[(i-1) % gradientColors.length] }">
+            <text class="article-category-text">推荐文章</text>
+          </view>
+          <text class="article-title">暂无推荐文章</text>
+          <text class="article-summary">精彩内容即将上线,敬请期待</text>
+          <view class="article-meta">
+            <view class="meta-item">
+              <text class="meta-icon">&#x1F4D6;</text>
+              <text class="meta-text">0</text>
+            </view>
+            <text class="article-date">--</text>
+          </view>
+        </view>
+      </template>
+      <!-- 有数据时显示文章卡片 -->
+      <template v-else>
+        <view class="article-card" v-for="article in articles" :key="article.id" @click="$emit('tap-article', article)">
+          <view class="article-category" :style="{ background: article.categoryColor }">
+            <text class="article-category-text">{{ article.category }}</text>
+          </view>
+          <text class="article-title">{{ article.title }}</text>
+          <text class="article-summary">{{ article.summary }}</text>
+          <view class="article-meta">
+            <view class="meta-item">
+              <text class="meta-icon">&#x1F4D6;</text>
+              <text class="meta-text">{{ article.views }}</text>
+            </view>
+            <text class="article-date">{{ article.date }}</text>
+          </view>
+        </view>
+      </template>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'ArticleFeedSection',
+  props: {
+    articles: {
+      type: Array,
+      default: function() { return [] }
+    },
+    loading: {
+      type: Boolean,
+      default: false
+    },
+    gradientColors: {
+      type: Array,
+      default: function() {
+        return [
+          'linear-gradient(135deg, #F97316, #86EFAC)',
+          'linear-gradient(135deg, #3B82F6, #BBDEFB)',
+          'linear-gradient(135deg, #F59E0B, #FBBF24)',
+          'linear-gradient(135deg, #F97316, #FB923C)',
+          'linear-gradient(135deg, #6366F1, #A5B4FC)'
+        ]
+      }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* 未登录态 — 推荐阅读(无条件展示);样式与 pages/index-home/index.vue 原内联区块一致 */
+.section {
+  margin: 20rpx $uni-space-lg;
+}
+.section-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20rpx;
+}
+.section-title {
+  font-size: calc(30rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+}
+.section-more {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+}
+
+/* 文章列表 */
+.article-list {
+  display: flex;
+  flex-direction: column;
+  gap: 16rpx;
+}
+.article-card {
+  background: $app-surface;
+  border-radius: 16rpx;
+  padding: 24rpx;
+  box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
+}
+.article-card:active {
+  opacity: 0.8;
+}
+.article-category {
+  display: inline-block;
+  padding: 4rpx 14rpx;
+  border-radius: 8rpx;
+  margin-bottom: 10rpx;
+}
+.article-category-text {
+  font-size: calc(20rpx * var(--font-scale, 1));
+  color: $app-surface;
+}
+.article-title {
+  display: block;
+  font-size: calc(28rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+  margin-bottom: 8rpx;
+  line-height: 1.4;
+}
+.article-summary {
+  display: block;
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $facade-text-faint;
+  line-height: 1.5;
+  margin-bottom: 12rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+.article-meta {
+  display: flex;
+  align-items: center;
+  gap: 16rpx;
+}
+.meta-item {
+  display: flex;
+  align-items: center;
+  gap: 4rpx;
+}
+.meta-icon {
+  font-size: calc(24rpx * var(--font-scale, 1));
+}
+.meta-text {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+}
+.article-date {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $facade-text-ghost-light;
+}
+
+/* 加载/空态 */
+.loading-state,
+.empty-state {
+  display: flex;
+  justify-content: center;
+  padding: 60rpx 0;
+}
+.loading-text,
+.empty-text {
+  font-size: calc(26rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+}
+</style>

+ 128 - 0
cfc-frontend/pages/index-home/components/GuideBar.vue

@@ -0,0 +1,128 @@
+<template>
+  <view v-if="title" class="guide-bar" :class="'guide-bar-' + color" @click="$emit('tap')">
+    <view class="guide-bar-icon-wrap">
+      <text class="guide-bar-icon">{{ icon }}</text>
+    </view>
+    <view class="guide-bar-info">
+      <text class="guide-bar-title">{{ title }}</text>
+      <text class="guide-bar-sub">{{ sub }}</text>
+    </view>
+    <view class="guide-bar-btn">
+      <text class="guide-bar-btn-text">{{ btnText }} ›</text>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'GuideBar',
+  props: {
+    color: {
+      type: String,
+      default: 'orange'
+    },
+    icon: {
+      type: String,
+      default: ''
+    },
+    title: {
+      type: String,
+      default: ''
+    },
+    sub: {
+      type: String,
+      default: ''
+    },
+    btnText: {
+      type: String,
+      default: ''
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* ①.b 行动引导条 — Next Best Action;样式与 pages/index-home/index.vue 原内联区块一致。
+   页面专有色阶(值非全局令牌)局部定义并注释来源(见 uni.scss §1 品牌/§13 状态) */
+$c-warm-tint:     #FFF3E7;                 // 本地暖橙浅底(页面既有观感)
+$c-brand-ink-2:   $mat-orange-deep;        // orange-800
+$c-brand-ink-3:   $status-warning-strong-2; // amber-700
+$c-wisdom-tint:   #EFF4FF;                 // 本地靛蓝浅底
+$c-wisdom-ink:    #312E81;                 // 本地靛蓝深文字
+$c-wisdom-mid:    $accent-indigo-ink;      // indigo-700
+$c-wisdom-light:  $dim-wisdom-light;       // indigo-400
+$c-action-tint:   $status-success-tint;    // emerald-50
+$c-action-ink:    #064E3B;                 // 本地森林绿深文字
+$c-action-mid:    $status-success-deep-2;  // emerald-700
+$c-action-light:  $status-success-light-3; // emerald-400
+$c-violet-tint:   $facade-violet-tint-2;   // violet-50
+$c-violet-ink:    #4C1D95;                 // 本地紫深文字
+$c-violet-mid:    $violet-700;             // violet-700
+$c-fill-slate:    $facade-fill-slate-50;   // slate-50
+$c-text-slate:    $uni-text-color-secondary; // slate-500
+$c-ink-slate:     $facade-text-slate-700;  // slate-700
+
+.guide-bar {
+  margin: 0 $uni-space-lg 16rpx;
+  border-radius: 24rpx;
+  padding: 18rpx 24rpx;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
+}
+.guide-bar-icon-wrap {
+  width: 72rpx;
+  height: 72rpx;
+  border-radius: 16rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 16rpx;
+  flex-shrink: 0;
+}
+.guide-bar-icon { font-size: calc(34rpx * var(--font-scale, 1)); }
+.guide-bar-info { flex: 1; min-width: 0; }
+.guide-bar-title { font-size: calc(27rpx * var(--font-scale, 1)); font-weight: bold; display: block; }
+.guide-bar-sub { font-size: calc(21rpx * var(--font-scale, 1)); margin-top: 3rpx; display: block; }
+.guide-bar-btn {
+  flex-shrink: 0;
+  margin-left: 12rpx;
+  padding: 8rpx 20rpx;
+  border-radius: 999rpx;
+  font-size: calc(22rpx * var(--font-scale, 1));
+  font-weight: bold;
+}
+.guide-bar-btn-text { }
+
+/* 颜色主题 — 低饱和背景 + 深色文字,不抢自测卡风头 */
+.guide-bar-orange { background: $c-warm-tint; border: 1rpx solid rgba($brand-primary, 0.18); }
+.guide-bar-orange .guide-bar-icon-wrap { background: rgba($brand-primary, 0.14); }
+.guide-bar-orange .guide-bar-title { color: $c-brand-ink-2; }
+.guide-bar-orange .guide-bar-sub { color: $c-brand-ink-3; }
+.guide-bar-orange .guide-bar-btn { background: linear-gradient(135deg, $brand-primary, $brand-primary-light); color: $app-surface; }
+
+.guide-bar-blue { background: $c-wisdom-tint; border: 1rpx solid rgba($dim-wisdom, 0.18); }
+.guide-bar-blue .guide-bar-icon-wrap { background: rgba($dim-wisdom, 0.12); }
+.guide-bar-blue .guide-bar-title { color: $c-wisdom-ink; }
+.guide-bar-blue .guide-bar-sub { color: $c-wisdom-mid; }
+.guide-bar-blue .guide-bar-btn { background: linear-gradient(135deg, $dim-wisdom, $c-wisdom-light); color: $app-surface; }
+
+.guide-bar-green { background: $c-action-tint; border: 1rpx solid rgba($dim-action, 0.18); }
+.guide-bar-green .guide-bar-icon-wrap { background: rgba($dim-action, 0.12); }
+.guide-bar-green .guide-bar-title { color: $c-action-ink; }
+.guide-bar-green .guide-bar-sub { color: $c-action-mid; }
+.guide-bar-green .guide-bar-btn { background: linear-gradient(135deg, $dim-action, $c-action-light); color: $app-surface; }
+
+.guide-bar-purple { background: $c-violet-tint; border: 1rpx solid rgba($facade-violet, 0.18); }
+.guide-bar-purple .guide-bar-icon-wrap { background: rgba($facade-violet, 0.12); }
+.guide-bar-purple .guide-bar-title { color: $c-violet-ink; }
+.guide-bar-purple .guide-bar-sub { color: $c-violet-mid; }
+.guide-bar-purple .guide-bar-btn { background: linear-gradient(135deg, $brand-primary, $brand-primary-light); color: $app-surface; }
+
+.guide-bar-gray { background: $c-fill-slate; border: 1rpx solid rgba($c-text-slate, 0.15); }
+.guide-bar-gray .guide-bar-icon-wrap { background: rgba($c-text-slate, 0.10); }
+.guide-bar-gray .guide-bar-title { color: $c-ink-slate; }
+.guide-bar-gray .guide-bar-sub { color: $c-text-slate; }
+.guide-bar-gray .guide-bar-btn { background: linear-gradient(135deg, $app-text-subtle, $app-border); color: $app-surface; }
+</style>

+ 128 - 0
cfc-frontend/pages/index-home/components/HeroSection.vue

@@ -0,0 +1,128 @@
+<template>
+  <view class="hero-section">
+    <image class="hero-logo" src="/static/logo.png" mode="aspectFit" />
+    <text class="hero-name">浠艾福</text>
+    <text class="hero-identity">您的专属家庭主动健康管理师</text>
+    <text class="hero-slogan">家里每个人的状态,你真的看见了?</text>
+    <text class="hero-powered">亿图腾科技出品</text>
+
+    <view class="hero-dims">
+      <view class="hero-dim"><text class="hero-dim-emoji">🌏</text><text class="hero-dim-label">身·根基</text></view>
+      <view class="hero-dim"><text class="hero-dim-emoji">⚡</text><text class="hero-dim-label">智·认知</text></view>
+      <view class="hero-dim"><text class="hero-dim-emoji">💧</text><text class="hero-dim-label">富·创富</text></view>
+      <view class="hero-dim"><text class="hero-dim-emoji">🌿</text><text class="hero-dim-label">行·和谐</text></view>
+      <view class="hero-dim"><text class="hero-dim-emoji">🔥</text><text class="hero-dim-label">心·大爱</text></view>
+    </view>
+
+    <text class="hero-sub-slogan">家庭成员的习惯、长者的身体、自己的精力——不用等到出问题才着急。先看见,先了解,不等问题发生。</text>
+
+    <button class="hero-cta-btn" @click="$emit('tap-login')">免费体验 · 登录 / 注册</button>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'HeroSection'
+}
+</script>
+
+<style scoped lang="scss">
+/* 未登录态 — 品牌 Hero 区(引流内容);样式与 pages/index-home/index.vue 原内联区块一致 */
+$c-brand-tint-3:  $brand-primary-light-2;   // orange-200
+$c-brand-ink:     $mat-orange-900;   // orange-900 深文字
+
+.hero-section {
+  margin: 24rpx $uni-space-lg 0;
+  padding: 40rpx 32rpx;
+  background: linear-gradient(160deg, $facade-brand-tint 0%, $c-brand-tint-3 60%, rgba($brand-primary, 0.15) 100%);
+  border-radius: 24rpx;
+  text-align: center;
+  border: 1rpx solid rgba($brand-primary, 0.12);
+}
+.hero-logo {
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 24rpx;
+  background: $app-surface;
+  box-shadow: 0 8rpx 24rpx rgba($brand-primary, 0.18);
+}
+.hero-name {
+  display: block;
+  font-size: calc(48rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $c-brand-ink;
+  margin-top: 16rpx;
+  letter-spacing: 6rpx;
+}
+.hero-identity {
+  display: block;
+  font-size: calc(28rpx * var(--font-scale, 1));
+  font-weight: 600;
+  color: $brand-primary-deep;
+  margin-top: 12rpx;
+  letter-spacing: 2rpx;
+}
+.hero-slogan {
+  display: block;
+  font-size: calc(26rpx * var(--font-scale, 1));
+  color: $mat-orange-deep;
+  margin-top: 8rpx;
+  font-weight: 500;
+}
+.hero-powered {
+  display: block;
+  font-size: calc(20rpx * var(--font-scale, 1));
+  color: rgba($c-brand-ink, 0.45);
+  margin-top: 10rpx;
+}
+.hero-dims {
+  display: flex;
+  justify-content: center;
+  gap: 16rpx;
+  margin-top: 28rpx;
+  flex-wrap: wrap;
+}
+.hero-dim {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  gap: 6rpx;
+  padding: 12rpx 16rpx;
+  background: rgba($app-surface, 0.7);
+  border-radius: 16rpx;
+}
+.hero-dim-emoji {
+  font-size: calc(32rpx * var(--font-scale, 1));
+}
+.hero-dim-label {
+  font-size: calc(20rpx * var(--font-scale, 1));
+  color: $c-brand-ink;
+  font-weight: 500;
+  white-space: nowrap;
+}
+.hero-sub-slogan {
+  display: block;
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $brand-primary-dark;
+  margin-top: 18rpx;
+  font-weight: 500;
+}
+.hero-cta-btn {
+  margin: 28rpx auto 0;
+  display: block;
+  width: 420rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  color: $app-surface;
+  font-size: calc(28rpx * var(--font-scale, 1));
+  font-weight: bold;
+  border-radius: 24rpx;
+  text-align: center;
+  border: none;
+  box-shadow: 0 8rpx 20rpx rgba($brand-primary, 0.3);
+}
+.hero-cta-btn::after {
+  border: none;
+}
+</style>

+ 93 - 0
cfc-frontend/pages/index-home/components/HowItWorksSection.vue

@@ -0,0 +1,93 @@
+<template>
+  <view class="how-it-works">
+    <text class="how-it-works-title">三步,全家健康从今天开始</text>
+    <view class="step-row">
+      <view class="step-item">
+        <view class="step-num">1</view>
+        <text class="step-name">登录/注册</text>
+        <text class="step-sub">(30 秒)</text>
+      </view>
+      <view class="step-arrow">›</view>
+      <view class="step-item">
+        <view class="step-num">2</view>
+        <text class="step-name">完成五维测评</text>
+        <text class="step-sub">(全家各一份)</text>
+      </view>
+      <view class="step-arrow">›</view>
+      <view class="step-item">
+        <view class="step-num">3</view>
+        <text class="step-name">获得专属方案</text>
+        <text class="step-sub">(照着做,持续优化)</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'HowItWorksSection'
+}
+</script>
+
+<style scoped lang="scss">
+/* ③ 三步上手;样式与 pages/index-home/index.vue 原内联区块一致 */
+.how-it-works {
+  margin: 32rpx $uni-space-lg 0;
+  padding: 32rpx 24rpx;
+  background: $app-surface;
+  border-radius: 24rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.04);
+}
+.how-it-works-title {
+  display: block;
+  font-size: calc(32rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+  text-align: center;
+  margin-bottom: 28rpx;
+}
+.step-row {
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+}
+.step-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  flex: 1;
+  min-width: 0;
+}
+.step-num {
+  width: 48rpx;
+  height: 48rpx;
+  line-height: 48rpx;
+  border-radius: 50%;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  color: $app-surface;
+  font-size: calc(26rpx * var(--font-scale, 1));
+  font-weight: bold;
+  text-align: center;
+  box-shadow: 0 4rpx 12rpx rgba($brand-primary, 0.3);
+}
+.step-name {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $facade-text-strong;
+  font-weight: 500;
+  margin-top: 12rpx;
+  text-align: center;
+}
+.step-sub {
+  font-size: calc(20rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+  margin-top: 4rpx;
+  text-align: center;
+}
+.step-arrow {
+  font-size: calc(28rpx * var(--font-scale, 1));
+  color: $brand-primary;
+  line-height: 1;
+  align-self: center;
+  padding: 0 6rpx;
+}
+</style>

+ 37 - 0
cfc-frontend/pages/index-home/components/LoginFooter.vue

@@ -0,0 +1,37 @@
+<template>
+  <view class="login-footer">
+    <button class="login-btn" @click="$emit('tap-login')">登录 / 注册</button>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'LoginFooter'
+}
+</script>
+
+<style scoped lang="scss">
+/* 未登录态 — 底部登录按钮;样式与 pages/index-home/index.vue 原内联区块一致 */
+.login-footer {
+  margin: 40rpx $uni-space-lg;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.login-btn {
+  width: 100%;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  color: $app-surface;
+  font-size: calc(32rpx * var(--font-scale, 1));
+  font-weight: bold;
+  border-radius: 24rpx;
+  text-align: center;
+  border: none;
+  box-shadow: 0 8rpx 24rpx rgba($brand-primary, 0.3);
+}
+.login-btn::after {
+  border: none;
+}
+</style>

+ 95 - 0
cfc-frontend/pages/index-home/components/MemberEntryCard.vue

@@ -0,0 +1,95 @@
+<template>
+  <view class="member-entry" @click="$emit('tap')">
+    <view class="member-entry-icon-wrap">
+      <text class="member-entry-icon">{{ icon }}</text>
+    </view>
+    <view class="member-entry-texts">
+      <text class="member-entry-title">{{ title }}</text>
+      <text class="member-entry-desc">{{ desc }}</text>
+    </view>
+    <view class="member-entry-btn">
+      <text class="member-entry-btn-text">{{ btnText }}</text>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'MemberEntryCard',
+  props: {
+    title: {
+      type: String,
+      default: ''
+    },
+    desc: {
+      type: String,
+      default: ''
+    },
+    btnText: {
+      type: String,
+      default: ''
+    },
+    icon: {
+      type: String,
+      default: '👑'
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* ③ 行动区 — 会员入口:非会员显示开通 / 快到期显示续费;样式与 pages/index-home/index.vue 原内联区块一致 */
+.member-entry {
+  display: flex;
+  align-items: center;
+  margin: 20rpx $uni-space-lg 0;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  border-radius: 24rpx;
+  padding: 24rpx $uni-space-page;
+}
+.member-entry-icon-wrap {
+  width: 64rpx;
+  height: 64rpx;
+  border-radius: 50%;
+  background: rgba($app-surface, 0.2);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 16rpx;
+  flex-shrink: 0;
+}
+.member-entry-icon {
+  font-size: calc(36rpx * var(--font-scale, 1));
+}
+.member-entry-texts {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+}
+.member-entry-title {
+  font-size: calc(30rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $app-surface;
+}
+.member-entry-desc {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: rgba($app-surface, 0.85);
+  margin-top: 4rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.member-entry-btn {
+  margin-left: 16rpx;
+  padding: 10rpx 24rpx;
+  background: $app-surface;
+  border-radius: 24rpx;
+  flex-shrink: 0;
+}
+.member-entry-btn-text {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+  font-weight: bold;
+}
+</style>

+ 98 - 0
cfc-frontend/pages/index-home/components/QuickFunctionBar.vue

@@ -0,0 +1,98 @@
+<template>
+  <view class="section">
+    <view class="section-header">
+      <text class="section-title">⚡ 快捷功能</text>
+      <text class="section-more" @click="$emit('library')">应用库 ›</text>
+    </view>
+    <view class="quick-bar">
+      <view class="quick-item" v-for="(app, idx) in apps" :key="app.key" @click="$emit('tap-app', app)">
+        <view class="quick-icon" :style="getQuickIconStyle(idx)"><text>{{ app.icon }}</text></view>
+        <text class="quick-label">{{ app.name }}</text>
+      </view>
+      <view class="quick-item" v-if="apps.length === 0" @click="$emit('library')">
+        <view class="quick-icon" style="background:rgba(99,102,241,0.15)"><text>+</text></view>
+        <text class="quick-label">去添加</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'QuickFunctionBar',
+  props: {
+    apps: {
+      type: Array,
+      default: function() { return [] }
+    }
+  },
+  methods: {
+    getQuickIconStyle: function(idx) {
+      var palette = [
+        'rgba(99,102,241,0.15)',
+        'rgba(16,185,129,0.15)',
+        'rgba(139,92,246,0.15)',
+        'rgba(245,158,11,0.15)',
+        'rgba(255,107,157,0.15)',
+        'rgba(249,115,22,0.15)'
+      ]
+      return { background: palette[idx % palette.length] }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* ④ 内容区 — 快捷功能入口(动态渲染);样式与 pages/index-home/index.vue 原内联区块一致 */
+.section {
+  margin: 20rpx $uni-space-lg;
+}
+.section-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20rpx;
+}
+.section-title {
+  font-size: calc(30rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+}
+.section-more {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+}
+
+/* 快捷功能入口(单排,6个横向排列) */
+.quick-bar {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  background: $app-surface;
+  border-radius: 24rpx;
+  padding: 20rpx 10rpx;
+}
+.quick-item {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  gap: 8rpx;
+}
+.quick-icon {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.quick-icon text {
+  font-size: calc(36rpx * var(--font-scale, 1));
+}
+.quick-item .quick-label {
+  font-size: calc(26rpx * var(--font-scale, 1));
+  color: $facade-text-body;
+}
+</style>

+ 54 - 0
cfc-frontend/pages/index-home/components/SelfTestCard.vue

@@ -0,0 +1,54 @@
+<template>
+  <view class="self-test-card" @click="$emit('tap')">
+    <view class="self-test-head">
+      <text class="self-test-icon">⚡</text>
+      <view class="self-test-info">
+        <text class="self-test-title">{{ title }}</text>
+        <text class="self-test-sub">{{ sub }}</text>
+        <text v-if="badgeCount > 0" class="self-test-badge">有 {{ badgeCount }} 项调研待填</text>
+      </view>
+      <text class="self-test-arrow">›</text>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'SelfTestCard',
+  props: {
+    title: {
+      type: String,
+      default: ''
+    },
+    sub: {
+      type: String,
+      default: ''
+    },
+    badgeCount: {
+      type: Number,
+      default: 0
+    },
+    icon: {
+      type: String,
+      default: '⚡'
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* ① 了解区 — 自测大卡(引导"从了解开始");样式与 pages/index-home/index.vue 原内联区块一致 */
+.self-test-card {
+  margin: 20rpx $uni-space-lg 16rpx;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  border-radius: 24rpx;
+  padding: 24rpx 28rpx;
+}
+.self-test-head { display: flex; align-items: center; }
+.self-test-icon { font-size: calc(40rpx * var(--font-scale, 1)); margin-right: 16rpx; }
+.self-test-info { flex: 1; }
+.self-test-title { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: bold; color: $app-surface; display: block; }
+.self-test-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: rgba($app-surface, 0.8); display: block; margin-top: 4rpx; }
+.self-test-badge { display: inline-block; align-self: flex-start; margin-top: 8rpx; font-size: calc(20rpx * var(--font-scale, 1)); color: $brand-primary; background: rgba($brand-primary, 0.1); padding: 4rpx 14rpx; border-radius: 999rpx; }
+.self-test-arrow { font-size: calc(36rpx * var(--font-scale, 1)); color: rgba($app-surface, 0.7); }
+</style>

+ 156 - 0
cfc-frontend/pages/index-home/components/TaskQuickList.vue

@@ -0,0 +1,156 @@
+<template>
+  <view class="section">
+    <view class="section-header">
+      <text class="section-title">📝 我的任务({{ tasks.length }})</text>
+      <view class="section-header-extra">
+        <text class="task-family-count" @click="$emit('view-all')">家庭任务({{ familyTodoCount }})</text>
+        <text class="section-more" @click="$emit('view-all')">全部 ›</text>
+      </view>
+    </view>
+    <view v-if="tasks.length > 0" class="task-quick-list">
+      <view
+        v-for="task in tasks"
+        :key="task.id"
+        class="task-quick-item"
+        :class="{ 'task-quick-item--overdue': task._isOverdue }"
+      >
+        <view class="task-quick-info">
+          <text class="task-quick-title line-clamp-1">{{ task.title }}</text>
+          <text class="task-quick-meta" v-if="!task._isOverdue">+{{ task.points }}CF</text>
+          <text class="task-quick-meta task-quick-meta--overdue" v-else>已超期</text>
+        </view>
+        <button v-if="!task._isOverdue" class="btn-quick-complete" @click="$emit('complete', task)">{{ task._isLinked ? '去完成' : '完成' }}</button>
+        <view v-else class="status-badge-overdue">⏰ 已超期</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'TaskQuickList',
+  props: {
+    tasks: {
+      type: Array,
+      default: function() { return [] }
+    },
+    familyTodoCount: {
+      type: Number,
+      default: 0
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+/* ④ 内容区 — 家庭动态(任务快捷列表);样式与 pages/index-home/index.vue 原内联区块一致 */
+.section {
+  margin: 20rpx $uni-space-lg;
+}
+.section-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20rpx;
+}
+.section-title {
+  font-size: calc(30rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+}
+.section-more {
+  font-size: calc(24rpx * var(--font-scale, 1));
+  color: $brand-primary;
+}
+/* 家庭任务右侧计数标(家庭任务 + 全部) */
+.section-header-extra {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.task-family-count {
+  margin-right: 16rpx;
+  padding: 4rpx 16rpx;
+  border-radius: $radius-full;
+  background: rgba($brand-primary, 0.08);
+  color: $brand-primary;
+  font-size: calc(22rpx * var(--font-scale, 1));
+  font-weight: 600;
+  line-height: 1.5;
+}
+
+/* 我的任务快捷列表 */
+.task-quick-list {
+  display: flex;
+  flex-direction: column;
+  gap: 12rpx;
+}
+.task-quick-item {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  background: $app-surface;
+  border-radius: 16rpx;
+  padding: 18rpx 24rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
+}
+.task-quick-info {
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+  flex: 1;
+}
+.task-quick-title {
+  font-size: calc(26rpx * var(--font-scale, 1));
+  color: $facade-text-strong;
+  font-weight: 500;
+  line-height: 1.4;
+}
+.task-quick-meta {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $brand-primary;
+  margin-top: 4rpx;
+  font-weight: bold;
+}
+.line-clamp-1 {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.btn-quick-complete {
+  margin-left: 16rpx;
+  padding: 8rpx 24rpx;
+  background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
+  color: $app-surface;
+  font-size: calc(24rpx * var(--font-scale, 1));
+  font-weight: bold;
+  border-radius: 24rpx;
+  border: none;
+  line-height: 1;
+  height: 44rpx;
+  flex-shrink: 0;
+}
+.btn-quick-complete::after {
+  border: none;
+}
+/* 超期任务样式 */
+.task-quick-item--overdue .task-quick-meta--overdue {
+  color: $status-danger-2;
+  font-weight: bold;
+}
+.status-badge-overdue {
+  margin-left: 16rpx;
+  padding: 8rpx 20rpx;
+  background: rgba(255,77,79,0.1);
+  color: $status-danger-2;
+  font-size: calc(24rpx * var(--font-scale, 1));
+  font-weight: bold;
+  border-radius: 24rpx;
+  flex-shrink: 0;
+  line-height: 1;
+  height: 44rpx;
+  display: flex;
+  align-items: center;
+}
+</style>

+ 89 - 0
cfc-frontend/pages/index-home/components/ValuePropSection.vue

@@ -0,0 +1,89 @@
+<template>
+  <view class="value-prop-section">
+    <text class="value-prop-title">为什么选择浠艾福?</text>
+    <view class="value-prop-grid">
+      <view class="value-prop-card">
+        <text class="value-prop-icon">🧪</text>
+        <view class="value-prop-texts">
+          <text class="value-prop-name">免费五维测评</text>
+          <text class="value-prop-desc">从身体到心智,20 分钟看清全家健康状况</text>
+        </view>
+      </view>
+      <view class="value-prop-card">
+        <text class="value-prop-icon">🎯</text>
+        <view class="value-prop-texts">
+          <text class="value-prop-name">个性化成长方案</text>
+          <text class="value-prop-desc">基于测评数据,AI+专家定制专属行动计划</text>
+        </view>
+      </view>
+      <view class="value-prop-card">
+        <text class="value-prop-icon">👨‍👩‍👧</text>
+        <view class="value-prop-texts">
+          <text class="value-prop-name">全家共管</text>
+          <text class="value-prop-desc">一个家庭一张网,三代同框、全员参与,成长看得见</text>
+        </view>
+      </view>
+      <view class="value-prop-card">
+        <text class="value-prop-icon">📈</text>
+        <view class="value-prop-texts">
+          <text class="value-prop-name">任务与积分激励</text>
+          <text class="value-prop-desc">把健康管理变成每天的小行动,习惯自然养成</text>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'ValuePropSection'
+}
+</script>
+
+<style scoped lang="scss">
+/* ② 平台作用·价值主张;样式与 pages/index-home/index.vue 原内联区块一致 */
+.value-prop-section {
+  margin: 24rpx $uni-space-lg 0;
+}
+.value-prop-title {
+  display: block;
+  font-size: calc(32rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+  margin-bottom: 20rpx;
+}
+.value-prop-grid {
+  display: flex;
+  flex-direction: column;
+  gap: 12rpx;
+}
+.value-prop-card {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  background: $app-surface;
+  border-radius: 16rpx;
+  padding: 20rpx 24rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
+}
+.value-prop-icon {
+  font-size: calc(36rpx * var(--font-scale, 1));
+  margin-right: 20rpx;
+  flex-shrink: 0;
+}
+.value-prop-texts {
+  display: flex;
+  flex-direction: column;
+  min-width: 0;
+}
+.value-prop-name {
+  font-size: calc(28rpx * var(--font-scale, 1));
+  font-weight: bold;
+  color: $facade-text-strong;
+}
+.value-prop-desc {
+  font-size: calc(22rpx * var(--font-scale, 1));
+  color: $facade-text-muted;
+  margin-top: 4rpx;
+}
+</style>

File diff ditekan karena terlalu besar
+ 65 - 998
cfc-frontend/pages/index-home/index.vue


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini