index.vue 20 KB

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