index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962
  1. <template>
  2. <view class="container">
  3. <!-- TabTransition overlay -->
  4. <tab-transition v-if="showTabTransition" dimCode="wealth" ref="tabTransition" @close="showTabTransition = false" />
  5. <!-- 未登录时显示精简内容 -->
  6. <template v-if="!isLoggedIn">
  7. <PageBanner theme="wealth"
  8. tagline="利他创富 · 价值共享"
  9. quote="富足源于利他与坚持" />
  10. <!-- 品牌定位语 -->
  11. <view class="brand-strap">
  12. <text class="brand-strap-text">分享价值,收获财富</text>
  13. </view>
  14. <!-- 月度引导语 -->
  15. <view class="monthly-guidance" v-if="!isLoggedIn">
  16. <text class="guidance-icon">💧</text>
  17. <text class="guidance-text">{{ monthlyGuidance }}</text>
  18. </view>
  19. <!-- 登录引导 -->
  20. <view class="login-guide-section">
  21. <LoginGuideCard
  22. title="解锁财富能量与推广收益"
  23. :items="[
  24. '查看家庭财富能量仪表盘与推广收益',
  25. '管理邀请返利,开通会员享专属折扣',
  26. '浏览商城精选商品,一键加入购物车'
  27. ]" />
  28. </view>
  29. <!-- 商城精选预览(无需登录) -->
  30. <view class="section">
  31. <view class="section-header">
  32. <text class="section-title">🛍️ 商城精选</text>
  33. <text class="section-more" @click="goToShop">查看全部 ›</text>
  34. </view>
  35. <scroll-view scroll-x class="product-scroll" show-scrollbar="false">
  36. <view class="product-list">
  37. <view class="product-card" v-for="(item, idx) in guestProducts" :key="idx" @click="goProductDetail(item.id)">
  38. <image class="product-img" :src="getImageUrl(item.coverImage || item.image) || '/static/default-product.png'" mode="aspectFill" />
  39. <text class="product-name">{{ item.name }}</text>
  40. <text class="product-price">¥{{ item.price || 0 }}</text>
  41. </view>
  42. </view>
  43. </scroll-view>
  44. </view>
  45. </template>
  46. <template v-else>
  47. <!-- 品牌头部 -->
  48. <PageBanner theme="wealth"
  49. tagline="利他创富 · 价值共享"
  50. quote="富足源于利他与坚持" />
  51. <!-- 家庭成员选择条 -->
  52. <FamilyMemberStrip
  53. v-if="currentView === 'self' && isLoggedIn"
  54. :members="familyMembersVisible"
  55. :selectedMemberId="selectedMemberId"
  56. @select="onFamilyMemberSelect"
  57. @removed="loadFamilyMembersVisible" />
  58. <!-- 身克富杠杆警告 -->
  59. <body-wealth-alert
  60. :status="bodyWealthStatus"
  61. :message="bodyWealthMessage"
  62. :showTip="true" />
  63. <!-- 财富能量环 -->
  64. <WealthEnergyRing
  65. :score="wealthScore"
  66. :delta="deltaPercent" />
  67. <!-- 财富成长 -->
  68. <view class="section stream-section">
  69. <view class="section-header">
  70. <text class="section-title">💰 财富成长</text>
  71. <text class="section-sub">记录家庭财富积累过程,看到每月的成长变化</text>
  72. </view>
  73. <view class="stream-stages">
  74. <view
  75. class="stage-card"
  76. :class="{ active: stage.key === currentStage }"
  77. v-for="stage in streamStages"
  78. :key="stage.key">
  79. <text class="stage-icon">{{ stage.icon }}</text>
  80. <text class="stage-name">{{ stage.name }}</text>
  81. <text class="stage-desc">{{ stage.desc }}</text>
  82. <text class="stage-range">{{ stage.range }}</text>
  83. </view>
  84. </view>
  85. <view class="stream-water">
  86. <view class="stream-water-fill" :style="{ width: wealthScore + '%' }"></view>
  87. </view>
  88. <text class="stream-percent">水位 {{ wealthScore }}%</text>
  89. <text class="stream-tip">{{ streamTip }}</text>
  90. </view>
  91. <!-- 子维度水滴 -->
  92. <wealth-sub-scores
  93. :role="role"
  94. :skill="wealthSkill"
  95. :altruism="wealthAltruism"
  96. :income="wealthIncome"
  97. :fx="wealthFx" />
  98. <!-- 子维度评分表 -->
  99. <dimension-sub-dims
  100. v-if="isLoggedIn && wealthSubDims.length > 0"
  101. title="💧 财富维度构成"
  102. subtitle="家庭财富能量的各个方面"
  103. accent-color="#F59E0B"
  104. :dims="wealthSubDims" />
  105. <!-- 财富数据卡(家长) -->
  106. <view class="section" v-if="role === 'parent'">
  107. <view class="disc-card">
  108. <text class="disc-label">💰 累计收益</text>
  109. <text class="disc-value">¥{{ wealthData.totalEarnings || 0 }}</text>
  110. <text class="disc-sub">较上月 ↑ {{ deltaPercent }}%</text>
  111. </view>
  112. <view class="disc-sub-row">
  113. <view class="disc-sub-card" @click="goToIncome">
  114. <text class="disc-sub-label">可提现</text>
  115. <text class="disc-sub-value">¥{{ wealthData.availableAmount || 0 }}</text>
  116. <text class="disc-sub-action">提现 →</text>
  117. </view>
  118. <view class="disc-sub-card" @click="goToAchievements">
  119. <text class="disc-sub-label">邀请人数</text>
  120. <text class="disc-sub-value">{{ wealthData.referralCount || 0 }}人</text>
  121. <text class="disc-sub-action">邀请 →</text>
  122. </view>
  123. </view>
  124. <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
  125. <text class="referral-code-label">我的邀请码</text>
  126. <text class="referral-code-value">{{ wealthData.referralCode }}</text>
  127. <text class="referral-code-copy">复制</text>
  128. </view>
  129. </view>
  130. <!-- 财富数据卡(孩子) -->
  131. <view class="section" v-else>
  132. <view class="child-wealth-card">
  133. <view class="child-wealth-item">
  134. <text class="child-wealth-icon">⭐</text>
  135. <text class="child-wealth-value">{{ wealthIncome || 0 }}</text>
  136. <text class="child-wealth-label">累计积分</text>
  137. </view>
  138. <view class="child-wealth-item">
  139. <text class="child-wealth-icon">📝</text>
  140. <text class="child-wealth-value">{{ taskPercent }}%</text>
  141. <text class="child-wealth-label">任务完成</text>
  142. </view>
  143. <view class="child-wealth-item">
  144. <text class="child-wealth-icon">🏆</text>
  145. <text class="child-wealth-value">{{ badgeCount }}</text>
  146. <text class="child-wealth-label">已获徽章</text>
  147. </view>
  148. </view>
  149. <view class="child-trend">
  150. <text class="child-trend-title">📊 本周成长趋势</text>
  151. <view class="child-trend-bars">
  152. <view class="trend-bar" v-for="(h, i) in weekTrend" :key="i" :style="{ height: h + '%' }"></view>
  153. </view>
  154. <view class="child-trend-days">
  155. <text class="trend-day" v-for="(d, i) in weekDays" :key="i">{{ d }}</text>
  156. </view>
  157. </view>
  158. </view>
  159. <!-- 财富服务 8 宫格 -->
  160. <view class="section">
  161. <view class="section-header">
  162. <text class="section-title">🚀 财富服务</text>
  163. </view>
  164. <view class="service-grid">
  165. <view class="service-item" v-for="item in serviceList" :key="item.label" @click="onServiceClick(item.action)">
  166. <view class="service-icon-wrap">
  167. <text class="service-icon">{{ item.icon }}</text>
  168. </view>
  169. <text class="service-label">{{ item.label }}</text>
  170. </view>
  171. </view>
  172. </view>
  173. <!-- 富维度介绍卡片 -->
  174. <DimensionIntroCard dimCode="wealth" v-if="isLoggedIn" learn-more-url="/pages/wealth/dimension-intro" />
  175. </template>
  176. </view>
  177. </template>
  178. <script>
  179. import TabTransition from '../../components/tab-transition.vue'
  180. import PageBanner from '../../components/PageBanner.vue'
  181. import WealthEnergyRing from '../../components/WealthEnergyRing.vue'
  182. import WealthSubScores from '../../components/WealthSubScores.vue'
  183. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  184. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  185. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  186. import DimensionSubDims from '../../components/DimensionSubDims.vue'
  187. import {
  188. getChildren,
  189. getWealthDetail,
  190. getReferralCode,
  191. getReferralSummary,
  192. getCommissionSummary,
  193. getFamilyMemberList,
  194. productList
  195. } from '../../utils/api.js'
  196. import nav from '../../utils/nav.js'
  197. import config from '../../config.js'
  198. export default {
  199. components: { TabTransition, PageBanner, WealthEnergyRing, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, DimensionIntroCard, DimensionSubDims },
  200. data() {
  201. return {
  202. showTabTransition: true,
  203. isLoggedIn: false,
  204. role: 'parent',
  205. // 五维评分
  206. wealthScore: 0,
  207. // 子维度 - 利他创富四维(家长/孩子共用字段)
  208. wealthSkill: null,
  209. wealthAltruism: null,
  210. wealthIncome: null,
  211. wealthFx: null,
  212. // 子维度汇总(DimensionSubDims 用)
  213. wealthSubDims: [],
  214. // 身克富杠杆
  215. bodyWealthStatus: 'normal',
  216. bodyWealthMessage: '',
  217. // 财富数据
  218. wealthData: {
  219. totalEarnings: 0,
  220. availableAmount: 0,
  221. referralCount: 0,
  222. referralCode: ''
  223. },
  224. // 财富成长
  225. deltaPercent: 5.2,
  226. streamStages: [
  227. { key: 'start', icon: '💧', name: '起步', desc: '新人阶段', range: '0-30%' },
  228. { key: 'mid', icon: '🌊', name: '汇流', desc: '成长阶段', range: '30-70%' },
  229. { key: 'surge', icon: '🌊🌊', name: '奔涌', desc: '达人阶段', range: '70-100%' }
  230. ],
  231. // 孩子数据
  232. taskPercent: 0,
  233. badgeCount: 0,
  234. weekTrend: [30, 40, 35, 50, 60, 55, 70],
  235. weekDays: ['一', '二', '三', '四', '五', '六', '日'],
  236. // 服务列表
  237. serviceList: [
  238. { icon: '📝', label: '记账打卡', action: 'goToCheckin' },
  239. { icon: '🛡️', label: '保单管理', action: 'goToInsurance' },
  240. { icon: '🎨', label: '创客中心', action: 'goToCreator' },
  241. { icon: '🏪', label: '商城首页', action: 'goToShop' },
  242. { icon: '🛒', label: '购物车', action: 'goToCart' },
  243. { icon: '📋', label: '我的订单', action: 'goToOrders' },
  244. { icon: '🔄', label: '售后服务', action: 'goToAfterSales' },
  245. { icon: '📊', label: '收益中心', action: 'goToIncome' },
  246. { icon: '💎', label: '家庭CF值', action: 'goToFamilyCf' }
  247. ],
  248. children: [],
  249. familyMembersVisible: [],
  250. selectedMemberId: null,
  251. guestProducts: [],
  252. }
  253. },
  254. computed: {
  255. activeChildId() {
  256. if (this.role === 'child') {
  257. return uni.getStorageSync('currentChildId')
  258. }
  259. return ''
  260. },
  261. currentStage() {
  262. var s = this.wealthScore
  263. if (s >= 70) return 'surge'
  264. if (s >= 30) return 'mid'
  265. return 'start'
  266. },
  267. streamTip() {
  268. var s = this.wealthScore
  269. if (s >= 70) return '🎉 已是富足达人,继续引领全家成长!'
  270. if (s >= 30) return '💡 坚持分享,下一阶段"奔涌"在望'
  271. return '🌱 从今天开始,迈出创富第一步'
  272. }
  273. },
  274. onShow() {
  275. this.showTabTransition = true
  276. var token = uni.getStorageSync('token')
  277. if (!token) {
  278. this.isLoggedIn = false
  279. this.loadGuestProducts()
  280. this._watchPageReady()
  281. return
  282. }
  283. this.isLoggedIn = true
  284. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  285. if (currentRole === 'teacher') {
  286. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  287. return
  288. }
  289. this.role = currentRole
  290. this.loadChildren()
  291. this.loadWealthDetail()
  292. this.loadWealthData()
  293. this.loadFamilyMembersVisible()
  294. this._watchPageReady()
  295. },
  296. /** 每月引导语 */
  297. monthlyGuidance: function() {
  298. var month = new Date().getMonth()
  299. var messages = [
  300. '一月:理财从记账开始,养习惯',
  301. '二月:新年规划,梳理家庭收支',
  302. '三月:春耕时节,播种财富种子',
  303. '四月:清明踏青,规划家庭支出',
  304. '五月:劳动节后,复盘收支状况',
  305. '六月:年中复盘,调整财富目标',
  306. '七月:暑期规划,优化家庭消费',
  307. '八月:开学季,教育专项规划',
  308. '九月:金秋收获,检视推广收益',
  309. '十月:国庆消费,理性理财',
  310. '十一月:年终冲刺,盘点年度收益',
  311. '十二月:年度总结,规划来年财富'
  312. ]
  313. return messages[month] || messages[0]
  314. },
  315. methods: {
  316. onFamilyMemberSelect(member) {
  317. this.selectedMemberId = member.id
  318. },
  319. loadFamilyMembersVisible() {
  320. var self = this
  321. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  322. self.familyMembersVisible = res.data || []
  323. }).catch(function(e) {
  324. console.log('获取可见家庭成员失败', e)
  325. self.familyMembersVisible = []
  326. })
  327. },
  328. goLogin() {
  329. uni.navigateTo({ url: '/pages/login/login' })
  330. },
  331. _watchPageReady() {
  332. var self = this
  333. this.$nextTick(function() {
  334. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  335. })
  336. },
  337. async loadChildren() {
  338. try {
  339. var res = await getChildren()
  340. this.children = res.data || []
  341. } catch (e) {
  342. console.error('获取孩子列表失败', e)
  343. }
  344. },
  345. async loadWealthDetail() {
  346. var memberId = null
  347. var memberType = this.role
  348. if (this.role === 'child') {
  349. memberId = uni.getStorageSync('currentChildId')
  350. if (!memberId && this.children.length > 0) {
  351. memberId = this.children[0].id
  352. }
  353. } else {
  354. memberId = uni.getStorageSync('userId')
  355. }
  356. if (!memberId) return
  357. try {
  358. var res = await getWealthDetail(memberId, memberType)
  359. if (res && res.data) {
  360. var d = res.data
  361. this.wealthScore = d.wealthScore || 0
  362. // 利他创富四子维度(家长/孩子共用字段)
  363. this.wealthSkill = d.wealthSkill
  364. this.wealthAltruism = d.wealthAltruism
  365. this.wealthIncome = d.wealthIncome
  366. this.wealthFx = d.wealthFx
  367. // 身克富杠杆状态
  368. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  369. this.bodyWealthMessage = d.bodyWealthMessage || ''
  370. // 子维度汇总(供 DimensionSubDims 使用)
  371. if (memberType === 'parent') {
  372. this.wealthSubDims = [
  373. { label: '个人能力', score: this.wealthSkill || 0, desc: '服务商资质与成长学习' },
  374. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '邀请分享帮助他人' },
  375. { label: 'CF值积累', score: this.wealthIncome || 0, desc: '家庭第二收入曲线' },
  376. { label: '财务素养', score: this.wealthFx || 0, desc: '记账理财储蓄习惯' }
  377. ]
  378. } else {
  379. this.wealthSubDims = [
  380. { label: '学业能力', score: this.wealthSkill || 0, desc: '测评成绩与进步趋势' },
  381. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '帮助他人与分享' },
  382. { label: '积分积累', score: this.wealthIncome || 0, desc: '完成任务获取积分' },
  383. { label: '财务素养', score: this.wealthFx || 0, desc: '财商学习与储蓄习惯' }
  384. ]
  385. }
  386. }
  387. } catch (e) {
  388. console.error('获取富维度详情失败', e)
  389. }
  390. },
  391. async loadWealthData() {
  392. if (this.role !== 'parent') return
  393. try {
  394. var codeRes = await getReferralCode()
  395. if (codeRes && codeRes.code === 200 && codeRes.data) {
  396. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  397. }
  398. } catch (e) {
  399. console.error('获取邀请码失败', e)
  400. }
  401. try {
  402. var summaryRes = await getReferralSummary()
  403. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  404. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  405. }
  406. } catch (e) {
  407. console.error('获取邀请统计失败', e)
  408. }
  409. try {
  410. var commissionRes = await getCommissionSummary()
  411. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  412. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  413. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  414. }
  415. } catch (e) {
  416. console.error('获取佣金统计失败', e)
  417. }
  418. },
  419. copyReferralCode() {
  420. if (!this.wealthData.referralCode) return
  421. uni.setClipboardData({
  422. data: this.wealthData.referralCode,
  423. success: function() {
  424. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  425. }
  426. })
  427. },
  428. logout() {
  429. uni.showModal({
  430. title: '退出登录',
  431. content: '确定要退出登录吗?',
  432. success: function(res) {
  433. if (res.confirm) {
  434. uni.clearStorageSync()
  435. uni.reLaunch({ url: '/pages/login/login' })
  436. }
  437. }
  438. })
  439. },
  440. goToCheckin() {
  441. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  442. },
  443. goToInsurance() {
  444. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  445. },
  446. goToCreator() {
  447. uni.navigateTo({ url: '/pages/promotion/index' })
  448. },
  449. goToShop() {
  450. uni.navigateTo({ url: '/pages/shop/index/index' })
  451. },
  452. goToOrders() {
  453. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  454. },
  455. goToAfterSales() {
  456. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  457. },
  458. goToIncome() {
  459. uni.navigateTo({ url: '/pages/promotion/commission' })
  460. },
  461. goToFamilyCf() {
  462. uni.navigateTo({ url: '/pages/wealth-cf/index' })
  463. },
  464. goToAchievements() {
  465. uni.navigateTo({ url: '/pages/rewards/badge' })
  466. },
  467. goToNetwork() {
  468. uni.navigateTo({ url: '/pages/promotion/team' })
  469. },
  470. goToCart() {
  471. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  472. },
  473. loadGuestProducts() {
  474. var self = this
  475. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  476. if (res.code === 200 && res.data && res.data.records) {
  477. self.guestProducts = res.data.records.slice(0, 4)
  478. }
  479. }).catch(function() {})
  480. },
  481. goProductDetail(id) {
  482. uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
  483. },
  484. getImageUrl: function(path) {
  485. return config.API_BASE_URL + path
  486. },
  487. onServiceClick(action) {
  488. if (this[action]) {
  489. this[action]()
  490. }
  491. }
  492. }
  493. }
  494. </script>
  495. .view-toggle {
  496. display: flex;
  497. margin: 20rpx 30rpx;
  498. background: rgba(255,255,255,0.12);
  499. border-radius: 12rpx;
  500. padding: 6rpx;
  501. }
  502. .toggle-btn {
  503. flex: 1;
  504. text-align: center;
  505. padding: 12rpx 0;
  506. border-radius: 8rpx;
  507. font-size: 26rpx;
  508. color: rgba(255,255,255,0.65);
  509. }
  510. .toggle-btn.active {
  511. background: rgba(255,255,255,0.22);
  512. color: #fff;
  513. font-weight: 600;
  514. }
  515. /* 页面说明 */
  516. .section-sub {
  517. font-size: 22rpx;
  518. color: rgba(255,255,255,0.55);
  519. margin-top: 6rpx;
  520. display: block;
  521. }
  522. /* 得分解读卡片 */
  523. .score-explain-card {
  524. margin: 20rpx 30rpx;
  525. padding: 28rpx 24rpx;
  526. background: rgba(255,255,255,0.1);
  527. border-radius: 20rpx;
  528. border: 1rpx solid rgba(255,255,255,0.15);
  529. }
  530. .explain-header {
  531. display: flex;
  532. align-items: center;
  533. margin-bottom: 14rpx;
  534. }
  535. .explain-icon {
  536. font-size: 36rpx;
  537. margin-right: 10rpx;
  538. }
  539. .explain-title {
  540. font-size: 28rpx;
  541. font-weight: 600;
  542. color: #fff;
  543. }
  544. .explain-text {
  545. font-size: 26rpx;
  546. color: rgba(255,255,255,0.8);
  547. line-height: 1.6;
  548. }
  549. <style scoped>
  550. .container {
  551. min-height: 100vh;
  552. background: #f5f7fa;
  553. padding-bottom: 120rpx;
  554. }
  555. .section {
  556. margin: 20rpx 30rpx;
  557. }
  558. .section-header {
  559. display: flex;
  560. justify-content: space-between;
  561. align-items: center;
  562. margin-bottom: 20rpx;
  563. }
  564. .section-title {
  565. font-size: 30rpx;
  566. font-weight: bold;
  567. color: #333;
  568. }
  569. .section-more {
  570. font-size: 24rpx;
  571. color: #999;
  572. }
  573. /* 财富成长 */
  574. .stream-section {
  575. background: #fff;
  576. border-radius: 20rpx;
  577. padding: 24rpx;
  578. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  579. }
  580. .stream-stages {
  581. display: flex;
  582. justify-content: space-between;
  583. margin-bottom: 20rpx;
  584. }
  585. .stage-card {
  586. flex: 1;
  587. margin: 0 8rpx;
  588. padding: 20rpx;
  589. border-radius: 16rpx;
  590. background: #F5F9FC;
  591. display: flex;
  592. flex-direction: column;
  593. align-items: center;
  594. }
  595. .stage-card.active {
  596. background: #FFF7ED;
  597. border: 2rpx solid #FBBF24;
  598. }
  599. .stage-icon {
  600. font-size: 44rpx;
  601. }
  602. .stage-name {
  603. font-size: 26rpx;
  604. font-weight: bold;
  605. color: #333;
  606. margin-top: 8rpx;
  607. }
  608. .stage-desc {
  609. font-size: 20rpx;
  610. color: #999;
  611. margin-top: 4rpx;
  612. }
  613. .stage-range {
  614. font-size: 20rpx;
  615. color: #F59E0B;
  616. margin-top: 4rpx;
  617. }
  618. .stream-water {
  619. height: 20rpx;
  620. border-radius: 10rpx;
  621. background: #FEF3C7;
  622. overflow: hidden;
  623. }
  624. .stream-water-fill {
  625. height: 100%;
  626. border-radius: 10rpx;
  627. background: linear-gradient(90deg, #F59E0B, #FBBF24);
  628. transition: width 0.8s ease;
  629. }
  630. .stream-percent {
  631. display: block;
  632. text-align: right;
  633. font-size: 22rpx;
  634. color: #F59E0B;
  635. margin-top: 8rpx;
  636. }
  637. .stream-tip {
  638. display: block;
  639. text-align: center;
  640. font-size: 24rpx;
  641. color: #92400E;
  642. margin-top: 12rpx;
  643. }
  644. /* 财富数据主卡 */
  645. .disc-card {
  646. background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  647. border-radius: 20rpx;
  648. padding: 30rpx;
  649. margin-bottom: 16rpx;
  650. display: flex;
  651. flex-direction: column;
  652. }
  653. .disc-label {
  654. font-size: 26rpx;
  655. color: #92400E;
  656. }
  657. .disc-value {
  658. font-size: 56rpx;
  659. font-weight: bold;
  660. color: #F59E0B;
  661. margin-top: 8rpx;
  662. }
  663. .disc-sub {
  664. font-size: 24rpx;
  665. color: #B45309;
  666. margin-top: 8rpx;
  667. }
  668. .disc-sub-row {
  669. display: flex;
  670. margin-bottom: 16rpx;
  671. }
  672. .disc-sub-card {
  673. flex: 1;
  674. background: #fff;
  675. border-radius: 16rpx;
  676. padding: 24rpx;
  677. display: flex;
  678. flex-direction: column;
  679. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  680. }
  681. .disc-sub-card:first-child {
  682. margin-right: 8rpx;
  683. }
  684. .disc-sub-card:last-child {
  685. margin-left: 8rpx;
  686. }
  687. .disc-sub-label {
  688. font-size: 24rpx;
  689. color: #999;
  690. }
  691. .disc-sub-value {
  692. font-size: 36rpx;
  693. font-weight: bold;
  694. color: #333;
  695. margin-top: 8rpx;
  696. }
  697. .disc-sub-action {
  698. font-size: 22rpx;
  699. color: #F59E0B;
  700. margin-top: 8rpx;
  701. }
  702. /* 孩子财富卡 */
  703. .child-wealth-card {
  704. display: flex;
  705. background: #fff;
  706. border-radius: 20rpx;
  707. padding: 24rpx 0;
  708. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  709. }
  710. .child-wealth-item {
  711. flex: 1;
  712. display: flex;
  713. flex-direction: column;
  714. align-items: center;
  715. }
  716. .child-wealth-icon {
  717. font-size: 44rpx;
  718. }
  719. .child-wealth-value {
  720. font-size: 36rpx;
  721. font-weight: bold;
  722. color: #F59E0B;
  723. margin-top: 8rpx;
  724. }
  725. .child-wealth-label {
  726. font-size: 22rpx;
  727. color: #999;
  728. margin-top: 4rpx;
  729. }
  730. .child-trend {
  731. margin-top: 16rpx;
  732. background: #fff;
  733. border-radius: 20rpx;
  734. padding: 24rpx;
  735. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  736. }
  737. .child-trend-title {
  738. font-size: 26rpx;
  739. color: #333;
  740. font-weight: bold;
  741. }
  742. .child-trend-bars {
  743. display: flex;
  744. align-items: flex-end;
  745. height: 120rpx;
  746. margin-top: 16rpx;
  747. }
  748. .trend-bar {
  749. flex: 1;
  750. margin: 0 6rpx;
  751. background: linear-gradient(180deg, #FBBF24, #F59E0B);
  752. border-radius: 6rpx 6rpx 0 0;
  753. }
  754. .child-trend-days {
  755. display: flex;
  756. margin-top: 8rpx;
  757. }
  758. .trend-day {
  759. flex: 1;
  760. text-align: center;
  761. font-size: 20rpx;
  762. color: #999;
  763. }
  764. /* 邀请码复制条 */
  765. .referral-code-bar {
  766. display: flex;
  767. align-items: center;
  768. background: #fff;
  769. margin-top: 16rpx;
  770. border-radius: 16rpx;
  771. padding: 24rpx 30rpx;
  772. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  773. }
  774. .referral-code-label {
  775. font-size: 26rpx;
  776. color: #666;
  777. margin-right: 16rpx;
  778. }
  779. .referral-code-value {
  780. flex: 1;
  781. font-size: 30rpx;
  782. font-weight: bold;
  783. color: #F59E0B;
  784. letter-spacing: 2rpx;
  785. }
  786. .referral-code-copy {
  787. font-size: 24rpx;
  788. color: #fff;
  789. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  790. padding: 8rpx 24rpx;
  791. border-radius: 20rpx;
  792. }
  793. /* 服务入口 */
  794. .service-grid {
  795. display: flex;
  796. flex-wrap: wrap;
  797. background: #fff;
  798. border-radius: 20rpx;
  799. padding: 24rpx 16rpx;
  800. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  801. }
  802. .service-item {
  803. width: 25%;
  804. display: flex;
  805. flex-direction: column;
  806. align-items: center;
  807. padding: 16rpx 0;
  808. }
  809. .service-icon-wrap {
  810. width: 88rpx;
  811. height: 88rpx;
  812. border-radius: 24rpx;
  813. background: #FFF7ED;
  814. display: flex;
  815. align-items: center;
  816. justify-content: center;
  817. margin-bottom: 8rpx;
  818. }
  819. .service-icon {
  820. font-size: 40rpx;
  821. }
  822. .service-label {
  823. font-size: 22rpx;
  824. color: #666;
  825. }
  826. .logout-item {
  827. color: #EF4444;
  828. }
  829. /* 未登录 */
  830. .login-guide-section {
  831. display: flex;
  832. flex-direction: column;
  833. align-items: center;
  834. padding: 60rpx 40rpx;
  835. margin: 30rpx;
  836. background: #fff;
  837. border-radius: 20rpx;
  838. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  839. }
  840. .login-guide-text {
  841. font-size: 26rpx;
  842. color: #999;
  843. text-align: center;
  844. margin-bottom: 30rpx;
  845. line-height: 1.6;
  846. }
  847. .login-guide-section .login-btn {
  848. width: 60%;
  849. height: 80rpx;
  850. line-height: 80rpx;
  851. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  852. color: #fff;
  853. font-size: 30rpx;
  854. font-weight: bold;
  855. border-radius: 40rpx;
  856. text-align: center;
  857. border: none;
  858. }
  859. .login-prompt .login-btn::after {
  860. border: none;
  861. }
  862. /* 品牌定位语 */
  863. .brand-strap {
  864. margin: 16rpx 30rpx 0;
  865. padding: 20rpx 28rpx;
  866. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
  867. border-radius: 16rpx;
  868. border-left: 4rpx solid #F59E0B;
  869. }
  870. .brand-strap-text {
  871. font-size: 26rpx;
  872. color: #92400E;
  873. font-weight: 500;
  874. }
  875. /* 商城精选预览 */
  876. .product-scroll {
  877. white-space: nowrap;
  878. padding: 0 30rpx;
  879. }
  880. .product-list {
  881. display: inline-flex;
  882. gap: 20rpx;
  883. }
  884. .product-card {
  885. width: 220rpx;
  886. flex-shrink: 0;
  887. background: #fff;
  888. border-radius: 16rpx;
  889. overflow: hidden;
  890. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  891. }
  892. .product-img {
  893. width: 220rpx;
  894. height: 220rpx;
  895. background: #f5f5f5;
  896. }
  897. .product-name {
  898. display: block;
  899. padding: 12rpx 12rpx 4rpx;
  900. font-size: 24rpx;
  901. color: #333;
  902. overflow: hidden;
  903. text-overflow: ellipsis;
  904. white-space: nowrap;
  905. }
  906. .product-price {
  907. display: block;
  908. padding: 4rpx 12rpx 12rpx;
  909. font-size: 26rpx;
  910. font-weight: bold;
  911. color: #F59E0B;
  912. }
  913. </style>
  914. /* 月度引导语 */
  915. .monthly-guidance {
  916. margin: 0 30rpx 20rpx;
  917. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.1));
  918. border-radius: 16rpx;
  919. padding: 20rpx 24rpx;
  920. display: flex;
  921. align-items: center;
  922. gap: 12rpx;
  923. }
  924. .guidance-icon { font-size: 32rpx; flex-shrink: 0; }
  925. .guidance-text { font-size: 26rpx; color: #F59E0B; font-weight: 500; }