index.vue 27 KB

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