index.vue 23 KB

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