index.vue 22 KB

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