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