index.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348
  1. <template>
  2. <view class="container">
  3. <!-- 通用登录浮层 -->
  4. <login-sheet ref="loginSheet" @success="onSheetLoginSuccess" />
  5. <!-- TabTransition overlay -->
  6. <tab-transition v-if="showTabTransition" dimCode="wealth" ref="tabTransition" @close="showTabTransition = false" />
  7. <!-- 品牌头部 -->
  8. <PageBanner theme="wealth" tagline="家庭财富能量 · 利他创富" quote="利他创富 · 富足人生" />
  9. <DimensionPageSkeleton v-if="pageLoading" dim-code="wealth" />
  10. <!-- 未登录时显示精简内容 -->
  11. <template v-if="!isLoggedIn">
  12. <!-- 品牌定位语 -->
  13. <view class="brand-strap">
  14. <text class="brand-strap-text">分享价值,收获财富</text>
  15. </view>
  16. <!-- 月度引导语 -->
  17. <view class="monthly-guidance" v-if="!isLoggedIn">
  18. <text class="guidance-icon">💧</text>
  19. <text class="guidance-text">{{ monthlyGuidance }}</text>
  20. </view>
  21. <!-- 游客价值卡(统一组件:维度色 CTA + 价值预览) -->
  22. <DimensionVisitorCard
  23. dimCode="wealth"
  24. card-title="富维度 · 利他创富"
  25. :benefits="[
  26. '家庭财富能量仪表盘与推广收益',
  27. '邀请返利与会员专属折扣',
  28. '商城精选好物一键下单'
  29. ]"
  30. cta-text="登录解锁财富能量"
  31. secondary-text="逛逛商城"
  32. secondary-url="/pages/shop/index/index" />
  33. <!-- 商城精选预览(无需登录) -->
  34. <view class="section">
  35. <view class="section-header">
  36. <text class="section-title">🛍️ 商城精选</text>
  37. <text class="section-more" @click="goToShop">查看全部 ›</text>
  38. </view>
  39. <scroll-view scroll-x class="product-scroll" show-scrollbar="false">
  40. <view class="product-list">
  41. <view class="product-card" v-for="(item, idx) in guestProducts" :key="idx" @click="goProductDetail(item.id)">
  42. <image class="product-img" :src="getImageUrl(item.coverImage || item.image) || '/static/default-product.png'" mode="aspectFill" />
  43. <text class="product-name">{{ item.name }}</text>
  44. <text class="product-price">¥{{ item.price || 0 }}</text>
  45. </view>
  46. </view>
  47. </scroll-view>
  48. </view>
  49. </template>
  50. <template v-else>
  51. <!-- 家庭成员选择条 -->
  52. <FamilyMemberStrip
  53. v-if="currentView === 'self' && isLoggedIn"
  54. :members="familyMembersVisible"
  55. :selectedMemberId="selectedMemberId"
  56. @select="onFamilyMemberSelect"
  57. @removed="loadFamilyMembersVisible" />
  58. <!-- 五维能量条 -->
  59. <FamilyEnergyBar
  60. v-if="isLoggedIn && sandboxData"
  61. dimensionCode="wealth"
  62. :sandboxData="sandboxData"
  63. :dualDimension="dualDimension" />
  64. <!-- 身克富杠杆警告 -->
  65. <body-wealth-alert
  66. :status="bodyWealthStatus"
  67. :message="bodyWealthMessage"
  68. :showTip="true" />
  69. <!-- 财富能量环 -->
  70. <WealthEnergyRing
  71. :score="wealthScore"
  72. :delta="deltaPercent" />
  73. <!-- 财富成长 -->
  74. <view class="section stream-section">
  75. <view class="section-header">
  76. <text class="section-title">💰 财富成长</text>
  77. <text class="section-sub">记录家庭财富积累过程,看到每月的成长变化</text>
  78. </view>
  79. <view class="stream-stages">
  80. <view
  81. class="stage-card"
  82. :class="{ active: stage.key === currentStage }"
  83. v-for="stage in streamStages"
  84. :key="stage.key">
  85. <text class="stage-icon">{{ stage.icon }}</text>
  86. <text class="stage-name">{{ stage.name }}</text>
  87. <text class="stage-desc">{{ stage.desc }}</text>
  88. <text class="stage-range">{{ stage.range }}</text>
  89. </view>
  90. </view>
  91. <view class="stream-water">
  92. <view class="stream-water-fill" :style="{ width: wealthScore + '%' }"></view>
  93. </view>
  94. <text class="stream-percent">水位 {{ wealthScore }}%</text>
  95. <text class="stream-tip">{{ streamTip }}</text>
  96. </view>
  97. <!-- 子维度水滴 -->
  98. <wealth-sub-scores
  99. :role="role"
  100. :skill="wealthSkill"
  101. :altruism="wealthAltruism"
  102. :income="wealthIncome"
  103. :fx="wealthFx" />
  104. <!-- 子维度评分表 -->
  105. <dimension-sub-dims
  106. v-if="isLoggedIn && wealthSubDims.length > 0"
  107. title="💧 财富维度构成"
  108. subtitle="家庭财富能量的各个方面"
  109. accent-color="#F59E0B"
  110. :dims="wealthSubDims" />
  111. <!-- 财富强项与提升 -->
  112. <view class="section wealth-insight" v-if="isLoggedIn && wealthSubDims.length > 0 && (wealthStrengths.length > 0 || wealthImproves.length > 0)">
  113. <view class="section-header">
  114. <text class="section-title">📈 财富强项与提升</text>
  115. </view>
  116. <view class="insight-group" v-if="wealthStrengths.length > 0">
  117. <text class="insight-group-title">💪 财富强项</text>
  118. <view class="insight-item" v-for="(item, idx) in wealthStrengths" :key="getInsightKey('s', idx)">
  119. <text class="insight-item-name">{{ item.label }}</text>
  120. <text class="insight-item-score">{{ item.score }}分</text>
  121. <text class="insight-item-tag tag-strong">强项</text>
  122. </view>
  123. </view>
  124. <view class="insight-group" v-if="wealthImproves.length > 0">
  125. <text class="insight-group-title">🌱 提升空间</text>
  126. <view class="insight-item" v-for="(item, idx) in wealthImproves" :key="getInsightKey('i', idx)">
  127. <text class="insight-item-name">{{ item.label }}</text>
  128. <text class="insight-item-score">{{ item.score }}分</text>
  129. <text class="insight-item-tag tag-improve">待提升</text>
  130. </view>
  131. </view>
  132. <view class="insight-tip" v-if="wealthStrengths.length > 0 && wealthImproves.length > 0">
  133. <text class="insight-tip-text">保持优势项,薄弱项可通过参与活动与任务逐步积累</text>
  134. </view>
  135. </view>
  136. <!-- 富维度画像 - 总体说明 -->
  137. <view class="dimension-portrait-section" v-if="isLoggedIn && wealthPortrait">
  138. <view class="section-header">
  139. <text class="section-title">🧭 富维度画像</text>
  140. <text class="portrait-tier">{{ wealthPortrait.tierLabel }}</text>
  141. </view>
  142. <view class="portrait-summary">
  143. <text class="portrait-desc">{{ wealthPortrait.summary }}</text>
  144. </view>
  145. <view class="portrait-dimensions">
  146. <view class="portrait-dim-item" v-for="dim in wealthPortrait.dims" :key="dim.code">
  147. <view class="portrait-dim-header">
  148. <view class="portrait-dim-icon" :style="{ background: dim.color }">{{ dim.icon }}</view>
  149. <text class="portrait-dim-name">{{ dim.name }}</text>
  150. <text class="portrait-dim-score">{{ dim.score }}</text>
  151. </view>
  152. <view class="portrait-dim-bar-track">
  153. <view class="portrait-dim-bar-fill" :style="{ width: dim.score + '%', background: dim.color }"></view>
  154. </view>
  155. <text class="portrait-dim-desc">{{ dim.desc }}</text>
  156. </view>
  157. </view>
  158. <view class="portrait-tip" v-if="wealthPortrait.tip">
  159. <text class="portrait-tip-text">💡 {{ wealthPortrait.tip }}</text>
  160. </view>
  161. </view>
  162. <!-- 财富数据卡(家长) -->
  163. <view class="section" v-if="role === 'parent'">
  164. <view class="disc-card">
  165. <text class="disc-label">💰 累计收益</text>
  166. <text class="disc-value">¥{{ wealthData.totalEarnings || 0 }}</text>
  167. <text class="disc-sub" v-if="deltaPercent > 0">较上月 ↑ {{ deltaPercent }}%</text>
  168. </view>
  169. <view class="disc-sub-row">
  170. <view class="disc-sub-card" @click="goToIncome">
  171. <text class="disc-sub-label">可提现</text>
  172. <text class="disc-sub-value">¥{{ wealthData.availableAmount || 0 }}</text>
  173. <text class="disc-sub-action">提现 →</text>
  174. </view>
  175. <view class="disc-sub-card" @click="goToAchievements">
  176. <text class="disc-sub-label">邀请人数</text>
  177. <text class="disc-sub-value">{{ wealthData.referralCount || 0 }}人</text>
  178. <text class="disc-sub-action">邀请 →</text>
  179. </view>
  180. </view>
  181. </view>
  182. <!-- 财富数据卡(孩子) -->
  183. <view class="section" v-else>
  184. <view class="child-wealth-card">
  185. <view class="child-wealth-item">
  186. <text class="child-wealth-icon">⭐</text>
  187. <text class="child-wealth-value">{{ wealthIncome || 0 }}</text>
  188. <text class="child-wealth-label">累计积分</text>
  189. </view>
  190. <view class="child-wealth-item">
  191. <text class="child-wealth-icon">📝</text>
  192. <text class="child-wealth-value">{{ taskPercent }}%</text>
  193. <text class="child-wealth-label">任务完成</text>
  194. </view>
  195. <view class="child-wealth-item">
  196. <text class="child-wealth-icon">🏆</text>
  197. <text class="child-wealth-value">{{ badgeCount }}</text>
  198. <text class="child-wealth-label">已获徽章</text>
  199. </view>
  200. </view>
  201. <view class="child-trend">
  202. <text class="child-trend-title">📊 本周成长趋势</text>
  203. <view class="child-trend-bars">
  204. <view class="trend-bar" v-for="(h, i) in weekTrend" :key="i" :style="{ height: h + '%' }"></view>
  205. </view>
  206. <view class="child-trend-days">
  207. <text class="trend-day" v-for="(d, i) in weekDays" :key="i">{{ d }}</text>
  208. </view>
  209. </view>
  210. </view>
  211. <!-- 保单管理 -->
  212. <view class="section" v-if="insuranceLoaded">
  213. <view class="section-header">
  214. <text class="section-title">🛡️ 保单管理</text>
  215. <text class="section-more" @click="goToInsuranceList">查看更多 ›</text>
  216. </view>
  217. <view class="insurance-card" v-if="insuranceList.length === 0">
  218. <view class="insurance-empty">
  219. <text class="insurance-empty-icon">📋</text>
  220. <text class="insurance-empty-text">暂无保单</text>
  221. </view>
  222. </view>
  223. <view class="insurance-card" v-else>
  224. <view class="insurance-item" v-for="(item, idx) in insuranceList" :key="idx" @click="goToInsuranceList">
  225. <view class="insurance-item-header">
  226. <text class="insurance-item-name">{{ item.policyName }}</text>
  227. <text class="insurance-item-status" :class="'status-' + item.status">{{ getPolicyStatusLabel(item.status) }}</text>
  228. </view>
  229. <view class="insurance-item-row">
  230. <text class="insurance-item-label">保险公司</text>
  231. <text class="insurance-item-value">{{ item.insuranceCompany || '未知' }}</text>
  232. </view>
  233. <view class="insurance-item-row">
  234. <text class="insurance-item-label">被保人</text>
  235. <text class="insurance-item-value">{{ item.insuredPerson }}</text>
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. <!-- 富维度介绍卡片 -->
  241. <DimensionIntroCard dimCode="wealth" v-if="isLoggedIn" learn-more-url="/pages/wealth/dimension-intro" />
  242. </template>
  243. </view>
  244. </template>
  245. <script>
  246. import TabTransition from '../../components/tab-transition.vue'
  247. import WealthEnergyRing from '@/pages/wealth/components/WealthEnergyRing.vue'
  248. import WealthSubScores from '@/pages/wealth/components/WealthSubScores.vue'
  249. import BodyWealthAlert from '@/pages/wealth/components/BodyWealthAlert.vue'
  250. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  251. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  252. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  253. import DimensionVisitorCard from '../../components/DimensionVisitorCard.vue'
  254. import DimensionSubDims from './components/DimensionSubDims.vue'
  255. import DimensionPageSkeleton from '../../components/DimensionPageSkeleton.vue'
  256. import {
  257. getChildren,
  258. getWealthDetail,
  259. getReferralCode,
  260. getReferralSummary,
  261. getCommissionSummary,
  262. getFamilyMemberList,
  263. getInsuranceList,
  264. getFamilyEnergySandbox,
  265. getEnergyOverview,
  266. productList,
  267. extractReferralCode,
  268. getChildBadgeStats,
  269. getDailyTaskOverview, reportAppEnter
  270. } from '../../utils/api.js'
  271. import nav from '../../utils/nav.js'
  272. import config from '../../config.js'
  273. export default {
  274. components: { TabTransition, WealthEnergyRing, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, FamilyEnergyBar, DimensionIntroCard, DimensionVisitorCard, DimensionSubDims, DimensionPageSkeleton },
  275. data() {
  276. return {
  277. pageLoading: false,
  278. showTabTransition: true,
  279. isLoggedIn: false,
  280. role: 'parent',
  281. // 五维评分
  282. wealthScore: 0,
  283. // 子维度 - 利他创富四维(家长/孩子共用字段)
  284. wealthSkill: null,
  285. wealthAltruism: null,
  286. wealthIncome: null,
  287. wealthFx: null,
  288. // 子维度汇总(DimensionSubDims 用)
  289. wealthSubDims: [],
  290. // 身克富杠杆
  291. bodyWealthStatus: 'normal',
  292. bodyWealthMessage: '',
  293. // 财富数据
  294. wealthData: {
  295. totalEarnings: 0,
  296. availableAmount: 0,
  297. referralCount: 0,
  298. referralCode: ''
  299. },
  300. // 财富成长
  301. deltaPercent: 0,
  302. streamStages: [
  303. { key: 'start', icon: '💧', name: '起步', desc: '新人阶段', range: '0-30%' },
  304. { key: 'mid', icon: '🌊', name: '汇流', desc: '成长阶段', range: '30-70%' },
  305. { key: 'surge', icon: '🌊🌊', name: '奔涌', desc: '达人阶段', range: '70-100%' }
  306. ],
  307. // 孩子数据
  308. taskPercent: 0,
  309. badgeCount: 0,
  310. weekTrend: [30, 40, 35, 50, 60, 55, 70],
  311. weekDays: ['一', '二', '三', '四', '五', '六', '日'],
  312. // 服务列表
  313. serviceList: [
  314. { icon: '📝', label: '记账', action: 'goToCheckin' },
  315. { icon: '🛡️', label: '保单管理', action: 'goToInsurance' },
  316. { icon: '🎨', label: '创客中心', action: 'goToCreator' },
  317. { icon: '🏪', label: '商城首页', action: 'goToShop' },
  318. { icon: '🛒', label: '购物车', action: 'goToCart' },
  319. { icon: '📋', label: '我的订单', action: 'goToOrders' },
  320. { icon: '🔄', label: '售后服务', action: 'goToAfterSales' },
  321. { icon: '📊', label: '收益中心', action: 'goToIncome' },
  322. { icon: '💎', label: '家庭CF值', action: 'goToFamilyCf' }
  323. ],
  324. children: [],
  325. familyMembersVisible: [],
  326. selectedMemberId: null,
  327. guestProducts: [],
  328. // 五维能量条数据
  329. sandboxData: null,
  330. dualDimension: null,
  331. // 保单列表
  332. insuranceList: [],
  333. insuranceLoaded: false,
  334. }
  335. },
  336. computed: {
  337. activeChildId() {
  338. if (this.role === 'child') {
  339. return uni.getStorageSync('currentChildId')
  340. }
  341. return ''
  342. },
  343. currentStage() {
  344. var s = this.wealthScore
  345. if (s >= 70) return 'surge'
  346. if (s >= 30) return 'mid'
  347. return 'start'
  348. },
  349. streamTip() {
  350. var s = this.wealthScore
  351. if (s >= 70) return '🎉 已是富足达人,继续引领全家成长!'
  352. if (s >= 30) return '💡 坚持分享,下一阶段"奔涌"在望'
  353. return '🌱 从今天开始,迈出创富第一步'
  354. },
  355. /** 财富强项:wealthSubDims 中得分 ≥75 的维度 */
  356. wealthStrengths() {
  357. var result = []
  358. for (var i = 0; i < this.wealthSubDims.length; i++) {
  359. var d = this.wealthSubDims[i]
  360. var s = Number(d.score)
  361. if (s >= 75) result.push({ label: d.label, score: s })
  362. }
  363. return result
  364. },
  365. /** 财富提升空间:wealthSubDims 中 0<得分<60 的维度 */
  366. wealthImproves() {
  367. var result = []
  368. for (var i = 0; i < this.wealthSubDims.length; i++) {
  369. var d = this.wealthSubDims[i]
  370. var s = Number(d.score)
  371. if (s > 0 && s < 60) result.push({ label: d.label, score: s })
  372. }
  373. return result
  374. },
  375. wealthPortrait: function() {
  376. var self = this
  377. if (!this.isLoggedIn || !this.wealthSubDims || this.wealthSubDims.length === 0) return null
  378. var dims = this.wealthSubDims
  379. var colors = ['#F59E0B', '#FF8C42', '#6366F1', '#10B981']
  380. var result = { overall: 0, tierLabel: '', summary: '', dims: [], tip: '' }
  381. var total = 0
  382. var count = 0
  383. var dimList = []
  384. for (var i = 0; i < dims.length; i++) {
  385. var d = dims[i]
  386. var score = Number(d.score) || 0
  387. score = Math.max(0, Math.min(100, score))
  388. total += score
  389. count++
  390. dimList.push({
  391. code: 'wealth' + i,
  392. name: d.label,
  393. score: Math.round(score),
  394. color: colors[i % colors.length],
  395. desc: d.desc || ''
  396. })
  397. }
  398. if (count === 0) return null
  399. result.overall = Math.round(total / count)
  400. result.dims = dimList
  401. var o = result.overall
  402. if (o >= 80) {
  403. result.tierLabel = '财富掌舵者'
  404. result.summary = '您的财富管理能力突出,能够很好地规划家庭财务,为家人创造稳定的财富基础。'
  405. result.tip = '保持财富积累节奏,可探索更多元化的投资渠道'
  406. } else if (o >= 60) {
  407. result.tierLabel = '财富进取者'
  408. result.summary = '您的财富管理处于良好水平,具备一定的财务规划能力。'
  409. result.tip = '坚持记账与储蓄习惯,逐步扩大财富积累'
  410. } else if (o >= 40) {
  411. result.tierLabel = '财富探索者'
  412. result.summary = '您的财富管理正在起步阶段,正在学习如何规划家庭财务。'
  413. result.tip = '从记账开始,培养财务规划意识,为家庭建立储蓄习惯'
  414. } else {
  415. result.tierLabel = '财富启蒙者'
  416. result.summary = '您的财富管理意识刚刚萌发,需要更多财务知识的积累。'
  417. result.tip = '建议学习基础理财知识,从家庭收支记录开始'
  418. }
  419. return result
  420. }
  421. },
  422. created() {
  423. // 首屏加载骨架:已登录用户的数据请求期间占位,稳态视觉零变化
  424. // 未登录走静态内容,不进 loading,故此处不读 isLoggedIn
  425. var token = uni.getStorageSync('token')
  426. if (token) {
  427. this.pageLoading = true
  428. var self = this
  429. setTimeout(function() { self.pageLoading = false }, 600)
  430. }
  431. },
  432. onShow() {
  433. reportAppEnter('wealth');
  434. this.showTabTransition = true
  435. var token = uni.getStorageSync('token')
  436. if (!token) {
  437. this.isLoggedIn = false
  438. this.loadGuestProducts()
  439. this._watchPageReady()
  440. return
  441. }
  442. this.isLoggedIn = true
  443. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  444. // 所有人统一以家长身份进入,不再进行角色分流
  445. this.role = currentRole
  446. this.loadChildren()
  447. this.loadWealthDetail()
  448. this.loadWealthData()
  449. this.loadChildData()
  450. this.loadFamilyMembersVisible()
  451. this.loadInsuranceList()
  452. this.loadSandboxData()
  453. this.loadEnergyData()
  454. this._watchPageReady()
  455. },
  456. /** 每月引导语 */
  457. monthlyGuidance: function() {
  458. var month = new Date().getMonth()
  459. var messages = [
  460. '一月:理财从记账开始,养习惯',
  461. '二月:新年规划,梳理家庭收支',
  462. '三月:春耕时节,播种财富种子',
  463. '四月:清明踏青,规划家庭支出',
  464. '五月:劳动节后,复盘收支状况',
  465. '六月:年中复盘,调整财富目标',
  466. '七月:暑期规划,优化家庭消费',
  467. '八月:开学季,教育专项规划',
  468. '九月:金秋收获,检视推广收益',
  469. '十月:国庆消费,理性理财',
  470. '十一月:年终冲刺,盘点年度收益',
  471. '十二月:年度总结,规划来年财富'
  472. ]
  473. return messages[month] || messages[0]
  474. },
  475. methods: {
  476. getInsightKey(prefix, idx) { return prefix + idx },
  477. onFamilyMemberSelect(member) {
  478. this.selectedMemberId = member.id
  479. },
  480. loadFamilyMembersVisible() {
  481. var self = this
  482. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  483. self.familyMembersVisible = res.data || []
  484. }).catch(function(e) {
  485. console.log('获取可见家庭成员失败', e)
  486. self.familyMembersVisible = []
  487. })
  488. },
  489. loadInsuranceList() {
  490. var self = this
  491. this.insuranceLoaded = false
  492. getInsuranceList({}).then(function(res) {
  493. if (res && res.code === 200) {
  494. self.insuranceList = (res.data || []).slice(0, 3)
  495. }
  496. self.insuranceLoaded = true
  497. }).catch(function() {
  498. self.insuranceLoaded = true
  499. })
  500. },
  501. getPolicyStatusLabel: function(status) {
  502. var map = { active: '有效', expired: '已过期', cancelled: '已取消' }
  503. return map[status] || status || '未知'
  504. },
  505. goLogin() {
  506. this.openLoginSheet()
  507. },
  508. // 登录成功:刷新登录态数据(镜像 onShow 已登录分支)
  509. onLoginSuccess() {
  510. this.isLoggedIn = true
  511. this.loadChildren()
  512. this.loadWealthDetail()
  513. this.loadWealthData()
  514. this.loadChildData()
  515. this.loadFamilyMembersVisible()
  516. this.loadInsuranceList()
  517. this.loadSandboxData()
  518. this.loadEnergyData()
  519. },
  520. _watchPageReady() {
  521. var self = this
  522. this.$nextTick(function() {
  523. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  524. })
  525. },
  526. async loadChildren() {
  527. try {
  528. var res = await getChildren()
  529. this.children = res.data || []
  530. } catch (e) {
  531. console.error('获取成员列表失败', e)
  532. }
  533. },
  534. async loadWealthDetail() {
  535. var memberId = null
  536. var memberType = this.role
  537. if (this.role === 'child') {
  538. memberId = uni.getStorageSync('currentChildId')
  539. if (!memberId && this.children.length > 0) {
  540. memberId = this.children[0].id
  541. }
  542. } else {
  543. memberId = uni.getStorageSync('userId')
  544. }
  545. if (!memberId) return
  546. try {
  547. var res = await getWealthDetail(memberId, memberType)
  548. if (res && res.data) {
  549. var d = res.data
  550. this.wealthScore = d.wealthScore || 0
  551. // 利他创富四子维度(家长/孩子共用字段)
  552. this.wealthSkill = d.wealthSkill
  553. this.wealthAltruism = d.wealthAltruism
  554. this.wealthIncome = d.wealthIncome
  555. this.wealthFx = d.wealthFx
  556. // 身克富杠杆状态
  557. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  558. this.bodyWealthMessage = d.bodyWealthMessage || ''
  559. // 子维度汇总(供 DimensionSubDims 使用)
  560. if (memberType === 'parent') {
  561. this.wealthSubDims = [
  562. { label: '个人能力', score: this.wealthSkill || 0, desc: '服务商资质与成长学习' },
  563. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '邀请分享帮助他人' },
  564. { label: 'CF值积累', score: this.wealthIncome || 0, desc: '家庭第二收入曲线' },
  565. { label: '财务素养', score: this.wealthFx || 0, desc: '记账理财储蓄习惯' }
  566. ]
  567. } else {
  568. this.wealthSubDims = [
  569. { label: '学业能力', score: this.wealthSkill || 0, desc: '测评成绩与进步趋势' },
  570. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '帮助他人与分享' },
  571. { label: '积分积累', score: this.wealthIncome || 0, desc: '完成任务获取积分' },
  572. { label: '财务素养', score: this.wealthFx || 0, desc: '财商学习与储蓄习惯' }
  573. ]
  574. }
  575. }
  576. } catch (e) {
  577. console.error('获取富维度详情失败', e)
  578. }
  579. },
  580. loadSandboxData: function() {
  581. var self = this
  582. getFamilyEnergySandbox().then(function(res) {
  583. if (res && res.data) self.sandboxData = res.data
  584. }).catch(function() {})
  585. },
  586. loadEnergyData: function() {
  587. var self = this
  588. var memberId = uni.getStorageSync('userId') || null
  589. if (!memberId) return
  590. getEnergyOverview(memberId).then(function(res) {
  591. if (res && res.data) {
  592. var dims = res.data.dimensions
  593. if (dims && dims.length > 0) {
  594. for (var i = 0; i < dims.length; i++) {
  595. if (dims[i].code === 'wealth') {
  596. self.dualDimension = dims[i]
  597. break
  598. }
  599. }
  600. }
  601. }
  602. }).catch(function() {})
  603. },
  604. goToMemberDetail: function(memberId) {
  605. uni.navigateTo({ url: '/pages/wealth-detail/member-wealth-detail?memberId=' + memberId })
  606. },
  607. async loadWealthData() {
  608. if (this.role !== 'parent') return
  609. try {
  610. var codeRes = await getReferralCode()
  611. this.wealthData.referralCode = extractReferralCode(codeRes)
  612. } catch (e) {
  613. console.error('获取邀请码失败', e)
  614. }
  615. try {
  616. var summaryRes = await getReferralSummary()
  617. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  618. this.wealthData.referralCount = summaryRes.data.invitedCount || 0
  619. }
  620. } catch (e) {
  621. console.error('获取邀请统计失败', e)
  622. }
  623. try {
  624. var commissionRes = await getCommissionSummary()
  625. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  626. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  627. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  628. }
  629. } catch (e) {
  630. console.error('获取佣金统计失败', e)
  631. }
  632. },
  633. async loadChildData() {
  634. if (this.role !== 'child') return
  635. var memberId = uni.getStorageSync('currentChildId')
  636. if (!memberId && this.children.length > 0) {
  637. memberId = this.children[0].id
  638. }
  639. if (!memberId) return
  640. try {
  641. var badgeRes = await getChildBadgeStats(memberId)
  642. if (badgeRes && badgeRes.code === 200 && badgeRes.data) {
  643. this.badgeCount = badgeRes.data.active || 0
  644. }
  645. } catch (e) {
  646. console.error('获取徽章统计失败', e)
  647. }
  648. try {
  649. var taskRes = await getDailyTaskOverview({ memberId: memberId })
  650. if (taskRes && taskRes.code === 200 && taskRes.data && taskRes.data.tasks) {
  651. var done = taskRes.data.tasks.doneToday || 0
  652. var todo = taskRes.data.tasks.todoToday || 0
  653. var total = done + todo
  654. this.taskPercent = total > 0 ? Math.round(done / total * 100) : 0
  655. }
  656. } catch (e) {
  657. console.error('获取任务概览失败', e)
  658. }
  659. },
  660. logout() {
  661. uni.showModal({
  662. title: '退出登录',
  663. content: '确定要退出登录吗?',
  664. success: function(res) {
  665. if (res.confirm) {
  666. uni.clearStorageSync()
  667. uni.reLaunch({ url: '/pages/login/login' })
  668. }
  669. }
  670. })
  671. },
  672. goToCheckin() {
  673. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  674. },
  675. goToInsurance() {
  676. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  677. },
  678. goToInsuranceList: function() {
  679. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  680. },
  681. goToCreator() {
  682. uni.navigateTo({ url: '/pages/promotion/index' })
  683. },
  684. goToShop() {
  685. uni.navigateTo({ url: '/pages/shop/index/index' })
  686. },
  687. goToOrders() {
  688. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  689. },
  690. goToAfterSales() {
  691. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  692. },
  693. goToIncome() {
  694. uni.navigateTo({ url: '/pages/promotion/commission' })
  695. },
  696. goToFamilyCf() {
  697. uni.navigateTo({ url: '/pages/wealth-cf/index' })
  698. },
  699. goToAchievements() {
  700. uni.navigateTo({ url: '/pages/rewards/badge' })
  701. },
  702. goToNetwork() {
  703. uni.navigateTo({ url: '/pages/promotion/team' })
  704. },
  705. goToCart() {
  706. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  707. },
  708. loadGuestProducts() {
  709. var self = this
  710. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  711. if (res.code === 200 && res.data && res.data.records) {
  712. self.guestProducts = res.data.records.slice(0, 4)
  713. }
  714. }).catch(function() {})
  715. },
  716. goProductDetail(id) {
  717. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + id })
  718. },
  719. getImageUrl: function(path) {
  720. if (!path || path === 'null' || path === 'undefined' || path === '/null') return ''
  721. var s = String(path).trim()
  722. if (!s || s === 'null' || s === '/null') return ''
  723. if (s.indexOf('http://') === 0 || s.indexOf('https://') === 0) return s
  724. return config.API_BASE_URL + (s.charAt(0) === '/' ? s : '/' + s)
  725. },
  726. onServiceClick(action) {
  727. if (this[action]) {
  728. this[action]()
  729. }
  730. }
  731. }
  732. }
  733. </script>
  734. .view-toggle {
  735. display: flex;
  736. margin: 20rpx 30rpx;
  737. background: rgba(255,255,255,0.12);
  738. border-radius: 12rpx;
  739. padding: 6rpx;
  740. }
  741. .toggle-btn {
  742. flex: 1;
  743. text-align: center;
  744. padding: 12rpx 0;
  745. border-radius: 8rpx;
  746. font-size: 26rpx;
  747. color: rgba(255,255,255,0.65);
  748. }
  749. .toggle-btn.active {
  750. background: rgba(255,255,255,0.22);
  751. color: #fff;
  752. font-weight: 600;
  753. }
  754. /* 页面说明 */
  755. .section-sub {
  756. font-size: 22rpx;
  757. color: rgba(255,255,255,0.55);
  758. margin-top: 6rpx;
  759. display: block;
  760. }
  761. /* 得分解读卡片 */
  762. .score-explain-card {
  763. margin: 20rpx 30rpx;
  764. padding: 28rpx 24rpx;
  765. background: rgba(255,255,255,0.1);
  766. border-radius: 20rpx;
  767. border: 1rpx solid rgba(255,255,255,0.15);
  768. }
  769. .explain-header {
  770. display: flex;
  771. align-items: center;
  772. margin-bottom: 14rpx;
  773. }
  774. .explain-icon {
  775. font-size: 36rpx;
  776. margin-right: 10rpx;
  777. }
  778. .explain-title {
  779. font-size: 28rpx;
  780. font-weight: 600;
  781. color: #fff;
  782. }
  783. .explain-text {
  784. font-size: 26rpx;
  785. color: rgba(255,255,255,0.8);
  786. line-height: 1.6;
  787. }
  788. <style scoped lang="scss">
  789. .container {
  790. min-height: 100vh;
  791. background: $app-bg;
  792. padding-bottom: 120rpx;
  793. }
  794. .section {
  795. margin: 20rpx 30rpx;
  796. }
  797. .section-header {
  798. display: flex;
  799. justify-content: space-between;
  800. align-items: center;
  801. margin-bottom: 20rpx;
  802. }
  803. .section-title {
  804. font-size: 30rpx;
  805. font-weight: bold;
  806. color: $app-text;
  807. }
  808. .section-more {
  809. position: relative;
  810. font-size: 24rpx;
  811. color: $app-text-muted;
  812. }
  813. /* 触摸目标扩展至 88rpx(微信最小可点区域):文字链 ~34rpx -> 88rpx,视觉零变化 */
  814. .section-more::after {
  815. content: '';
  816. position: absolute;
  817. left: -8rpx;
  818. right: -16rpx;
  819. top: -27rpx;
  820. bottom: -27rpx;
  821. }
  822. /* 财富成长 */
  823. .stream-section {
  824. background: $app-surface;
  825. border-radius: 20rpx;
  826. padding: 24rpx;
  827. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  828. }
  829. .stream-stages {
  830. display: flex;
  831. justify-content: space-between;
  832. margin-bottom: 20rpx;
  833. }
  834. .stage-card {
  835. flex: 1;
  836. margin: 0 8rpx;
  837. padding: 20rpx;
  838. border-radius: 16rpx;
  839. background: $app-bg;
  840. display: flex;
  841. flex-direction: column;
  842. align-items: center;
  843. }
  844. .stage-card.active {
  845. background: $dim-wealth-tint;
  846. border: 2rpx solid $status-warning;
  847. }
  848. .stage-icon {
  849. font-size: 44rpx;
  850. }
  851. .stage-name {
  852. font-size: 26rpx;
  853. font-weight: bold;
  854. color: $app-text;
  855. margin-top: 8rpx;
  856. }
  857. .stage-desc {
  858. font-size: 20rpx;
  859. color: $app-text-muted;
  860. margin-top: 4rpx;
  861. }
  862. .stage-range {
  863. font-size: 20rpx;
  864. color: $dim-wealth;
  865. margin-top: 4rpx;
  866. }
  867. .stream-water {
  868. height: 20rpx;
  869. border-radius: 10rpx;
  870. background: $status-warning-soft;
  871. overflow: hidden;
  872. }
  873. .stream-water-fill {
  874. height: 100%;
  875. border-radius: 10rpx;
  876. background: linear-gradient(90deg, $dim-wealth, $status-warning);
  877. transition: width 0.8s ease;
  878. }
  879. .stream-percent {
  880. display: block;
  881. text-align: right;
  882. font-size: 22rpx;
  883. color: $dim-wealth;
  884. margin-top: 8rpx;
  885. }
  886. .stream-tip {
  887. display: block;
  888. text-align: center;
  889. font-size: 24rpx;
  890. color: $status-warning-strong;
  891. margin-top: 12rpx;
  892. }
  893. /* 财富数据主卡 */
  894. .disc-card {
  895. background: linear-gradient(135deg, $dim-wealth-tint, $status-warning-soft);
  896. border-radius: 20rpx;
  897. padding: 30rpx;
  898. margin-bottom: 16rpx;
  899. display: flex;
  900. flex-direction: column;
  901. }
  902. .disc-label {
  903. font-size: 26rpx;
  904. color: $status-warning-strong;
  905. }
  906. .disc-value {
  907. font-size: 56rpx;
  908. font-weight: bold;
  909. color: $dim-wealth;
  910. margin-top: 8rpx;
  911. }
  912. .disc-sub {
  913. font-size: 24rpx;
  914. color: $status-warning-strong;
  915. margin-top: 8rpx;
  916. }
  917. .disc-sub-row {
  918. display: flex;
  919. margin-bottom: 16rpx;
  920. }
  921. .disc-sub-card {
  922. flex: 1;
  923. background: $app-surface;
  924. border-radius: 16rpx;
  925. padding: 24rpx;
  926. display: flex;
  927. flex-direction: column;
  928. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  929. }
  930. .disc-sub-card:first-child {
  931. margin-right: 8rpx;
  932. }
  933. .disc-sub-card:last-child {
  934. margin-left: 8rpx;
  935. }
  936. .disc-sub-label {
  937. font-size: 24rpx;
  938. color: $app-text-muted;
  939. }
  940. .disc-sub-value {
  941. font-size: 36rpx;
  942. font-weight: bold;
  943. color: $app-text;
  944. margin-top: 8rpx;
  945. }
  946. .disc-sub-action {
  947. font-size: 22rpx;
  948. color: $dim-wealth;
  949. margin-top: 8rpx;
  950. }
  951. /* 孩子财富卡 */
  952. .child-wealth-card {
  953. display: flex;
  954. background: $app-surface;
  955. border-radius: 20rpx;
  956. padding: 24rpx 0;
  957. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  958. }
  959. .child-wealth-item {
  960. flex: 1;
  961. display: flex;
  962. flex-direction: column;
  963. align-items: center;
  964. }
  965. .child-wealth-icon {
  966. font-size: 44rpx;
  967. }
  968. .child-wealth-value {
  969. font-size: 36rpx;
  970. font-weight: bold;
  971. color: $dim-wealth;
  972. margin-top: 8rpx;
  973. }
  974. .child-wealth-label {
  975. font-size: 22rpx;
  976. color: $app-text-muted;
  977. margin-top: 4rpx;
  978. }
  979. .child-trend {
  980. margin-top: 16rpx;
  981. background: $app-surface;
  982. border-radius: 20rpx;
  983. padding: 24rpx;
  984. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  985. }
  986. .child-trend-title {
  987. font-size: 26rpx;
  988. color: $app-text;
  989. font-weight: bold;
  990. }
  991. .child-trend-bars {
  992. display: flex;
  993. align-items: flex-end;
  994. height: 120rpx;
  995. margin-top: 16rpx;
  996. }
  997. .trend-bar {
  998. flex: 1;
  999. margin: 0 6rpx;
  1000. background: linear-gradient(180deg, $status-warning, $dim-wealth);
  1001. border-radius: 6rpx 6rpx 0 0;
  1002. }
  1003. .child-trend-days {
  1004. display: flex;
  1005. margin-top: 8rpx;
  1006. }
  1007. .trend-day {
  1008. flex: 1;
  1009. text-align: center;
  1010. font-size: 20rpx;
  1011. color: $app-text-muted;
  1012. }
  1013. /* 服务入口 */
  1014. .service-grid {
  1015. display: flex;
  1016. flex-wrap: wrap;
  1017. background: $app-surface;
  1018. border-radius: 20rpx;
  1019. padding: 24rpx 16rpx;
  1020. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  1021. }
  1022. .service-item {
  1023. width: 25%;
  1024. display: flex;
  1025. flex-direction: column;
  1026. align-items: center;
  1027. padding: 16rpx 0;
  1028. }
  1029. .service-icon-wrap {
  1030. width: 88rpx;
  1031. height: 88rpx;
  1032. border-radius: 24rpx;
  1033. background: $dim-wealth-tint;
  1034. display: flex;
  1035. align-items: center;
  1036. justify-content: center;
  1037. margin-bottom: 8rpx;
  1038. }
  1039. .service-icon {
  1040. font-size: 40rpx;
  1041. }
  1042. .service-label {
  1043. font-size: 22rpx;
  1044. color: $app-text-secondary;
  1045. }
  1046. .logout-item {
  1047. color: $status-danger;
  1048. }
  1049. /* 未登录 */
  1050. .login-prompt .login-btn::after {
  1051. border: none;
  1052. }
  1053. /* 品牌定位语 */
  1054. .brand-strap {
  1055. margin: 16rpx 30rpx 0;
  1056. padding: 20rpx 28rpx;
  1057. background: linear-gradient(135deg, $dim-wealth-tint, rgba(245,158,11,0.12));
  1058. border-radius: 16rpx;
  1059. border-left: 8rpx solid $dim-wealth;
  1060. }
  1061. .brand-strap-text {
  1062. font-size: 26rpx;
  1063. color: $status-warning-strong;
  1064. font-weight: 500;
  1065. }
  1066. /* 商城精选预览 */
  1067. .product-scroll {
  1068. white-space: nowrap;
  1069. padding: 0 30rpx;
  1070. }
  1071. .product-list {
  1072. display: inline-flex;
  1073. gap: 20rpx;
  1074. }
  1075. .product-card {
  1076. width: 220rpx;
  1077. flex-shrink: 0;
  1078. background: $app-surface;
  1079. border-radius: 16rpx;
  1080. overflow: hidden;
  1081. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  1082. }
  1083. .product-img {
  1084. width: 220rpx;
  1085. height: 220rpx;
  1086. background: $app-surface-subtle;
  1087. }
  1088. .product-name {
  1089. display: block;
  1090. padding: 12rpx 12rpx 4rpx;
  1091. font-size: 24rpx;
  1092. color: $app-text;
  1093. overflow: hidden;
  1094. text-overflow: ellipsis;
  1095. white-space: nowrap;
  1096. }
  1097. .product-price {
  1098. display: block;
  1099. padding: 4rpx 12rpx 12rpx;
  1100. font-size: 26rpx;
  1101. font-weight: bold;
  1102. color: $dim-wealth;
  1103. }
  1104. /* 保单管理 */
  1105. .insurance-card {
  1106. background: $app-surface;
  1107. border-radius: 20rpx;
  1108. padding: 24rpx;
  1109. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  1110. }
  1111. .insurance-empty {
  1112. display: flex;
  1113. flex-direction: column;
  1114. align-items: center;
  1115. padding: 40rpx 0;
  1116. }
  1117. .insurance-empty-icon { font-size: 60rpx; }
  1118. .insurance-empty-text { font-size: 24rpx; color: $app-text-muted; margin-top: 12rpx; }
  1119. .insurance-item {
  1120. padding: 16rpx 0;
  1121. border-bottom: 1rpx solid $app-surface-subtle;
  1122. }
  1123. .insurance-item:last-child { border-bottom: none; }
  1124. .insurance-item-header {
  1125. display: flex;
  1126. justify-content: space-between;
  1127. align-items: center;
  1128. margin-bottom: 8rpx;
  1129. }
  1130. .insurance-item-name {
  1131. font-size: 26rpx;
  1132. font-weight: 600;
  1133. color: $app-text;
  1134. }
  1135. .insurance-item-status {
  1136. font-size: 20rpx;
  1137. padding: 4rpx 12rpx;
  1138. border-radius: 8rpx;
  1139. }
  1140. .insurance-item-status.status-active { background: $status-success-soft; color: $status-success-text; }
  1141. .insurance-item-status.status-expired { background: $status-danger-tint; color: $status-danger-deep; }
  1142. .insurance-item-status.status-cancelled { background: $app-surface-subtle; color: $app-text-muted; }
  1143. .insurance-item-row {
  1144. display: flex;
  1145. justify-content: space-between;
  1146. padding: 4rpx 0;
  1147. }
  1148. .insurance-item-label { font-size: 22rpx; color: $app-text-muted; }
  1149. .insurance-item-value { font-size: 22rpx; color: $app-text-secondary; }
  1150. /* ===== 财富强项与提升卡片 ===== */
  1151. .wealth-insight {
  1152. background: $app-surface;
  1153. border-radius: 20rpx;
  1154. padding: 24rpx;
  1155. }
  1156. .insight-group {
  1157. margin-bottom: 16rpx;
  1158. }
  1159. .insight-group-title {
  1160. font-size: 26rpx;
  1161. font-weight: 600;
  1162. color: $app-text;
  1163. margin-bottom: 10rpx;
  1164. display: block;
  1165. }
  1166. .insight-item {
  1167. display: flex;
  1168. align-items: center;
  1169. padding: 12rpx 16rpx;
  1170. background: $dim-wealth-tint;
  1171. border-radius: 12rpx;
  1172. margin-bottom: 8rpx;
  1173. }
  1174. .insight-item-name {
  1175. flex: 1;
  1176. font-size: 26rpx;
  1177. color: $app-text;
  1178. }
  1179. .insight-item-score {
  1180. font-size: 24rpx;
  1181. color: $app-text-secondary;
  1182. margin-right: 12rpx;
  1183. }
  1184. .insight-item-tag {
  1185. font-size: 20rpx;
  1186. padding: 4rpx 16rpx;
  1187. border-radius: 8rpx;
  1188. font-weight: 500;
  1189. }
  1190. .insight-item-tag.tag-strong {
  1191. background: $status-success-soft;
  1192. color: $status-success-deep;
  1193. }
  1194. .insight-item-tag.tag-improve {
  1195. background: $status-warning-soft;
  1196. color: $status-warning-deep;
  1197. }
  1198. .insight-tip {
  1199. padding: 12rpx 16rpx;
  1200. background: $dim-wealth-tint;
  1201. border-radius: 12rpx;
  1202. }
  1203. .insight-tip-text {
  1204. font-size: 22rpx;
  1205. color: $dim-wealth;
  1206. }
  1207. /* 维度画像样式 */
  1208. .dimension-portrait-section {
  1209. margin: 24rpx 30rpx;
  1210. background: $app-surface;
  1211. border-radius: 24rpx;
  1212. padding: 32rpx 24rpx;
  1213. box-shadow: 0 4rpx 20rpx rgba(245, 158, 11, 0.12);
  1214. border: 2rpx solid rgba(245, 158, 11, 0.1);
  1215. }
  1216. .portrait-tier {
  1217. font-size: 26rpx;
  1218. color: $dim-wealth;
  1219. font-weight: bold;
  1220. margin-left: 16rpx;
  1221. }
  1222. .portrait-summary {
  1223. margin-bottom: 24rpx;
  1224. }
  1225. .portrait-desc {
  1226. font-size: 26rpx;
  1227. color: $app-text-secondary;
  1228. line-height: 1.6;
  1229. display: block;
  1230. }
  1231. .portrait-dimensions {
  1232. margin-bottom: 20rpx;
  1233. }
  1234. .portrait-dim-item {
  1235. margin-bottom: 18rpx;
  1236. }
  1237. .portrait-dim-header {
  1238. display: flex;
  1239. align-items: center;
  1240. margin-bottom: 6rpx;
  1241. }
  1242. .portrait-dim-icon {
  1243. width: 36rpx;
  1244. height: 36rpx;
  1245. border-radius: 18rpx;
  1246. display: flex;
  1247. align-items: center;
  1248. justify-content: center;
  1249. margin-right: 10rpx;
  1250. font-size: 20rpx;
  1251. background: linear-gradient(135deg, $dim-wealth-tint, $dim-body-tint);
  1252. }
  1253. .portrait-dim-name {
  1254. font-size: 24rpx;
  1255. color: $app-text;
  1256. flex: 1;
  1257. }
  1258. .portrait-dim-score {
  1259. font-size: 26rpx;
  1260. font-weight: bold;
  1261. color: $dim-wealth;
  1262. margin-right: 12rpx;
  1263. }
  1264. .portrait-dim-bar-track {
  1265. height: 10rpx;
  1266. background: $dim-wealth-tint;
  1267. border-radius: 5rpx;
  1268. overflow: hidden;
  1269. margin-bottom: 4rpx;
  1270. flex: 1;
  1271. }
  1272. .portrait-dim-bar-fill {
  1273. height: 100%;
  1274. border-radius: 5rpx;
  1275. transition: width 0.3s ease;
  1276. }
  1277. .portrait-dim-desc {
  1278. font-size: 20rpx;
  1279. color: $app-text-secondary;
  1280. display: block;
  1281. }
  1282. .portrait-tip {
  1283. padding: 16rpx 20rpx;
  1284. background: linear-gradient(135deg, $dim-wealth-tint, $dim-body-tint);
  1285. border-radius: 12rpx;
  1286. border-left: 8rpx solid $dim-wealth;
  1287. margin-top: 16rpx;
  1288. }
  1289. .portrait-tip-text {
  1290. font-size: 22rpx;
  1291. color: $brand-primary-deep;
  1292. line-height: 1.5;
  1293. }
  1294. /* 月度引导语 */
  1295. .monthly-guidance {
  1296. margin: 0 30rpx 20rpx;
  1297. background: linear-gradient(135deg, $dim-wealth-tint, rgba(245,158,11,0.1));
  1298. border-radius: 16rpx;
  1299. padding: 20rpx 24rpx;
  1300. display: flex;
  1301. align-items: center;
  1302. gap: 12rpx;
  1303. }
  1304. .guidance-icon { font-size: 32rpx; flex-shrink: 0; }
  1305. .guidance-text { font-size: 26rpx; color: $dim-wealth; font-weight: 500; }
  1306. </style>