For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: 将财富维度(富页面)的「财富服务」9宫格拆解,功能迁移到我的页面(成就区)、成长页(今日增长),并在富页面直接展示保单列表。
Architecture: 纯前端改动,3个 .vue 文件独立修改,不涉及后端、数据库或新增页面。每个文件可独立并行修改。
Tech Stack: uni-app Vue 2 (Options API),微信小程序
涉及文件:
cfc-frontend/pages/profile-main/profile.vue — 成就区增加「推广收益」图标cfc-frontend/pages/wealth/index.vue — 删除服务网格 + 新增保单列表cfc-frontend/pages/growth-main/index.vue — 今日成长增加记账打卡项API 依赖:
getReferralSummary() → POST /api/invite/summary — 返回 { totalEarnings, totalCount }getInsuranceList(data) → POST /api/wealth/insurance/list — 返回保单列表getCheckinList(data) → POST /api/wealth/checkin/list — 返回打卡记录列表?.(用 && 替代):key 表达式(用方法调用代替)new Date(string)(用 parseDate())@PostMapping 风格(前端仅涉及页面组件,不涉及后端接口)Files:
cfc-frontend/pages/profile-main/profile.vue — 成就网格 + data + loadAllData + 导航方法Interfaces:
getReferralSummary (already imported at line 253)Produces: 成就网格第9项「推广收益」,点击跳转 /pages/promotion/index
[ ] Step 1: 在 data 中增加 referralEarnings 字段
在 data() 中 totalPoints: 0 行附近增加:
referralEarnings: 0,
在 loadAllData() 方法末尾增加:
this.loadReferralEarnings()
在 loadProfileStats() 方法之后增加:
loadReferralEarnings() {
var self = this
getReferralSummary().then(function(res) {
if (res && res.code === 200 && res.data) {
self.referralEarnings = res.data.totalEarnings || 0
}
}).catch(function() {})
},
在 ach-item 列表末尾("上传报告"之后)增加:
<view class="ach-item" @click="goToWealthCenter">
<view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
<text class="ach-icon">💰</text>
</view>
<text class="ach-num">{{ referralEarnings }}</text>
<text class="ach-label">推广收益</text>
</view>
在 methods 中增加:
goToWealthCenter: function() {
uni.navigateTo({ url: '/pages/promotion/index' })
},
Run: lsp_diagnostics on cfc-frontend/pages/profile-main/profile.vue
Expected: 无错误
Files:
cfc-frontend/pages/wealth/index.vue — 删除 service-grid 区块,新增保单列表区块,data 增加字段,加载保单数据Interfaces:
getInsuranceList (已导入,见 api.js 1961)Produces: 保单摘要列表,最多3条,底部「查看更多」跳转
[ ] Step 1: 在 data 中增加保单相关字段
在 data() 中 guestProducts: [] 附近增加:
// 保单列表
insuranceList: [],
insuranceLoaded: false,
在 onShow 方法中 this.loadFamilyMembersVisible() 之后增加:
this.loadInsuranceList()
在 methods 中增加:
loadInsuranceList() {
var self = this
this.insuranceLoaded = false
getInsuranceList({}).then(function(res) {
if (res && res.code === 200) {
self.insuranceList = (res.data || []).slice(0, 3)
}
self.insuranceLoaded = true
}).catch(function() {
self.insuranceLoaded = true
})
},
在 methods 中增加:
getPolicyStatusLabel: function(status) {
var map = { active: '有效', expired: '已过期', cancelled: '已取消' }
return map[status] || status || '未知'
},
删除模板中 service-grid 整个区块(第 177-189 行):
<!-- 财富服务 8 宫格 -->
<view class="section">
<view class="section-header">
<text class="section-title">🚀 财富服务</text>
</view>
<view class="service-grid">
...
</view>
</view>
在财富数据卡(孩子/家长)和 DimensionIntroCard 之间增加:
<!-- 保单管理 -->
<view class="section" v-if="insuranceLoaded">
<view class="section-header">
<text class="section-title">🛡️ 保单管理</text>
<text class="section-more" @click="goToInsuranceList">查看更多 ›</text>
</view>
<view class="insurance-card" v-if="insuranceList.length === 0">
<view class="insurance-empty">
<text class="insurance-empty-icon">📋</text>
<text class="insurance-empty-text">暂无保单</text>
</view>
</view>
<view class="insurance-card" v-else>
<view class="insurance-item" v-for="(item, idx) in insuranceList" :key="idx" @click="goToInsuranceList">
<view class="insurance-item-header">
<text class="insurance-item-name">{{ item.policyName }}</text>
<text class="insurance-item-status" :class="'status-' + item.status">{{ getPolicyStatusLabel(item.status) }}</text>
</view>
<view class="insurance-item-row">
<text class="insurance-item-label">保险公司</text>
<text class="insurance-item-value">{{ item.insuranceCompany || '未知' }}</text>
</view>
<view class="insurance-item-row">
<text class="insurance-item-label">被保人</text>
<text class="insurance-item-value">{{ item.insuredPerson }}</text>
</view>
</view>
</view>
</view>
在 methods 中增加:
goToInsuranceList: function() {
uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
},
在 <style scoped> 中增加:
/* 保单管理 */
.insurance-card {
background: #fff;
border-radius: 20rpx;
padding: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
}
.insurance-empty {
display: flex;
flex-direction: column;
align-items: center;
padding: 40rpx 0;
}
.insurance-empty-icon { font-size: 60rpx; }
.insurance-empty-text { font-size: 24rpx; color: #999; margin-top: 12rpx; }
.insurance-item {
padding: 16rpx 0;
border-bottom: 1rpx solid #f5f5f5;
}
.insurance-item:last-child { border-bottom: none; }
.insurance-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
}
.insurance-item-name {
font-size: 26rpx;
font-weight: 600;
color: #333;
}
.insurance-item-status {
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.insurance-item-status.status-active { background: #DCFCE7; color: #16A34A; }
.insurance-item-status.status-expired { background: #FEF2F2; color: #DC2626; }
.insurance-item-status.status-cancelled { background: #F5F5F5; color: #999; }
.insurance-item-row {
display: flex;
justify-content: space-between;
padding: 4rpx 0;
}
.insurance-item-label { font-size: 22rpx; color: #999; }
.insurance-item-value { font-size: 22rpx; color: #666; }
Run: lsp_diagnostics on cfc-frontend/pages/wealth/index.vue
Expected: 无错误
Files:
cfc-frontend/pages/growth-main/index.vue — progressItems 增加第5项,loadProgressItems 增加打卡判断Interfaces:
getCheckinList (需在 import 中增加)Produces: 今日成长第5项「记账打卡」显示今日打卡状态
[ ] Step 1: 在 import 中增加 getCheckinList
在 import { ... } from '../../utils/api.js' 中增加 getCheckinList:
import { healthCheckinList, getHealthMealList, getSurveyStatus, getSurveyHistory, getFoodCautionList, getGrowthRecommendations, getExerciseRecords, getSleepRecords, getEmotionCheckinList, getCheckinList } from '../../utils/api.js'
在 items.push({ key: 'emotion', ... }) 之后增加:
// 记账打卡
var checkinDone = false
try {
var cParams = self.memberId ? { memberId: self.memberId } : {}
var cRes = await getCheckinList(cParams)
var cList = (cRes.code === 200 && cRes.data) ? cRes.data : []
for (var ci = 0; ci < cList.length; ci++) {
if (cList[ci] && cList[ci].checkinDate && cList[ci].checkinDate.indexOf(self.todayDate) === 0) {
checkinDone = true
break
}
}
} catch(e) {}
items.push({ key: 'checkin', icon: '💰', label: '记账打卡', done: checkinDone, actionText: '去打卡' })
在 handleProgressClick 方法的跳转映射中增加 checkin 路由:
var m = { checkin: '/pages/wealth-sub/checkin', diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind/index' }
Run: lsp_diagnostics on cfc-frontend/pages/growth-main/index.vue
Expected: 无错误