index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  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. { icon: '💎', label: '家庭CF值', action: 'goToFamilyCf' }
  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. /** 每月引导语 */
  291. monthlyGuidance: function() {
  292. var month = new Date().getMonth()
  293. var messages = [
  294. '一月:理财从记账开始,养习惯',
  295. '二月:新年规划,梳理家庭收支',
  296. '三月:春耕时节,播种财富种子',
  297. '四月:清明踏青,规划家庭支出',
  298. '五月:劳动节后,复盘收支状况',
  299. '六月:年中复盘,调整财富目标',
  300. '七月:暑期规划,优化家庭消费',
  301. '八月:开学季,教育专项规划',
  302. '九月:金秋收获,检视推广收益',
  303. '十月:国庆消费,理性理财',
  304. '十一月:年终冲刺,盘点年度收益',
  305. '十二月:年度总结,规划来年财富'
  306. ]
  307. return messages[month] || messages[0]
  308. },
  309. methods: {
  310. onFamilyMemberSelect(member) {
  311. this.selectedMemberId = member.id
  312. },
  313. loadFamilyMembersVisible() {
  314. var self = this
  315. getVisibleFamilyMembers().then(function(res) {
  316. self.familyMembersVisible = res.data || []
  317. }).catch(function(e) {
  318. console.log('获取可见家庭成员失败', e)
  319. self.familyMembersVisible = []
  320. })
  321. },
  322. goLogin() {
  323. uni.navigateTo({ url: '/pages/login/login' })
  324. },
  325. _watchPageReady() {
  326. var self = this
  327. this.$nextTick(function() {
  328. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  329. })
  330. },
  331. async loadChildren() {
  332. try {
  333. var res = await getChildren()
  334. this.children = res.data || []
  335. } catch (e) {
  336. console.error('获取孩子列表失败', e)
  337. }
  338. },
  339. async loadWealthDetail() {
  340. var memberId = null
  341. var memberType = this.role
  342. if (this.role === 'child') {
  343. memberId = uni.getStorageSync('currentChildId')
  344. if (!memberId && this.children.length > 0) {
  345. memberId = this.children[0].id
  346. }
  347. } else {
  348. memberId = uni.getStorageSync('userId')
  349. }
  350. if (!memberId) return
  351. try {
  352. var res = await getWealthDetail(memberId, memberType)
  353. if (res && res.data) {
  354. var d = res.data
  355. this.wealthScore = d.wealthScore || 0
  356. if (memberType === 'parent') {
  357. this.wealthIncome = d.wealthIncome
  358. this.wealthAchievement = d.wealthAchievement
  359. this.wealthNetwork = d.wealthNetwork
  360. } else {
  361. this.wealthEducation = d.wealthEducation
  362. this.wealthSocial = d.wealthSocial
  363. this.wealthPoints = d.wealthPoints
  364. }
  365. // 身克富杠杆状态
  366. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  367. this.bodyWealthMessage = d.bodyWealthMessage || ''
  368. }
  369. } catch (e) {
  370. console.error('获取富维度详情失败', e)
  371. }
  372. },
  373. async loadWealthData() {
  374. if (this.role !== 'parent') return
  375. try {
  376. var codeRes = await getReferralCode()
  377. if (codeRes && codeRes.code === 200 && codeRes.data) {
  378. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  379. }
  380. } catch (e) {
  381. console.error('获取邀请码失败', e)
  382. }
  383. try {
  384. var summaryRes = await getReferralSummary()
  385. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  386. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  387. }
  388. } catch (e) {
  389. console.error('获取邀请统计失败', e)
  390. }
  391. try {
  392. var commissionRes = await getCommissionSummary()
  393. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  394. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  395. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  396. }
  397. } catch (e) {
  398. console.error('获取佣金统计失败', e)
  399. }
  400. },
  401. copyReferralCode() {
  402. if (!this.wealthData.referralCode) return
  403. uni.setClipboardData({
  404. data: this.wealthData.referralCode,
  405. success: function() {
  406. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  407. }
  408. })
  409. },
  410. logout() {
  411. uni.showModal({
  412. title: '退出登录',
  413. content: '确定要退出登录吗?',
  414. success: function(res) {
  415. if (res.confirm) {
  416. uni.clearStorageSync()
  417. uni.reLaunch({ url: '/pages/login/login' })
  418. }
  419. }
  420. })
  421. },
  422. goToCheckin() {
  423. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  424. },
  425. goToInsurance() {
  426. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  427. },
  428. goToCreator() {
  429. uni.navigateTo({ url: '/pages/promotion/index' })
  430. },
  431. goToShop() {
  432. uni.navigateTo({ url: '/pages/shop/index/index' })
  433. },
  434. goToOrders() {
  435. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  436. },
  437. goToAfterSales() {
  438. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  439. },
  440. goToIncome() {
  441. uni.navigateTo({ url: '/pages/promotion/commission' })
  442. },
  443. goToFamilyCf() {
  444. uni.navigateTo({ url: '/pages/wealth-cf/index' })
  445. },
  446. goToAchievements() {
  447. uni.navigateTo({ url: '/pages/rewards/badge' })
  448. },
  449. goToNetwork() {
  450. uni.navigateTo({ url: '/pages/promotion/team' })
  451. },
  452. goToCart() {
  453. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  454. },
  455. loadGuestProducts() {
  456. var self = this
  457. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  458. if (res.code === 200 && res.data && res.data.records) {
  459. self.guestProducts = res.data.records.slice(0, 4)
  460. }
  461. }).catch(function() {})
  462. },
  463. goProductDetail(id) {
  464. uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
  465. },
  466. getImageUrl: function(path) {
  467. return config.API_BASE_URL + path
  468. },
  469. onServiceClick(action) {
  470. if (this[action]) {
  471. this[action]()
  472. }
  473. }
  474. }
  475. }
  476. </script>
  477. <style scoped>
  478. .container {
  479. min-height: 100vh;
  480. background: #f5f7fa;
  481. padding-bottom: 120rpx;
  482. }
  483. .section {
  484. margin: 20rpx 30rpx;
  485. }
  486. .section-header {
  487. display: flex;
  488. justify-content: space-between;
  489. align-items: center;
  490. margin-bottom: 20rpx;
  491. }
  492. .section-title {
  493. font-size: 30rpx;
  494. font-weight: bold;
  495. color: #333;
  496. }
  497. .section-more {
  498. font-size: 24rpx;
  499. color: #999;
  500. }
  501. /* 成长溪流 */
  502. .stream-section {
  503. background: #fff;
  504. border-radius: 20rpx;
  505. padding: 24rpx;
  506. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  507. }
  508. .stream-stages {
  509. display: flex;
  510. justify-content: space-between;
  511. margin-bottom: 20rpx;
  512. }
  513. .stage-card {
  514. flex: 1;
  515. margin: 0 8rpx;
  516. padding: 20rpx;
  517. border-radius: 16rpx;
  518. background: #F5F9FC;
  519. display: flex;
  520. flex-direction: column;
  521. align-items: center;
  522. }
  523. .stage-card.active {
  524. background: #FFF7ED;
  525. border: 2rpx solid #FBBF24;
  526. }
  527. .stage-icon {
  528. font-size: 44rpx;
  529. }
  530. .stage-name {
  531. font-size: 26rpx;
  532. font-weight: bold;
  533. color: #333;
  534. margin-top: 8rpx;
  535. }
  536. .stage-desc {
  537. font-size: 20rpx;
  538. color: #999;
  539. margin-top: 4rpx;
  540. }
  541. .stage-range {
  542. font-size: 20rpx;
  543. color: #F59E0B;
  544. margin-top: 4rpx;
  545. }
  546. .stream-water {
  547. height: 20rpx;
  548. border-radius: 10rpx;
  549. background: #FEF3C7;
  550. overflow: hidden;
  551. }
  552. .stream-water-fill {
  553. height: 100%;
  554. border-radius: 10rpx;
  555. background: linear-gradient(90deg, #F59E0B, #FBBF24);
  556. transition: width 0.8s ease;
  557. }
  558. .stream-percent {
  559. display: block;
  560. text-align: right;
  561. font-size: 22rpx;
  562. color: #F59E0B;
  563. margin-top: 8rpx;
  564. }
  565. .stream-tip {
  566. display: block;
  567. text-align: center;
  568. font-size: 24rpx;
  569. color: #92400E;
  570. margin-top: 12rpx;
  571. }
  572. /* 财富数据主卡 */
  573. .disc-card {
  574. background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  575. border-radius: 20rpx;
  576. padding: 30rpx;
  577. margin-bottom: 16rpx;
  578. display: flex;
  579. flex-direction: column;
  580. }
  581. .disc-label {
  582. font-size: 26rpx;
  583. color: #92400E;
  584. }
  585. .disc-value {
  586. font-size: 56rpx;
  587. font-weight: bold;
  588. color: #F59E0B;
  589. margin-top: 8rpx;
  590. }
  591. .disc-sub {
  592. font-size: 24rpx;
  593. color: #B45309;
  594. margin-top: 8rpx;
  595. }
  596. .disc-sub-row {
  597. display: flex;
  598. margin-bottom: 16rpx;
  599. }
  600. .disc-sub-card {
  601. flex: 1;
  602. background: #fff;
  603. border-radius: 16rpx;
  604. padding: 24rpx;
  605. display: flex;
  606. flex-direction: column;
  607. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  608. }
  609. .disc-sub-card:first-child {
  610. margin-right: 8rpx;
  611. }
  612. .disc-sub-card:last-child {
  613. margin-left: 8rpx;
  614. }
  615. .disc-sub-label {
  616. font-size: 24rpx;
  617. color: #999;
  618. }
  619. .disc-sub-value {
  620. font-size: 36rpx;
  621. font-weight: bold;
  622. color: #333;
  623. margin-top: 8rpx;
  624. }
  625. .disc-sub-action {
  626. font-size: 22rpx;
  627. color: #F59E0B;
  628. margin-top: 8rpx;
  629. }
  630. /* 孩子财富卡 */
  631. .child-wealth-card {
  632. display: flex;
  633. background: #fff;
  634. border-radius: 20rpx;
  635. padding: 24rpx 0;
  636. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  637. }
  638. .child-wealth-item {
  639. flex: 1;
  640. display: flex;
  641. flex-direction: column;
  642. align-items: center;
  643. }
  644. .child-wealth-icon {
  645. font-size: 44rpx;
  646. }
  647. .child-wealth-value {
  648. font-size: 36rpx;
  649. font-weight: bold;
  650. color: #F59E0B;
  651. margin-top: 8rpx;
  652. }
  653. .child-wealth-label {
  654. font-size: 22rpx;
  655. color: #999;
  656. margin-top: 4rpx;
  657. }
  658. .child-trend {
  659. margin-top: 16rpx;
  660. background: #fff;
  661. border-radius: 20rpx;
  662. padding: 24rpx;
  663. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  664. }
  665. .child-trend-title {
  666. font-size: 26rpx;
  667. color: #333;
  668. font-weight: bold;
  669. }
  670. .child-trend-bars {
  671. display: flex;
  672. align-items: flex-end;
  673. height: 120rpx;
  674. margin-top: 16rpx;
  675. }
  676. .trend-bar {
  677. flex: 1;
  678. margin: 0 6rpx;
  679. background: linear-gradient(180deg, #FBBF24, #F59E0B);
  680. border-radius: 6rpx 6rpx 0 0;
  681. }
  682. .child-trend-days {
  683. display: flex;
  684. margin-top: 8rpx;
  685. }
  686. .trend-day {
  687. flex: 1;
  688. text-align: center;
  689. font-size: 20rpx;
  690. color: #999;
  691. }
  692. /* 邀请码复制条 */
  693. .referral-code-bar {
  694. display: flex;
  695. align-items: center;
  696. background: #fff;
  697. margin-top: 16rpx;
  698. border-radius: 16rpx;
  699. padding: 24rpx 30rpx;
  700. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  701. }
  702. .referral-code-label {
  703. font-size: 26rpx;
  704. color: #666;
  705. margin-right: 16rpx;
  706. }
  707. .referral-code-value {
  708. flex: 1;
  709. font-size: 30rpx;
  710. font-weight: bold;
  711. color: #F59E0B;
  712. letter-spacing: 2rpx;
  713. }
  714. .referral-code-copy {
  715. font-size: 24rpx;
  716. color: #fff;
  717. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  718. padding: 8rpx 24rpx;
  719. border-radius: 20rpx;
  720. }
  721. /* 服务入口 */
  722. .service-grid {
  723. display: flex;
  724. flex-wrap: wrap;
  725. background: #fff;
  726. border-radius: 20rpx;
  727. padding: 24rpx 16rpx;
  728. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  729. }
  730. .service-item {
  731. width: 25%;
  732. display: flex;
  733. flex-direction: column;
  734. align-items: center;
  735. padding: 16rpx 0;
  736. }
  737. .service-icon-wrap {
  738. width: 88rpx;
  739. height: 88rpx;
  740. border-radius: 24rpx;
  741. background: #FFF7ED;
  742. display: flex;
  743. align-items: center;
  744. justify-content: center;
  745. margin-bottom: 8rpx;
  746. }
  747. .service-icon {
  748. font-size: 40rpx;
  749. }
  750. .service-label {
  751. font-size: 22rpx;
  752. color: #666;
  753. }
  754. .logout-item {
  755. color: #EF4444;
  756. }
  757. /* 未登录 */
  758. .login-guide-section {
  759. display: flex;
  760. flex-direction: column;
  761. align-items: center;
  762. padding: 60rpx 40rpx;
  763. margin: 30rpx;
  764. background: #fff;
  765. border-radius: 20rpx;
  766. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  767. }
  768. .login-guide-text {
  769. font-size: 26rpx;
  770. color: #999;
  771. text-align: center;
  772. margin-bottom: 30rpx;
  773. line-height: 1.6;
  774. }
  775. .login-guide-section .login-btn {
  776. width: 60%;
  777. height: 80rpx;
  778. line-height: 80rpx;
  779. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  780. color: #fff;
  781. font-size: 30rpx;
  782. font-weight: bold;
  783. border-radius: 40rpx;
  784. text-align: center;
  785. border: none;
  786. }
  787. .login-prompt .login-btn::after {
  788. border: none;
  789. }
  790. /* 品牌定位语 */
  791. .brand-strap {
  792. margin: 16rpx 30rpx 0;
  793. padding: 20rpx 28rpx;
  794. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
  795. border-radius: 16rpx;
  796. border-left: 4rpx solid #F59E0B;
  797. }
  798. .brand-strap-text {
  799. font-size: 26rpx;
  800. color: #92400E;
  801. font-weight: 500;
  802. }
  803. /* 商城精选预览 */
  804. .product-scroll {
  805. white-space: nowrap;
  806. padding: 0 30rpx;
  807. }
  808. .product-list {
  809. display: inline-flex;
  810. gap: 20rpx;
  811. }
  812. .product-card {
  813. width: 220rpx;
  814. flex-shrink: 0;
  815. background: #fff;
  816. border-radius: 16rpx;
  817. overflow: hidden;
  818. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  819. }
  820. .product-img {
  821. width: 220rpx;
  822. height: 220rpx;
  823. background: #f5f5f5;
  824. }
  825. .product-name {
  826. display: block;
  827. padding: 12rpx 12rpx 4rpx;
  828. font-size: 24rpx;
  829. color: #333;
  830. overflow: hidden;
  831. text-overflow: ellipsis;
  832. white-space: nowrap;
  833. }
  834. .product-price {
  835. display: block;
  836. padding: 4rpx 12rpx 12rpx;
  837. font-size: 26rpx;
  838. font-weight: bold;
  839. color: #F59E0B;
  840. }
  841. </style>
  842. /* 月度引导语 */
  843. .monthly-guidance {
  844. margin: 0 30rpx 20rpx;
  845. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.1));
  846. border-radius: 16rpx;
  847. padding: 20rpx 24rpx;
  848. display: flex;
  849. align-items: center;
  850. gap: 12rpx;
  851. }
  852. .guidance-icon { font-size: 32rpx; flex-shrink: 0; }
  853. .guidance-text { font-size: 26rpx; color: #F59E0B; font-weight: 500; }