index.vue 22 KB

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