index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. <template>
  2. <view class="container">
  3. <!-- TabTransition overlay -->
  4. <tab-transition v-if="showTabTransition" dimCode="wealth" />
  5. <!-- 未登录 -->
  6. <view v-if="!isLoggedIn" class="login-prompt">
  7. <view class="prompt-icon">👤</view>
  8. <text class="prompt-title">登录浠艾福</text>
  9. <text class="prompt-desc">登录后查看财富能量详情</text>
  10. <button class="login-btn" @click="goLogin">登录 / 注册</button>
  11. </view>
  12. <template v-else>
  13. <!-- 品牌头部 -->
  14. <PageBanner theme="wealth"
  15. tagline="利他创富 · 价值共享"
  16. quote="富足源于利他与坚持" />
  17. <!-- 退出切换按钮 -->
  18. <view class="exit-switch" v-if="isSwitchedChild" @click="exitSwitch">
  19. <text>🔄 退出切换</text>
  20. </view>
  21. <!-- 用户卡片 -->
  22. <view class="user-card" @click="goToProfile">
  23. <view class="avatar">👤</view>
  24. <view class="user-info">
  25. <text class="nickname">{{ nickname || '未设置昵称' }}</text>
  26. <text class="role">{{ role === 'parent' ? '家长模式' : (role === 'child' ? '孩子模式' : '成长规划师模式') }}</text>
  27. </view>
  28. <text class="card-arrow">›</text>
  29. </view>
  30. <!-- 切换按钮(家长模式 + 未切换状态) -->
  31. <view class="switch-section" v-if="role === 'parent' && !isSwitchedChild">
  32. <button class="btn-switch" @click="onSwitchMode">切换到孩子视角</button>
  33. </view>
  34. <!-- 财富子维度卡片 -->
  35. <view class="section">
  36. <view class="section-header">
  37. <text class="section-title">💎 财富子维度</text>
  38. </view>
  39. <!-- 家长版 -->
  40. <view class="sub-dim-grid" v-if="role === 'parent'">
  41. <view class="sub-dim-card" @click="goToIncome">
  42. <text class="sub-dim-score">{{ wealthIncome || '-' }}</text>
  43. <text class="sub-dim-label">金钱收入</text>
  44. <text class="sub-dim-desc">累计佣金</text>
  45. </view>
  46. <view class="sub-dim-card" @click="goToAchievements">
  47. <text class="sub-dim-score">{{ wealthAchievement || '-' }}</text>
  48. <text class="sub-dim-label">个人成就</text>
  49. <text class="sub-dim-desc">认证成就</text>
  50. </view>
  51. <view class="sub-dim-card" @click="goToNetwork">
  52. <text class="sub-dim-score">{{ wealthNetwork || '-' }}</text>
  53. <text class="sub-dim-label">资源网络</text>
  54. <text class="sub-dim-desc">推荐关系</text>
  55. </view>
  56. </view>
  57. <!-- 孩子版 -->
  58. <view class="sub-dim-grid" v-else>
  59. <view class="sub-dim-card" @click="childSubDimClick('education')">
  60. <text class="sub-dim-score">{{ wealthEducation || '-' }}</text>
  61. <text class="sub-dim-label">学业成绩</text>
  62. <text class="sub-dim-desc">测评综合</text>
  63. </view>
  64. <view class="sub-dim-card" @click="childSubDimClick('social')">
  65. <text class="sub-dim-score">{{ wealthSocial || '-' }}</text>
  66. <text class="sub-dim-label">社交筹码</text>
  67. <text class="sub-dim-desc">活动参与</text>
  68. </view>
  69. <view class="sub-dim-card" @click="childSubDimClick('points')">
  70. <text class="sub-dim-score">{{ wealthPoints || '-' }}</text>
  71. <text class="sub-dim-label">规则博弈</text>
  72. <text class="sub-dim-desc">积分效率</text>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 心的子维度(仅孩子) -->
  77. <view class="section" v-if="role !== 'parent'">
  78. <view class="section-header">
  79. <text class="section-title">🔥 心的子维度</text>
  80. </view>
  81. <view class="sub-dim-grid heart-sub-dim">
  82. <view class="sub-dim-card" @click="childSubDimClick('emotion')">
  83. <text class="sub-dim-score">{{ heartEmotionStable || '-' }}</text>
  84. <text class="sub-dim-label">情绪稳定</text>
  85. <text class="sub-dim-desc">EMI情绪管理</text>
  86. </view>
  87. <view class="sub-dim-card" @click="childSubDimClick('understanding')">
  88. <text class="sub-dim-score">{{ heartUnderstanding || '-' }}</text>
  89. <text class="sub-dim-label">理解包容</text>
  90. <text class="sub-dim-desc">共情+社交适应</text>
  91. </view>
  92. <view class="sub-dim-card" @click="childSubDimClick('legacy')">
  93. <text class="sub-dim-score">{{ heartLegacy || '-' }}</text>
  94. <text class="sub-dim-label">传承传递</text>
  95. <text class="sub-dim-desc">未来开放</text>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 财富数据(仅家长) -->
  100. <view class="section" v-if="role === 'parent'">
  101. <view class="section-header">
  102. <text class="section-title">💰 财富数据</text>
  103. </view>
  104. <view class="wealth-card">
  105. <view class="wealth-item">
  106. <text class="wealth-value">{{ wealthData.totalEarnings || 0 }}</text>
  107. <text class="wealth-label">累计收益</text>
  108. </view>
  109. <view class="wealth-divider"></view>
  110. <view class="wealth-item">
  111. <text class="wealth-value">{{ wealthData.availableAmount || 0 }}</text>
  112. <text class="wealth-label">可提现</text>
  113. </view>
  114. <view class="wealth-divider"></view>
  115. <view class="wealth-item">
  116. <text class="wealth-value">{{ wealthData.referralCount || 0 }}</text>
  117. <text class="wealth-label">邀请人数</text>
  118. </view>
  119. </view>
  120. <!-- 邀请码复制 -->
  121. <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
  122. <text class="referral-code-label">我的邀请码</text>
  123. <text class="referral-code-value">{{ wealthData.referralCode }}</text>
  124. <text class="referral-code-copy">复制</text>
  125. </view>
  126. </view>
  127. <!-- 增值服务入口 -->
  128. <view class="section">
  129. <view class="section-header">
  130. <text class="section-title">🚀 增值服务</text>
  131. </view>
  132. <view class="service-grid">
  133. <view class="service-item" @click="goToCheckin">
  134. <text class="service-icon">📝</text>
  135. <text class="service-label">记账打卡</text>
  136. </view>
  137. <view class="service-item" @click="goToInsurance">
  138. <text class="service-icon">🛡️</text>
  139. <text class="service-label">保单管理</text>
  140. </view>
  141. <view class="service-item" @click="goToCreator">
  142. <text class="service-icon">🎨</text>
  143. <text class="service-label">创客中心</text>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 商品推荐 -->
  148. <DimensionProductList
  149. v-if="isLoggedIn"
  150. dimensionCode="wealth"
  151. :familyId="activeChildId"
  152. title="为你推荐" />
  153. <!-- 底部菜单 -->
  154. <view class="menu-list">
  155. <view class="menu-item" @click="goToProfile">
  156. <text>👤 个人中心</text>
  157. <text class="arrow">›</text>
  158. </view>
  159. <view class="menu-item" @click="goToPointsLogs">
  160. <text>📊 积分记录</text>
  161. <text class="arrow">›</text>
  162. </view>
  163. <view class="menu-item" @click="goToPromotion">
  164. <text>📣 推广中心</text>
  165. <text class="arrow">›</text>
  166. </view>
  167. <view class="menu-item logout-item" @click="logout">
  168. <text>🚪 退出登录</text>
  169. <text class="arrow">›</text>
  170. </view>
  171. </view>
  172. </template>
  173. </view>
  174. </template>
  175. <script>
  176. import TabTransition from '../../components/tab-transition.vue'
  177. import PageBanner from '../../components/PageBanner.vue'
  178. import DimensionProductList from '../../components/DimensionProductList.vue'
  179. import {
  180. verifyPassword,
  181. getChildren,
  182. getWealthDetail,
  183. getReferralCode,
  184. getReferralSummary,
  185. getCommissionSummary
  186. } from '../../utils/api.js'
  187. export default {
  188. components: { TabTransition, PageBanner, DimensionProductList },
  189. data() {
  190. return {
  191. showTabTransition: true,
  192. role: 'parent',
  193. isSwitchedChild: false,
  194. nickname: '',
  195. // 五维评分
  196. bodyScore: 0,
  197. mindScore: 0,
  198. wisdomScore: 0,
  199. actionScore: 0,
  200. wealthScore: 0,
  201. // 心的子维度(仅孩子有真实数据)
  202. heartEmotionStable: null,
  203. heartUnderstanding: null,
  204. heartLegacy: null,
  205. // 子维度 - parent
  206. wealthIncome: null,
  207. wealthAchievement: null,
  208. wealthNetwork: null,
  209. // 子维度 - child
  210. wealthEducation: null,
  211. wealthSocial: null,
  212. wealthPoints: null,
  213. // 财富数据
  214. wealthData: {
  215. totalEarnings: 0,
  216. availableAmount: 0,
  217. referralCount: 0,
  218. referralCode: ''
  219. },
  220. children: []
  221. }
  222. },
  223. computed: {
  224. isLoggedIn() {
  225. return !!uni.getStorageSync('token')
  226. },
  227. activeChildId() {
  228. if (this.role === 'child') {
  229. return uni.getStorageSync('currentChildId')
  230. }
  231. return ''
  232. }
  233. },
  234. onShow() {
  235. this.showTabTransition = true
  236. if (!uni.getStorageSync('token')) {
  237. this._watchPageReady()
  238. return
  239. }
  240. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  241. if (currentRole === 'teacher') {
  242. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  243. return
  244. }
  245. this.role = currentRole
  246. this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
  247. var userInfo = uni.getStorageSync('userInfo')
  248. this.nickname = (userInfo && userInfo.nickname) || ''
  249. this.loadChildren()
  250. this.loadWealthDetail()
  251. this.loadWealthData()
  252. this._watchPageReady()
  253. },
  254. methods: {
  255. goLogin() {
  256. uni.navigateTo({ url: '/pages/login/login' })
  257. },
  258. _watchPageReady() {
  259. var self = this
  260. this.$nextTick(function() {
  261. self.showTabTransition = false
  262. })
  263. setTimeout(function() {
  264. self.showTabTransition = false
  265. }, 2000)
  266. },
  267. async loadChildren() {
  268. try {
  269. var res = await getChildren()
  270. this.children = res.data || []
  271. } catch (e) {
  272. console.error('获取孩子列表失败', e)
  273. }
  274. },
  275. async loadWealthDetail() {
  276. var memberId = null
  277. var memberType = this.role
  278. if (this.role === 'child') {
  279. memberId = uni.getStorageSync('currentChildId')
  280. if (!memberId && this.children.length > 0) {
  281. memberId = this.children[0].id
  282. }
  283. } else {
  284. memberId = uni.getStorageSync('userId')
  285. }
  286. if (!memberId) return
  287. try {
  288. var res = await getWealthDetail(memberId, memberType)
  289. if (res && res.data) {
  290. var d = res.data
  291. this.wealthScore = d.wealthScore || 0
  292. if (memberType === 'parent') {
  293. this.wealthIncome = d.wealthIncome
  294. this.wealthAchievement = d.wealthAchievement
  295. this.wealthNetwork = d.wealthNetwork
  296. } else {
  297. this.wealthEducation = d.wealthEducation
  298. this.wealthSocial = d.wealthSocial
  299. this.wealthPoints = d.wealthPoints
  300. this.heartEmotionStable = d.heartEmotionStable
  301. this.heartUnderstanding = d.heartUnderstanding
  302. this.heartLegacy = d.heartLegacy
  303. }
  304. }
  305. } catch (e) {
  306. console.error('获取富维度详情失败', e)
  307. }
  308. },
  309. async loadWealthData() {
  310. if (this.role !== 'parent') return
  311. try {
  312. var codeRes = await getReferralCode()
  313. if (codeRes && codeRes.code === 200 && codeRes.data) {
  314. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  315. }
  316. } catch (e) {
  317. console.error('获取邀请码失败', e)
  318. }
  319. try {
  320. var summaryRes = await getReferralSummary()
  321. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  322. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  323. }
  324. } catch (e) {
  325. console.error('获取邀请统计失败', e)
  326. }
  327. try {
  328. var commissionRes = await getCommissionSummary()
  329. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  330. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  331. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  332. }
  333. } catch (e) {
  334. console.error('获取佣金统计失败', e)
  335. }
  336. },
  337. copyReferralCode() {
  338. if (!this.wealthData.referralCode) return
  339. uni.setClipboardData({
  340. data: this.wealthData.referralCode,
  341. success: function() {
  342. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  343. }
  344. })
  345. },
  346. onSwitchMode() {
  347. if (this.role === 'child') {
  348. this.exitSwitch()
  349. return
  350. }
  351. // parent → switch to child
  352. if (this.children.length === 0) {
  353. this.loadChildren()
  354. if (this.children.length === 0) {
  355. uni.showModal({
  356. title: '提示',
  357. content: '您还没有添加孩子,是否现在去添加?',
  358. success: function(res) {
  359. if (res.confirm) {
  360. uni.navigateTo({ url: '/pages/profile/create-child' })
  361. }
  362. }
  363. })
  364. return
  365. }
  366. }
  367. if (this.children.length === 1) {
  368. this.$store.commit('switchToChild', this.children[0].id)
  369. this.role = 'child'
  370. this.isSwitchedChild = true
  371. uni.showToast({ title: '已切换为孩子模式', icon: 'success' })
  372. return
  373. }
  374. var self = this
  375. uni.showActionSheet({
  376. itemList: this.children.map(function(c) { return c.nickname }),
  377. success: function(res) {
  378. var selectedChild = self.children[res.tapIndex]
  379. self.$store.commit('switchToChild', selectedChild.id)
  380. self.role = 'child'
  381. self.isSwitchedChild = true
  382. uni.showToast({ title: '已切换为' + selectedChild.nickname + '模式', icon: 'success' })
  383. }
  384. })
  385. },
  386. exitSwitch() {
  387. if (!this.isSwitchedChild) return
  388. var self = this
  389. uni.showModal({
  390. title: '退出切换',
  391. content: '请输入家长密码以确认退出',
  392. editable: true,
  393. success: function(res) {
  394. if (res.confirm && res.content) {
  395. verifyPassword(res.content).then(function(result) {
  396. if (result.code === 200) {
  397. uni.removeStorageSync('isSwitchedChild')
  398. uni.removeStorageSync('currentChildId')
  399. self.isSwitchedChild = false
  400. self.role = 'parent'
  401. if (self.$store && self.$store.commit) {
  402. self.$store.commit('switchBackToParent')
  403. }
  404. uni.showToast({ title: '已退出切换', icon: 'success' })
  405. setTimeout(function() {
  406. uni.reLaunch({ url: '/pages/index/index' })
  407. }, 1000)
  408. } else {
  409. uni.showToast({ title: '密码错误', icon: 'none' })
  410. }
  411. }).catch(function() {
  412. uni.showToast({ title: '验证失败', icon: 'none' })
  413. })
  414. }
  415. }
  416. })
  417. },
  418. logout() {
  419. uni.showModal({
  420. title: '退出登录',
  421. content: '确定要退出登录吗?',
  422. success: function(res) {
  423. if (res.confirm) {
  424. uni.clearStorageSync()
  425. uni.reLaunch({ url: '/pages/login/login' })
  426. }
  427. }
  428. })
  429. },
  430. goToProfile() {
  431. uni.navigateTo({ url: '/pages/profile/profile' })
  432. },
  433. goToCheckin() {
  434. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  435. },
  436. goToInsurance() {
  437. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  438. },
  439. goToCreator() {
  440. uni.navigateTo({ url: '/pages/promotion/index' })
  441. },
  442. goToPointsLogs() {
  443. uni.navigateTo({ url: '/pages/points/points' })
  444. },
  445. goToPromotion() {
  446. uni.navigateTo({ url: '/pages/promotion/index' })
  447. },
  448. goToIncome() {
  449. uni.navigateTo({ url: '/pages/promotion/commission' })
  450. },
  451. goToAchievements() {
  452. uni.navigateTo({ url: '/pages/rewards/badge' })
  453. },
  454. goToNetwork() {
  455. uni.navigateTo({ url: '/pages/promotion/team' })
  456. },
  457. childSubDimClick(key) {
  458. var routes = {
  459. education: '/pages/assessment/results',
  460. social: '/pages/activity/index',
  461. points: '/pages/points/mall',
  462. emotion: '/pages/mind-detail/emotion-report',
  463. understanding: '/pages/mind-detail/emotion-trend',
  464. legacy: '/pages/wishes/index'
  465. }
  466. var url = routes[key]
  467. if (url) {
  468. uni.navigateTo({ url: url })
  469. }
  470. }
  471. }
  472. }
  473. </script>
  474. <style scoped>
  475. .container {
  476. min-height: 100vh;
  477. background: #f5f7fa;
  478. padding-bottom: 120rpx;
  479. }
  480. .section {
  481. margin: 20rpx 30rpx;
  482. }
  483. .section-header {
  484. display: flex;
  485. justify-content: space-between;
  486. align-items: center;
  487. margin-bottom: 20rpx;
  488. }
  489. .section-title {
  490. font-size: 30rpx;
  491. font-weight: bold;
  492. color: #333;
  493. }
  494. .section-more {
  495. font-size: 24rpx;
  496. color: #999;
  497. }
  498. /* 用户卡片 */
  499. .user-card {
  500. display: flex;
  501. align-items: center;
  502. background: #fff;
  503. margin: 0 30rpx 20rpx;
  504. border-radius: 20rpx;
  505. padding: 30rpx;
  506. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  507. }
  508. .avatar {
  509. width: 100rpx;
  510. height: 100rpx;
  511. border-radius: 50%;
  512. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  513. display: flex;
  514. align-items: center;
  515. justify-content: center;
  516. font-size: 48rpx;
  517. margin-right: 24rpx;
  518. flex-shrink: 0;
  519. }
  520. .user-info {
  521. flex: 1;
  522. }
  523. .nickname {
  524. font-size: 34rpx;
  525. font-weight: bold;
  526. color: #333;
  527. margin-bottom: 8rpx;
  528. }
  529. .role {
  530. font-size: 24rpx;
  531. color: #999;
  532. }
  533. .card-arrow {
  534. color: #ccc;
  535. font-size: 40rpx;
  536. margin-left: 16rpx;
  537. }
  538. /* 切换区域 */
  539. .switch-section {
  540. margin: 0 30rpx 20rpx;
  541. }
  542. .btn-switch {
  543. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  544. color: #fff;
  545. font-size: 26rpx;
  546. padding: 16rpx 0;
  547. border-radius: 40rpx;
  548. text-align: center;
  549. line-height: 1.5;
  550. }
  551. /* 财富数据卡片 */
  552. .wealth-card {
  553. background: #fff;
  554. border-radius: 20rpx;
  555. padding: 30rpx 20rpx;
  556. display: flex;
  557. align-items: center;
  558. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  559. }
  560. .wealth-item {
  561. flex: 1;
  562. display: flex;
  563. flex-direction: column;
  564. align-items: center;
  565. }
  566. .wealth-value {
  567. font-size: 40rpx;
  568. font-weight: bold;
  569. color: #F97316;
  570. }
  571. .wealth-label {
  572. font-size: 24rpx;
  573. color: #999;
  574. margin-top: 8rpx;
  575. }
  576. .wealth-divider {
  577. width: 1rpx;
  578. height: 60rpx;
  579. background: #f0f0f0;
  580. }
  581. /* 邀请码复制条 */
  582. .referral-code-bar {
  583. display: flex;
  584. align-items: center;
  585. background: #fff;
  586. margin-top: 16rpx;
  587. border-radius: 16rpx;
  588. padding: 24rpx 30rpx;
  589. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  590. }
  591. .referral-code-label {
  592. font-size: 26rpx;
  593. color: #666;
  594. margin-right: 16rpx;
  595. }
  596. .referral-code-value {
  597. flex: 1;
  598. font-size: 30rpx;
  599. font-weight: bold;
  600. color: #F59E0B;
  601. letter-spacing: 2rpx;
  602. }
  603. .referral-code-copy {
  604. font-size: 24rpx;
  605. color: #fff;
  606. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  607. padding: 8rpx 24rpx;
  608. border-radius: 20rpx;
  609. }
  610. /* 三子维度卡片 */
  611. .sub-dim-grid {
  612. display: flex;
  613. }
  614. .sub-dim-card {
  615. flex: 1;
  616. margin-right: 16rpx;
  617. background: #fff;
  618. border-radius: 16rpx;
  619. padding: 24rpx 16rpx;
  620. display: flex;
  621. flex-direction: column;
  622. align-items: center;
  623. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  624. }
  625. .sub-dim-card:last-child {
  626. margin-right: 0;
  627. }
  628. .sub-dim-score {
  629. font-size: 48rpx;
  630. font-weight: bold;
  631. color: #F59E0B;
  632. }
  633. .heart-sub-dim .sub-dim-score {
  634. color: #FF6B9D;
  635. }
  636. .sub-dim-label {
  637. font-size: 24rpx;
  638. color: #333;
  639. margin-top: 8rpx;
  640. font-weight: 500;
  641. }
  642. .sub-dim-desc {
  643. font-size: 20rpx;
  644. color: #999;
  645. margin-top: 4rpx;
  646. }
  647. /* 增值服务 */
  648. .service-grid {
  649. display: flex;
  650. flex-wrap: wrap;
  651. background: #fff;
  652. border-radius: 20rpx;
  653. padding: 24rpx 16rpx;
  654. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  655. }
  656. .service-item {
  657. width: 33.33%;
  658. display: flex;
  659. flex-direction: column;
  660. align-items: center;
  661. padding: 16rpx 0;
  662. }
  663. .service-icon {
  664. font-size: 48rpx;
  665. margin-bottom: 8rpx;
  666. }
  667. .service-label {
  668. font-size: 22rpx;
  669. color: #666;
  670. }
  671. /* 底部菜单 */
  672. .menu-list {
  673. margin: 30rpx 30rpx 0;
  674. background: #fff;
  675. border-radius: 16rpx;
  676. }
  677. .menu-item {
  678. padding: 30rpx;
  679. border-bottom: 1rpx solid #f0f0f0;
  680. display: flex;
  681. justify-content: space-between;
  682. font-size: 28rpx;
  683. }
  684. .menu-item:last-child {
  685. border-bottom: none;
  686. }
  687. .arrow {
  688. color: #ccc;
  689. font-size: 32rpx;
  690. }
  691. .logout-item {
  692. color: #EF4444;
  693. }
  694. /* 未登录 */
  695. .login-prompt {
  696. display: flex;
  697. flex-direction: column;
  698. align-items: center;
  699. justify-content: center;
  700. min-height: 80vh;
  701. padding: 60rpx;
  702. }
  703. .prompt-icon {
  704. font-size: 120rpx;
  705. margin-bottom: 30rpx;
  706. width: 160rpx;
  707. height: 160rpx;
  708. line-height: 160rpx;
  709. text-align: center;
  710. background: #f5f5f5;
  711. border-radius: 50%;
  712. }
  713. .prompt-title {
  714. font-size: 36rpx;
  715. font-weight: bold;
  716. color: #333;
  717. margin-bottom: 16rpx;
  718. }
  719. .prompt-desc {
  720. font-size: 26rpx;
  721. color: #999;
  722. text-align: center;
  723. margin-bottom: 40rpx;
  724. }
  725. .login-prompt .login-btn {
  726. width: 60%;
  727. height: 80rpx;
  728. line-height: 80rpx;
  729. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  730. color: #fff;
  731. font-size: 30rpx;
  732. font-weight: bold;
  733. border-radius: 40rpx;
  734. text-align: center;
  735. border: none;
  736. }
  737. .login-prompt .login-btn::after {
  738. border: none;
  739. }
  740. /* 退出切换 */
  741. .exit-switch {
  742. margin: 20rpx 30rpx 0;
  743. padding: 16rpx 24rpx;
  744. background: #FEF3C7;
  745. border-radius: 12rpx;
  746. text-align: center;
  747. font-size: 26rpx;
  748. color: #92400E;
  749. }
  750. </style>