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. <!-- 已切孩子态:点击"退出切换"回到家长模式 -->
  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. role: 'parent',
  194. isSwitchedChild: false,
  195. nickname: '',
  196. // 五维评分
  197. bodyScore: 0,
  198. mindScore: 0,
  199. wisdomScore: 0,
  200. actionScore: 0,
  201. wealthScore: 0,
  202. // 心的子维度(仅孩子有真实数据)
  203. heartEmotionStable: null,
  204. heartUnderstanding: null,
  205. heartLegacy: null,
  206. // 子维度 - parent
  207. wealthIncome: null,
  208. wealthAchievement: null,
  209. wealthNetwork: null,
  210. // 子维度 - child
  211. wealthEducation: null,
  212. wealthSocial: null,
  213. wealthPoints: null,
  214. // 财富数据
  215. wealthData: {
  216. totalEarnings: 0,
  217. availableAmount: 0,
  218. referralCount: 0,
  219. referralCode: ''
  220. },
  221. children: []
  222. }
  223. },
  224. computed: {
  225. isLoggedIn() {
  226. return !!uni.getStorageSync('token')
  227. },
  228. activeChildId() {
  229. if (this.role === 'child') {
  230. return uni.getStorageSync('currentChildId')
  231. }
  232. return ''
  233. }
  234. },
  235. onShow() {
  236. this.showTabTransition = true
  237. if (!uni.getStorageSync('token')) {
  238. this._watchPageReady()
  239. return
  240. }
  241. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  242. if (currentRole === 'teacher') {
  243. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  244. return
  245. }
  246. this.role = currentRole
  247. this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
  248. var userInfo = uni.getStorageSync('userInfo')
  249. this.nickname = (userInfo && userInfo.nickname) || ''
  250. this.loadChildren()
  251. this.loadWealthDetail()
  252. this.loadWealthData()
  253. this._watchPageReady()
  254. },
  255. methods: {
  256. goLogin() {
  257. uni.navigateTo({ url: '/pages/login/login' })
  258. },
  259. _watchPageReady() {
  260. var self = this
  261. this.$nextTick(function() {
  262. self.showTabTransition = false
  263. })
  264. setTimeout(function() {
  265. self.showTabTransition = false
  266. }, 2000)
  267. },
  268. async loadChildren() {
  269. try {
  270. var res = await getChildren()
  271. this.children = res.data || []
  272. } catch (e) {
  273. console.error('获取孩子列表失败', e)
  274. }
  275. },
  276. async loadWealthDetail() {
  277. var memberId = null
  278. var memberType = this.role
  279. if (this.role === 'child') {
  280. memberId = uni.getStorageSync('currentChildId')
  281. if (!memberId && this.children.length > 0) {
  282. memberId = this.children[0].id
  283. }
  284. } else {
  285. memberId = uni.getStorageSync('userId')
  286. }
  287. if (!memberId) return
  288. try {
  289. var res = await getWealthDetail(memberId, memberType)
  290. if (res && res.data) {
  291. var d = res.data
  292. this.wealthScore = d.wealthScore || 0
  293. if (memberType === 'parent') {
  294. this.wealthIncome = d.wealthIncome
  295. this.wealthAchievement = d.wealthAchievement
  296. this.wealthNetwork = d.wealthNetwork
  297. } else {
  298. this.wealthEducation = d.wealthEducation
  299. this.wealthSocial = d.wealthSocial
  300. this.wealthPoints = d.wealthPoints
  301. this.heartEmotionStable = d.heartEmotionStable
  302. this.heartUnderstanding = d.heartUnderstanding
  303. this.heartLegacy = d.heartLegacy
  304. }
  305. }
  306. } catch (e) {
  307. console.error('获取富维度详情失败', e)
  308. }
  309. },
  310. async loadWealthData() {
  311. if (this.role !== 'parent') return
  312. try {
  313. var codeRes = await getReferralCode()
  314. if (codeRes && codeRes.code === 200 && codeRes.data) {
  315. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  316. }
  317. } catch (e) {
  318. console.error('获取邀请码失败', e)
  319. }
  320. try {
  321. var summaryRes = await getReferralSummary()
  322. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  323. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  324. }
  325. } catch (e) {
  326. console.error('获取邀请统计失败', e)
  327. }
  328. try {
  329. var commissionRes = await getCommissionSummary()
  330. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  331. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  332. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  333. }
  334. } catch (e) {
  335. console.error('获取佣金统计失败', e)
  336. }
  337. },
  338. copyReferralCode() {
  339. if (!this.wealthData.referralCode) return
  340. uni.setClipboardData({
  341. data: this.wealthData.referralCode,
  342. success: function() {
  343. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  344. }
  345. })
  346. },
  347. onSwitchMode() {
  348. if (this.role === 'child') {
  349. this.exitSwitch()
  350. return
  351. }
  352. // parent → switch to child
  353. if (this.children.length === 0) {
  354. this.loadChildren()
  355. if (this.children.length === 0) {
  356. uni.showModal({
  357. title: '提示',
  358. content: '您还没有添加孩子,是否现在去添加?',
  359. success: function(res) {
  360. if (res.confirm) {
  361. uni.navigateTo({ url: '/pages/profile/create-child' })
  362. }
  363. }
  364. })
  365. return
  366. }
  367. }
  368. if (this.children.length === 1) {
  369. this.$store.commit('switchToChild', this.children[0].id)
  370. this.role = 'child'
  371. this.isSwitchedChild = true
  372. uni.showToast({ title: '已切换为孩子模式', icon: 'success' })
  373. return
  374. }
  375. var self = this
  376. uni.showActionSheet({
  377. itemList: this.children.map(function(c) { return c.nickname }),
  378. success: function(res) {
  379. var selectedChild = self.children[res.tapIndex]
  380. self.$store.commit('switchToChild', selectedChild.id)
  381. self.role = 'child'
  382. self.isSwitchedChild = true
  383. uni.showToast({ title: '已切换为' + selectedChild.nickname + '模式', icon: 'success' })
  384. }
  385. })
  386. },
  387. exitSwitch() {
  388. if (!this.isSwitchedChild) return
  389. var self = this
  390. uni.showModal({
  391. title: '退出切换',
  392. content: '请输入家长密码以确认退出',
  393. editable: true,
  394. success: function(res) {
  395. if (res.confirm && res.content) {
  396. verifyPassword(res.content).then(function(result) {
  397. if (result.code === 200) {
  398. uni.removeStorageSync('isSwitchedChild')
  399. uni.removeStorageSync('currentChildId')
  400. self.isSwitchedChild = false
  401. self.role = 'parent'
  402. if (self.$store && self.$store.commit) {
  403. self.$store.commit('switchBackToParent')
  404. }
  405. uni.showToast({ title: '已退出切换', icon: 'success' })
  406. setTimeout(function() {
  407. uni.reLaunch({ url: '/pages/index/index' })
  408. }, 1000)
  409. } else {
  410. uni.showToast({ title: '密码错误', icon: 'none' })
  411. }
  412. }).catch(function() {
  413. uni.showToast({ title: '验证失败', icon: 'none' })
  414. })
  415. }
  416. }
  417. })
  418. },
  419. logout() {
  420. uni.showModal({
  421. title: '退出登录',
  422. content: '确定要退出登录吗?',
  423. success: function(res) {
  424. if (res.confirm) {
  425. uni.clearStorageSync()
  426. uni.reLaunch({ url: '/pages/login/login' })
  427. }
  428. }
  429. })
  430. },
  431. goToProfile() {
  432. uni.navigateTo({ url: '/pages/profile/profile' })
  433. },
  434. goToCheckin() {
  435. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  436. },
  437. goToInsurance() {
  438. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  439. },
  440. goToCreator() {
  441. uni.navigateTo({ url: '/pages/promotion/index' })
  442. },
  443. goToPointsLogs() {
  444. uni.navigateTo({ url: '/pages/points/points' })
  445. },
  446. goToPromotion() {
  447. uni.navigateTo({ url: '/pages/promotion/index' })
  448. },
  449. goToIncome() {
  450. uni.navigateTo({ url: '/pages/promotion/commission' })
  451. },
  452. goToAchievements() {
  453. uni.navigateTo({ url: '/pages/rewards/badge' })
  454. },
  455. goToNetwork() {
  456. uni.navigateTo({ url: '/pages/promotion/team' })
  457. },
  458. childSubDimClick(key) {
  459. var routes = {
  460. education: '/pages/assessment/results',
  461. social: '/pages/activity/index',
  462. points: '/pages/points/mall',
  463. emotion: '/pages/mind-detail/emotion-report',
  464. understanding: '/pages/mind-detail/emotion-trend',
  465. legacy: '/pages/wishes/index'
  466. }
  467. var url = routes[key]
  468. if (url) {
  469. uni.navigateTo({ url: url })
  470. }
  471. }
  472. }
  473. }
  474. </script>
  475. <style scoped>
  476. .container {
  477. min-height: 100vh;
  478. background: #f5f7fa;
  479. padding-bottom: 120rpx;
  480. }
  481. .section {
  482. margin: 20rpx 30rpx;
  483. }
  484. .section-header {
  485. display: flex;
  486. justify-content: space-between;
  487. align-items: center;
  488. margin-bottom: 20rpx;
  489. }
  490. .section-title {
  491. font-size: 30rpx;
  492. font-weight: bold;
  493. color: #333;
  494. }
  495. .section-more {
  496. font-size: 24rpx;
  497. color: #999;
  498. }
  499. /* 用户卡片 */
  500. .user-card {
  501. display: flex;
  502. align-items: center;
  503. background: #fff;
  504. margin: 0 30rpx 20rpx;
  505. border-radius: 20rpx;
  506. padding: 30rpx;
  507. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  508. }
  509. .avatar {
  510. width: 100rpx;
  511. height: 100rpx;
  512. border-radius: 50%;
  513. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  514. display: flex;
  515. align-items: center;
  516. justify-content: center;
  517. font-size: 48rpx;
  518. margin-right: 24rpx;
  519. flex-shrink: 0;
  520. }
  521. .user-info {
  522. flex: 1;
  523. }
  524. .nickname {
  525. font-size: 34rpx;
  526. font-weight: bold;
  527. color: #333;
  528. margin-bottom: 8rpx;
  529. }
  530. .role {
  531. font-size: 24rpx;
  532. color: #999;
  533. }
  534. .card-arrow {
  535. color: #ccc;
  536. font-size: 40rpx;
  537. margin-left: 16rpx;
  538. }
  539. /* 切换区域 */
  540. .switch-section {
  541. margin: 0 30rpx 20rpx;
  542. }
  543. .btn-switch {
  544. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  545. color: #fff;
  546. font-size: 26rpx;
  547. padding: 16rpx 0;
  548. border-radius: 40rpx;
  549. text-align: center;
  550. line-height: 1.5;
  551. }
  552. /* 财富数据卡片 */
  553. .wealth-card {
  554. background: #fff;
  555. border-radius: 20rpx;
  556. padding: 30rpx 20rpx;
  557. display: flex;
  558. align-items: center;
  559. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  560. }
  561. .wealth-item {
  562. flex: 1;
  563. display: flex;
  564. flex-direction: column;
  565. align-items: center;
  566. }
  567. .wealth-value {
  568. font-size: 40rpx;
  569. font-weight: bold;
  570. color: #F97316;
  571. }
  572. .wealth-label {
  573. font-size: 24rpx;
  574. color: #999;
  575. margin-top: 8rpx;
  576. }
  577. .wealth-divider {
  578. width: 1rpx;
  579. height: 60rpx;
  580. background: #f0f0f0;
  581. }
  582. /* 邀请码复制条 */
  583. .referral-code-bar {
  584. display: flex;
  585. align-items: center;
  586. background: #fff;
  587. margin-top: 16rpx;
  588. border-radius: 16rpx;
  589. padding: 24rpx 30rpx;
  590. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  591. }
  592. .referral-code-label {
  593. font-size: 26rpx;
  594. color: #666;
  595. margin-right: 16rpx;
  596. }
  597. .referral-code-value {
  598. flex: 1;
  599. font-size: 30rpx;
  600. font-weight: bold;
  601. color: #F59E0B;
  602. letter-spacing: 2rpx;
  603. }
  604. .referral-code-copy {
  605. font-size: 24rpx;
  606. color: #fff;
  607. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  608. padding: 8rpx 24rpx;
  609. border-radius: 20rpx;
  610. }
  611. /* 三子维度卡片 */
  612. .sub-dim-grid {
  613. display: flex;
  614. }
  615. .sub-dim-card {
  616. flex: 1;
  617. margin-right: 16rpx;
  618. background: #fff;
  619. border-radius: 16rpx;
  620. padding: 24rpx 16rpx;
  621. display: flex;
  622. flex-direction: column;
  623. align-items: center;
  624. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  625. }
  626. .sub-dim-card:last-child {
  627. margin-right: 0;
  628. }
  629. .sub-dim-score {
  630. font-size: 48rpx;
  631. font-weight: bold;
  632. color: #F59E0B;
  633. }
  634. .heart-sub-dim .sub-dim-score {
  635. color: #FF6B9D;
  636. }
  637. .sub-dim-label {
  638. font-size: 24rpx;
  639. color: #333;
  640. margin-top: 8rpx;
  641. font-weight: 500;
  642. }
  643. .sub-dim-desc {
  644. font-size: 20rpx;
  645. color: #999;
  646. margin-top: 4rpx;
  647. }
  648. /* 增值服务 */
  649. .service-grid {
  650. display: flex;
  651. flex-wrap: wrap;
  652. background: #fff;
  653. border-radius: 20rpx;
  654. padding: 24rpx 16rpx;
  655. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  656. }
  657. .service-item {
  658. width: 33.33%;
  659. display: flex;
  660. flex-direction: column;
  661. align-items: center;
  662. padding: 16rpx 0;
  663. }
  664. .service-icon {
  665. font-size: 48rpx;
  666. margin-bottom: 8rpx;
  667. }
  668. .service-label {
  669. font-size: 22rpx;
  670. color: #666;
  671. }
  672. /* 底部菜单 */
  673. .menu-list {
  674. margin: 30rpx 30rpx 0;
  675. background: #fff;
  676. border-radius: 16rpx;
  677. }
  678. .menu-item {
  679. padding: 30rpx;
  680. border-bottom: 1rpx solid #f0f0f0;
  681. display: flex;
  682. justify-content: space-between;
  683. font-size: 28rpx;
  684. }
  685. .menu-item:last-child {
  686. border-bottom: none;
  687. }
  688. .arrow {
  689. color: #ccc;
  690. font-size: 32rpx;
  691. }
  692. .logout-item {
  693. color: #EF4444;
  694. }
  695. /* 未登录 */
  696. .login-prompt {
  697. display: flex;
  698. flex-direction: column;
  699. align-items: center;
  700. justify-content: center;
  701. min-height: 80vh;
  702. padding: 60rpx;
  703. }
  704. .prompt-icon {
  705. font-size: 120rpx;
  706. margin-bottom: 30rpx;
  707. width: 160rpx;
  708. height: 160rpx;
  709. line-height: 160rpx;
  710. text-align: center;
  711. background: #f5f5f5;
  712. border-radius: 50%;
  713. }
  714. .prompt-title {
  715. font-size: 36rpx;
  716. font-weight: bold;
  717. color: #333;
  718. margin-bottom: 16rpx;
  719. }
  720. .prompt-desc {
  721. font-size: 26rpx;
  722. color: #999;
  723. text-align: center;
  724. margin-bottom: 40rpx;
  725. }
  726. .login-prompt .login-btn {
  727. width: 60%;
  728. height: 80rpx;
  729. line-height: 80rpx;
  730. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  731. color: #fff;
  732. font-size: 30rpx;
  733. font-weight: bold;
  734. border-radius: 40rpx;
  735. text-align: center;
  736. border: none;
  737. }
  738. .login-prompt .login-btn::after {
  739. border: none;
  740. }
  741. /* 退出切换 */
  742. .exit-switch {
  743. margin: 20rpx 30rpx 0;
  744. padding: 16rpx 24rpx;
  745. background: #FEF3C7;
  746. border-radius: 12rpx;
  747. text-align: center;
  748. font-size: 26rpx;
  749. color: #92400E;
  750. }
  751. </style>