index.vue 24 KB

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