index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <template>
  2. <view class="container">
  3. <!-- TabTransition overlay -->
  4. <tab-transition v-if="showTabTransition" dimCode="wealth" ref="tabTransition" @close="showTabTransition = false" />
  5. <!-- 未登录时显示精简内容 -->
  6. <template v-if="!isLoggedIn">
  7. <PageBanner theme="wealth"
  8. tagline="利他创富 · 价值共享"
  9. quote="富足源于利他与坚持" />
  10. <!-- 商品推荐 -->
  11. <DimensionProductList
  12. dimensionCode="wealth"
  13. title="为你推荐" />
  14. <!-- 登录引导 -->
  15. <view class="login-guide-section">
  16. <text class="login-guide-text">登录后查看财富能量、推广收益、邀请返利等更多内容</text>
  17. <button class="login-btn" @click="goLogin">登录 / 注册</button>
  18. </view>
  19. </template>
  20. <template v-else>
  21. <!-- 品牌头部 -->
  22. <PageBanner theme="wealth"
  23. tagline="利他创富 · 价值共享"
  24. quote="富足源于利他与坚持" />
  25. <!-- 家庭成员选择条 -->
  26. <FamilyMemberStrip
  27. v-if="isLoggedIn"
  28. :members="familyMembersVisible"
  29. :selectedMemberId="selectedMemberId"
  30. @select="onFamilyMemberSelect" />
  31. <!-- 模式切换 / 退出切换入口(家长未切时显示"切换到孩子视角";已切时显示"退出切换") -->
  32. <!-- 已切孩子态:点击"退出切换"回到家长模式 -->
  33. <view v-if="isSwitchedChild" class="exit-switch" @click="exitSwitch">
  34. <text>🔄 退出切换</text>
  35. </view>
  36. <!-- 家长且未切孩子态:此处展示"切换到孩子视角",点击完成模式切换 -->
  37. <view v-else class="exit-switch" @click="onSwitchMode">
  38. <text>👶 切换到孩子视角</text>
  39. </view>
  40. <!-- 身克富杠杆警告 -->
  41. <body-wealth-alert
  42. :status="bodyWealthStatus"
  43. :message="bodyWealthMessage"
  44. :showTip="true" />
  45. <!-- 财富子维度卡片 -->
  46. <wealth-sub-scores
  47. :role="role"
  48. :income="wealthIncome"
  49. :achievement="wealthAchievement"
  50. :network="wealthNetwork"
  51. :education="wealthEducation"
  52. :social="wealthSocial"
  53. :points="wealthPoints" />
  54. <!-- 心的子维度(仅孩子) -->
  55. <view class="section" v-if="role !== 'parent'">
  56. <view class="section-header">
  57. <text class="section-title">🔥 心的子维度</text>
  58. </view>
  59. <view class="sub-dim-grid heart-sub-dim">
  60. <view class="sub-dim-card" @click="childSubDimClick('emotion')">
  61. <text class="sub-dim-score">{{ heartEmotionStable || '-' }}</text>
  62. <text class="sub-dim-label">情绪稳定</text>
  63. <text class="sub-dim-desc">EMI情绪管理</text>
  64. </view>
  65. <view class="sub-dim-card" @click="childSubDimClick('understanding')">
  66. <text class="sub-dim-score">{{ heartUnderstanding || '-' }}</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('legacy')">
  71. <text class="sub-dim-score">{{ heartLegacy || '-' }}</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="wealth-card">
  83. <view class="wealth-item">
  84. <text class="wealth-value">{{ wealthData.totalEarnings || 0 }}</text>
  85. <text class="wealth-label">累计收益</text>
  86. </view>
  87. <view class="wealth-divider"></view>
  88. <view class="wealth-item">
  89. <text class="wealth-value">{{ wealthData.availableAmount || 0 }}</text>
  90. <text class="wealth-label">可提现</text>
  91. </view>
  92. <view class="wealth-divider"></view>
  93. <view class="wealth-item">
  94. <text class="wealth-value">{{ wealthData.referralCount || 0 }}</text>
  95. <text class="wealth-label">邀请人数</text>
  96. </view>
  97. </view>
  98. <!-- 邀请码复制 -->
  99. <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
  100. <text class="referral-code-label">我的邀请码</text>
  101. <text class="referral-code-value">{{ wealthData.referralCode }}</text>
  102. <text class="referral-code-copy">复制</text>
  103. </view>
  104. </view>
  105. <!-- 增值服务入口 -->
  106. <view class="section">
  107. <view class="section-header">
  108. <text class="section-title">🚀 增值服务</text>
  109. </view>
  110. <view class="service-grid">
  111. <view class="service-item" @click="goToCheckin">
  112. <text class="service-icon">📝</text>
  113. <text class="service-label">记账打卡</text>
  114. </view>
  115. <view class="service-item" @click="goToInsurance">
  116. <text class="service-icon">🛡️</text>
  117. <text class="service-label">保单管理</text>
  118. </view>
  119. <view class="service-item" @click="goToCreator">
  120. <text class="service-icon">🎨</text>
  121. <text class="service-label">创客中心</text>
  122. </view>
  123. </view>
  124. </view>
  125. <!-- 消费中心 -->
  126. <view class="section">
  127. <view class="section-header">
  128. <text class="section-title">🛍️ 消费中心</text>
  129. </view>
  130. <view class="service-grid">
  131. <view class="service-item" @click="goToShop">
  132. <text class="service-icon">🏪</text>
  133. <text class="service-label">商城首页</text>
  134. </view>
  135. <view class="service-item" @click="goToCart">
  136. <text class="service-icon">🛒</text>
  137. <text class="service-label">购物车</text>
  138. </view>
  139. <view class="service-item" @click="goToOrders">
  140. <text class="service-icon">📋</text>
  141. <text class="service-label">我的订单</text>
  142. </view>
  143. <view class="service-item" @click="goToAfterSales">
  144. <text class="service-icon">🔄</text>
  145. <text class="service-label">售后服务</text>
  146. </view>
  147. </view>
  148. </view>
  149. <!-- 商品推荐 -->
  150. <DimensionProductList
  151. dimensionCode="wealth"
  152. :familyId="activeChildId"
  153. title="为你推荐" />
  154. <!-- 个性化推荐 -->
  155. <RecommendedSection
  156. v-if="recommendItems.length > 0"
  157. :items="recommendItems"
  158. :hasMore="recommendHasMore"
  159. @itemClick="onRecommendItemClick"
  160. @more="goMoreRecommend" />
  161. <!-- 底部菜单 -->
  162. <view class="menu-list">
  163. <view class="menu-item" @click="goToProfile">
  164. <text>👤 个人中心</text>
  165. <text class="arrow">›</text>
  166. </view>
  167. <view class="menu-item" @click="goToPointsLogs">
  168. <text>📊 积分记录</text>
  169. <text class="arrow">›</text>
  170. </view>
  171. <view class="menu-item logout-item" @click="logout">
  172. <text>🚪 退出登录</text>
  173. <text class="arrow">›</text>
  174. </view>
  175. </view>
  176. </template>
  177. </view>
  178. </template>
  179. <script>
  180. import TabTransition from '../../components/tab-transition.vue'
  181. import PageBanner from '../../components/PageBanner.vue'
  182. import DimensionProductList from '../../components/DimensionProductList.vue'
  183. import WealthSubScores from '../../components/WealthSubScores.vue'
  184. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  185. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  186. import RecommendedSection from '../../components/RecommendedSection.vue'
  187. import recommendMixin from '../../mixins/recommend-mixin'
  188. import {
  189. verifyPassword,
  190. getChildren,
  191. getWealthDetail,
  192. getReferralCode,
  193. getReferralSummary,
  194. getCommissionSummary,
  195. getVisibleFamilyMembers
  196. } from '../../utils/api.js'
  197. export default {
  198. mixins: [recommendMixin],
  199. components: { TabTransition, PageBanner, DimensionProductList, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, RecommendedSection },
  200. data() {
  201. return {
  202. showTabTransition: true,
  203. isLoggedIn: false,
  204. role: 'parent',
  205. isSwitchedChild: false,
  206. // 五维评分
  207. bodyScore: 0,
  208. mindScore: 0,
  209. wisdomScore: 0,
  210. actionScore: 0,
  211. wealthScore: 0,
  212. // 心的子维度(仅孩子有真实数据)
  213. heartEmotionStable: null,
  214. heartUnderstanding: null,
  215. heartLegacy: null,
  216. // 子维度 - parent
  217. wealthIncome: null,
  218. wealthAchievement: null,
  219. wealthNetwork: null,
  220. // 子维度 - child
  221. wealthEducation: null,
  222. wealthSocial: null,
  223. wealthPoints: null,
  224. // 身克富杠杆
  225. bodyWealthStatus: 'normal',
  226. bodyWealthMessage: '',
  227. // 财富数据
  228. wealthData: {
  229. totalEarnings: 0,
  230. availableAmount: 0,
  231. referralCount: 0,
  232. referralCode: ''
  233. },
  234. children: [],
  235. familyMembersVisible: [],
  236. selectedMemberId: null
  237. }
  238. },
  239. computed: {
  240. activeChildId() {
  241. if (this.role === 'child') {
  242. return uni.getStorageSync('currentChildId')
  243. }
  244. return ''
  245. }
  246. },
  247. onShow() {
  248. this.showTabTransition = true
  249. var token = uni.getStorageSync('token')
  250. if (!token) {
  251. this.isLoggedIn = false
  252. this._watchPageReady()
  253. return
  254. }
  255. this.isLoggedIn = true
  256. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  257. if (currentRole === 'teacher') {
  258. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  259. return
  260. }
  261. this.role = currentRole
  262. this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
  263. this.loadChildren()
  264. this.loadWealthDetail()
  265. this.loadWealthData()
  266. this.loadFamilyMembersVisible()
  267. this.loadRecommendations('wealth')
  268. this._watchPageReady()
  269. },
  270. methods: {
  271. onFamilyMemberSelect(member) {
  272. this.selectedMemberId = member.id
  273. },
  274. goMoreRecommend: function() {
  275. uni.navigateTo({ url: '/pages/discover/index' })
  276. },
  277. loadFamilyMembersVisible() {
  278. var self = this
  279. getVisibleFamilyMembers().then(function(res) {
  280. self.familyMembersVisible = res.data || []
  281. }).catch(function(e) {
  282. console.log('获取可见家庭成员失败', e)
  283. self.familyMembersVisible = []
  284. })
  285. },
  286. goLogin() {
  287. uni.navigateTo({ url: '/pages/login/login' })
  288. },
  289. _watchPageReady() {
  290. var self = this
  291. this.$nextTick(function() {
  292. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  293. })
  294. },
  295. async loadChildren() {
  296. try {
  297. var res = await getChildren()
  298. this.children = res.data || []
  299. } catch (e) {
  300. console.error('获取孩子列表失败', e)
  301. }
  302. },
  303. async loadWealthDetail() {
  304. var memberId = null
  305. var memberType = this.role
  306. if (this.role === 'child') {
  307. memberId = uni.getStorageSync('currentChildId')
  308. if (!memberId && this.children.length > 0) {
  309. memberId = this.children[0].id
  310. }
  311. } else {
  312. memberId = uni.getStorageSync('userId')
  313. }
  314. if (!memberId) return
  315. try {
  316. var res = await getWealthDetail(memberId, memberType)
  317. if (res && res.data) {
  318. var d = res.data
  319. this.wealthScore = d.wealthScore || 0
  320. if (memberType === 'parent') {
  321. this.wealthIncome = d.wealthIncome
  322. this.wealthAchievement = d.wealthAchievement
  323. this.wealthNetwork = d.wealthNetwork
  324. } else {
  325. this.wealthEducation = d.wealthEducation
  326. this.wealthSocial = d.wealthSocial
  327. this.wealthPoints = d.wealthPoints
  328. this.heartEmotionStable = d.heartEmotionStable
  329. this.heartUnderstanding = d.heartUnderstanding
  330. this.heartLegacy = d.heartLegacy
  331. }
  332. // 身克富杠杆状态
  333. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  334. this.bodyWealthMessage = d.bodyWealthMessage || ''
  335. }
  336. } catch (e) {
  337. console.error('获取富维度详情失败', e)
  338. }
  339. },
  340. async loadWealthData() {
  341. if (this.role !== 'parent') return
  342. try {
  343. var codeRes = await getReferralCode()
  344. if (codeRes && codeRes.code === 200 && codeRes.data) {
  345. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  346. }
  347. } catch (e) {
  348. console.error('获取邀请码失败', e)
  349. }
  350. try {
  351. var summaryRes = await getReferralSummary()
  352. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  353. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  354. }
  355. } catch (e) {
  356. console.error('获取邀请统计失败', e)
  357. }
  358. try {
  359. var commissionRes = await getCommissionSummary()
  360. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  361. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  362. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  363. }
  364. } catch (e) {
  365. console.error('获取佣金统计失败', e)
  366. }
  367. },
  368. copyReferralCode() {
  369. if (!this.wealthData.referralCode) return
  370. uni.setClipboardData({
  371. data: this.wealthData.referralCode,
  372. success: function() {
  373. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  374. }
  375. })
  376. },
  377. onSwitchMode() {
  378. if (this.role === 'child') {
  379. this.exitSwitch()
  380. return
  381. }
  382. // parent → switch to child
  383. if (this.children.length === 0) {
  384. this.loadChildren()
  385. if (this.children.length === 0) {
  386. uni.showModal({
  387. title: '提示',
  388. content: '您还没有添加孩子,请先在家庭成员中添加',
  389. success: function(res) {
  390. if (res.confirm) {
  391. uni.navigateTo({ url: '/pages/profile-extra/family-members' })
  392. }
  393. }
  394. })
  395. return
  396. }
  397. }
  398. if (this.children.length === 1) {
  399. this.$store.commit('switchToChild', this.children[0].id)
  400. this.role = 'child'
  401. this.isSwitchedChild = true
  402. uni.showToast({ title: '已切换为孩子模式', icon: 'success' })
  403. return
  404. }
  405. var self = this
  406. uni.showActionSheet({
  407. itemList: this.children.map(function(c) { return c.nickname }),
  408. success: function(res) {
  409. var selectedChild = self.children[res.tapIndex]
  410. self.$store.commit('switchToChild', selectedChild.id)
  411. self.role = 'child'
  412. self.isSwitchedChild = true
  413. uni.showToast({ title: '已切换为' + selectedChild.nickname + '模式', icon: 'success' })
  414. }
  415. })
  416. },
  417. exitSwitch() {
  418. if (!this.isSwitchedChild) return
  419. var self = this
  420. uni.showModal({
  421. title: '退出切换',
  422. content: '请输入家长密码以确认退出',
  423. editable: true,
  424. success: function(res) {
  425. if (res.confirm && res.content) {
  426. verifyPassword(res.content).then(function(result) {
  427. if (result.code === 200) {
  428. uni.removeStorageSync('isSwitchedChild')
  429. uni.removeStorageSync('currentChildId')
  430. self.isSwitchedChild = false
  431. self.role = 'parent'
  432. if (self.$store && self.$store.commit) {
  433. self.$store.commit('switchBackToParent')
  434. }
  435. uni.showToast({ title: '已退出切换', icon: 'success' })
  436. setTimeout(function() {
  437. uni.reLaunch({ url: '/pages/index-home/index' })
  438. }, 1000)
  439. } else {
  440. uni.showToast({ title: '密码错误', icon: 'none' })
  441. }
  442. }).catch(function() {
  443. uni.showToast({ title: '验证失败', icon: 'none' })
  444. })
  445. }
  446. }
  447. })
  448. },
  449. logout() {
  450. uni.showModal({
  451. title: '退出登录',
  452. content: '确定要退出登录吗?',
  453. success: function(res) {
  454. if (res.confirm) {
  455. uni.clearStorageSync()
  456. uni.reLaunch({ url: '/pages/login/login' })
  457. }
  458. }
  459. })
  460. },
  461. goToProfile() {
  462. uni.navigateTo({ url: '/pages/profile/profile' })
  463. },
  464. goToCheckin() {
  465. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  466. },
  467. goToInsurance() {
  468. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  469. },
  470. goToCreator() {
  471. uni.navigateTo({ url: '/pages/promotion/index' })
  472. },
  473. goToPointsLogs() {
  474. uni.navigateTo({ url: '/pages/points/points' })
  475. },
  476. goToShop() {
  477. uni.navigateTo({ url: '/pages/shop/index/index' })
  478. },
  479. goToCart() {
  480. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  481. },
  482. goToOrders() {
  483. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  484. },
  485. goToAfterSales() {
  486. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  487. },
  488. goToIncome() {
  489. uni.navigateTo({ url: '/pages/promotion/commission' })
  490. },
  491. goToAchievements() {
  492. uni.navigateTo({ url: '/pages/rewards/badge' })
  493. },
  494. goToNetwork() {
  495. uni.navigateTo({ url: '/pages/promotion/team' })
  496. },
  497. childSubDimClick(key) {
  498. var routes = {
  499. education: '/pages/assessment/results',
  500. social: '/pages/activity/index',
  501. points: '/pages/points/mall',
  502. emotion: '/pages/mind-detail/emotion-report',
  503. understanding: '/pages/mind-detail/emotion-trend',
  504. legacy: '/pages/wishes/index'
  505. }
  506. var url = routes[key]
  507. if (url) {
  508. uni.navigateTo({ url: url })
  509. }
  510. }
  511. }
  512. }
  513. </script>
  514. <style scoped>
  515. .container {
  516. min-height: 100vh;
  517. background: #f5f7fa;
  518. padding-bottom: 120rpx;
  519. }
  520. .section {
  521. margin: 20rpx 30rpx;
  522. }
  523. .section-header {
  524. display: flex;
  525. justify-content: space-between;
  526. align-items: center;
  527. margin-bottom: 20rpx;
  528. }
  529. .section-title {
  530. font-size: 30rpx;
  531. font-weight: bold;
  532. color: #333;
  533. }
  534. .section-more {
  535. font-size: 24rpx;
  536. color: #999;
  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: 25%;
  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-guide-section {
  696. display: flex;
  697. flex-direction: column;
  698. align-items: center;
  699. padding: 60rpx 40rpx;
  700. margin: 30rpx;
  701. background: #fff;
  702. border-radius: 20rpx;
  703. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  704. }
  705. .login-guide-text {
  706. font-size: 26rpx;
  707. color: #999;
  708. text-align: center;
  709. margin-bottom: 30rpx;
  710. line-height: 1.6;
  711. }
  712. .login-guide-section .login-btn {
  713. width: 60%;
  714. height: 80rpx;
  715. line-height: 80rpx;
  716. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  717. color: #fff;
  718. font-size: 30rpx;
  719. font-weight: bold;
  720. border-radius: 40rpx;
  721. text-align: center;
  722. border: none;
  723. }
  724. .login-prompt .login-btn::after {
  725. border: none;
  726. }
  727. /* 退出切换 */
  728. .exit-switch {
  729. margin: 20rpx 30rpx 0;
  730. padding: 16rpx 24rpx;
  731. background: #FEF3C7;
  732. border-radius: 12rpx;
  733. text-align: center;
  734. font-size: 26rpx;
  735. color: #92400E;
  736. }
  737. </style>