index.vue 21 KB

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