index.vue 23 KB

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