index.vue 23 KB

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