index.vue 24 KB

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