index.vue 23 KB

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