index.vue 27 KB

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