index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
  1. <template>
  2. <view class="container">
  3. <!-- TabTransition overlay -->
  4. <tab-transition v-if="showTabTransition" dimCode="wealth" />
  5. <!-- 未登录 -->
  6. <view v-if="!isLoggedIn" class="login-prompt">
  7. <view class="prompt-icon">👤</view>
  8. <text class="prompt-title">登录浠艾福</text>
  9. <text class="prompt-desc">登录后查看财富能量详情</text>
  10. <button class="login-btn" @click="goLogin">登录 / 注册</button>
  11. </view>
  12. <template v-else>
  13. <!-- 品牌头部 -->
  14. <PageBanner theme="wealth"
  15. tagline="利他创富 · 价值共享"
  16. quote="富足源于利他与坚持" />
  17. <!-- 家庭成员选择条 -->
  18. <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. self.showTabTransition = false
  288. })
  289. setTimeout(function() {
  290. self.showTabTransition = false
  291. }, 2000)
  292. },
  293. async loadChildren() {
  294. try {
  295. var res = await getChildren()
  296. this.children = res.data || []
  297. } catch (e) {
  298. console.error('获取孩子列表失败', e)
  299. }
  300. },
  301. async loadWealthDetail() {
  302. var memberId = null
  303. var memberType = this.role
  304. if (this.role === 'child') {
  305. memberId = uni.getStorageSync('currentChildId')
  306. if (!memberId && this.children.length > 0) {
  307. memberId = this.children[0].id
  308. }
  309. } else {
  310. memberId = uni.getStorageSync('userId')
  311. }
  312. if (!memberId) return
  313. try {
  314. var res = await getWealthDetail(memberId, memberType)
  315. if (res && res.data) {
  316. var d = res.data
  317. this.wealthScore = d.wealthScore || 0
  318. if (memberType === 'parent') {
  319. this.wealthIncome = d.wealthIncome
  320. this.wealthAchievement = d.wealthAchievement
  321. this.wealthNetwork = d.wealthNetwork
  322. } else {
  323. this.wealthEducation = d.wealthEducation
  324. this.wealthSocial = d.wealthSocial
  325. this.wealthPoints = d.wealthPoints
  326. this.heartEmotionStable = d.heartEmotionStable
  327. this.heartUnderstanding = d.heartUnderstanding
  328. this.heartLegacy = d.heartLegacy
  329. }
  330. // 身克富杠杆状态
  331. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  332. this.bodyWealthMessage = d.bodyWealthMessage || ''
  333. }
  334. } catch (e) {
  335. console.error('获取富维度详情失败', e)
  336. }
  337. },
  338. async loadWealthData() {
  339. if (this.role !== 'parent') return
  340. try {
  341. var codeRes = await getReferralCode()
  342. if (codeRes && codeRes.code === 200 && codeRes.data) {
  343. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  344. }
  345. } catch (e) {
  346. console.error('获取邀请码失败', e)
  347. }
  348. try {
  349. var summaryRes = await getReferralSummary()
  350. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  351. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  352. }
  353. } catch (e) {
  354. console.error('获取邀请统计失败', e)
  355. }
  356. try {
  357. var commissionRes = await getCommissionSummary()
  358. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  359. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  360. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  361. }
  362. } catch (e) {
  363. console.error('获取佣金统计失败', e)
  364. }
  365. },
  366. copyReferralCode() {
  367. if (!this.wealthData.referralCode) return
  368. uni.setClipboardData({
  369. data: this.wealthData.referralCode,
  370. success: function() {
  371. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  372. }
  373. })
  374. },
  375. onSwitchMode() {
  376. if (this.role === 'child') {
  377. this.exitSwitch()
  378. return
  379. }
  380. // parent → switch to child
  381. if (this.children.length === 0) {
  382. this.loadChildren()
  383. if (this.children.length === 0) {
  384. uni.showModal({
  385. title: '提示',
  386. content: '您还没有添加孩子,请先在家庭成员中添加',
  387. success: function(res) {
  388. if (res.confirm) {
  389. uni.navigateTo({ url: '/pages/profile-extra/family-members' })
  390. }
  391. }
  392. })
  393. return
  394. }
  395. }
  396. if (this.children.length === 1) {
  397. this.$store.commit('switchToChild', this.children[0].id)
  398. this.role = 'child'
  399. this.isSwitchedChild = true
  400. uni.showToast({ title: '已切换为孩子模式', icon: 'success' })
  401. return
  402. }
  403. var self = this
  404. uni.showActionSheet({
  405. itemList: this.children.map(function(c) { return c.nickname }),
  406. success: function(res) {
  407. var selectedChild = self.children[res.tapIndex]
  408. self.$store.commit('switchToChild', selectedChild.id)
  409. self.role = 'child'
  410. self.isSwitchedChild = true
  411. uni.showToast({ title: '已切换为' + selectedChild.nickname + '模式', icon: 'success' })
  412. }
  413. })
  414. },
  415. exitSwitch() {
  416. if (!this.isSwitchedChild) return
  417. var self = this
  418. uni.showModal({
  419. title: '退出切换',
  420. content: '请输入家长密码以确认退出',
  421. editable: true,
  422. success: function(res) {
  423. if (res.confirm && res.content) {
  424. verifyPassword(res.content).then(function(result) {
  425. if (result.code === 200) {
  426. uni.removeStorageSync('isSwitchedChild')
  427. uni.removeStorageSync('currentChildId')
  428. self.isSwitchedChild = false
  429. self.role = 'parent'
  430. if (self.$store && self.$store.commit) {
  431. self.$store.commit('switchBackToParent')
  432. }
  433. uni.showToast({ title: '已退出切换', icon: 'success' })
  434. setTimeout(function() {
  435. uni.reLaunch({ url: '/pages/index-home/index' })
  436. }, 1000)
  437. } else {
  438. uni.showToast({ title: '密码错误', icon: 'none' })
  439. }
  440. }).catch(function() {
  441. uni.showToast({ title: '验证失败', icon: 'none' })
  442. })
  443. }
  444. }
  445. })
  446. },
  447. logout() {
  448. uni.showModal({
  449. title: '退出登录',
  450. content: '确定要退出登录吗?',
  451. success: function(res) {
  452. if (res.confirm) {
  453. uni.clearStorageSync()
  454. uni.reLaunch({ url: '/pages/login/login' })
  455. }
  456. }
  457. })
  458. },
  459. goToProfile() {
  460. uni.navigateTo({ url: '/pages/profile/profile' })
  461. },
  462. goToCheckin() {
  463. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  464. },
  465. goToInsurance() {
  466. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  467. },
  468. goToCreator() {
  469. uni.navigateTo({ url: '/pages/promotion/index' })
  470. },
  471. goToPointsLogs() {
  472. uni.navigateTo({ url: '/pages/points/points' })
  473. },
  474. goToPromotion() {
  475. uni.navigateTo({ url: '/pages/promotion/index' })
  476. },
  477. goToShop() {
  478. uni.navigateTo({ url: '/pages/shop/index/index' })
  479. },
  480. goToCart() {
  481. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  482. },
  483. goToOrders() {
  484. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  485. },
  486. goToAfterSales() {
  487. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  488. },
  489. goToIncome() {
  490. uni.navigateTo({ url: '/pages/promotion/commission' })
  491. },
  492. goToAchievements() {
  493. uni.navigateTo({ url: '/pages/rewards/badge' })
  494. },
  495. goToNetwork() {
  496. uni.navigateTo({ url: '/pages/promotion/team' })
  497. },
  498. childSubDimClick(key) {
  499. var routes = {
  500. education: '/pages/assessment/results',
  501. social: '/pages/activity/index',
  502. points: '/pages/points/mall',
  503. emotion: '/pages/mind-detail/emotion-report',
  504. understanding: '/pages/mind-detail/emotion-trend',
  505. legacy: '/pages/wishes/index'
  506. }
  507. var url = routes[key]
  508. if (url) {
  509. uni.navigateTo({ url: url })
  510. }
  511. }
  512. }
  513. }
  514. </script>
  515. <style scoped>
  516. .container {
  517. min-height: 100vh;
  518. background: #f5f7fa;
  519. padding-bottom: 120rpx;
  520. }
  521. .section {
  522. margin: 20rpx 30rpx;
  523. }
  524. .section-header {
  525. display: flex;
  526. justify-content: space-between;
  527. align-items: center;
  528. margin-bottom: 20rpx;
  529. }
  530. .section-title {
  531. font-size: 30rpx;
  532. font-weight: bold;
  533. color: #333;
  534. }
  535. .section-more {
  536. font-size: 24rpx;
  537. color: #999;
  538. }
  539. /* 用户卡片 */
  540. .user-card {
  541. display: flex;
  542. align-items: center;
  543. background: #fff;
  544. margin: 0 30rpx 20rpx;
  545. border-radius: 20rpx;
  546. padding: 30rpx;
  547. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  548. }
  549. .avatar {
  550. width: 100rpx;
  551. height: 100rpx;
  552. border-radius: 50%;
  553. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  554. display: flex;
  555. align-items: center;
  556. justify-content: center;
  557. font-size: 48rpx;
  558. margin-right: 24rpx;
  559. flex-shrink: 0;
  560. }
  561. .user-info {
  562. flex: 1;
  563. }
  564. .nickname {
  565. font-size: 34rpx;
  566. font-weight: bold;
  567. color: #333;
  568. margin-bottom: 8rpx;
  569. }
  570. .role {
  571. font-size: 24rpx;
  572. color: #999;
  573. }
  574. .card-arrow {
  575. color: #ccc;
  576. font-size: 40rpx;
  577. margin-left: 16rpx;
  578. }
  579. /* 切换区域 */
  580. .switch-section {
  581. margin: 0 30rpx 20rpx;
  582. }
  583. .btn-switch {
  584. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  585. color: #fff;
  586. font-size: 26rpx;
  587. padding: 16rpx 0;
  588. border-radius: 40rpx;
  589. text-align: center;
  590. line-height: 1.5;
  591. }
  592. /* 财富数据卡片 */
  593. .wealth-card {
  594. background: #fff;
  595. border-radius: 20rpx;
  596. padding: 30rpx 20rpx;
  597. display: flex;
  598. align-items: center;
  599. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  600. }
  601. .wealth-item {
  602. flex: 1;
  603. display: flex;
  604. flex-direction: column;
  605. align-items: center;
  606. }
  607. .wealth-value {
  608. font-size: 40rpx;
  609. font-weight: bold;
  610. color: #F97316;
  611. }
  612. .wealth-label {
  613. font-size: 24rpx;
  614. color: #999;
  615. margin-top: 8rpx;
  616. }
  617. .wealth-divider {
  618. width: 1rpx;
  619. height: 60rpx;
  620. background: #f0f0f0;
  621. }
  622. /* 邀请码复制条 */
  623. .referral-code-bar {
  624. display: flex;
  625. align-items: center;
  626. background: #fff;
  627. margin-top: 16rpx;
  628. border-radius: 16rpx;
  629. padding: 24rpx 30rpx;
  630. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  631. }
  632. .referral-code-label {
  633. font-size: 26rpx;
  634. color: #666;
  635. margin-right: 16rpx;
  636. }
  637. .referral-code-value {
  638. flex: 1;
  639. font-size: 30rpx;
  640. font-weight: bold;
  641. color: #F59E0B;
  642. letter-spacing: 2rpx;
  643. }
  644. .referral-code-copy {
  645. font-size: 24rpx;
  646. color: #fff;
  647. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  648. padding: 8rpx 24rpx;
  649. border-radius: 20rpx;
  650. }
  651. /* 三子维度卡片 */
  652. .sub-dim-grid {
  653. display: flex;
  654. }
  655. .sub-dim-card {
  656. flex: 1;
  657. margin-right: 16rpx;
  658. background: #fff;
  659. border-radius: 16rpx;
  660. padding: 24rpx 16rpx;
  661. display: flex;
  662. flex-direction: column;
  663. align-items: center;
  664. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  665. }
  666. .sub-dim-card:last-child {
  667. margin-right: 0;
  668. }
  669. .sub-dim-score {
  670. font-size: 48rpx;
  671. font-weight: bold;
  672. color: #F59E0B;
  673. }
  674. .heart-sub-dim .sub-dim-score {
  675. color: #FF6B9D;
  676. }
  677. .sub-dim-label {
  678. font-size: 24rpx;
  679. color: #333;
  680. margin-top: 8rpx;
  681. font-weight: 500;
  682. }
  683. .sub-dim-desc {
  684. font-size: 20rpx;
  685. color: #999;
  686. margin-top: 4rpx;
  687. }
  688. /* 增值服务 */
  689. .service-grid {
  690. display: flex;
  691. flex-wrap: wrap;
  692. background: #fff;
  693. border-radius: 20rpx;
  694. padding: 24rpx 16rpx;
  695. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  696. }
  697. .service-item {
  698. width: 33.33%;
  699. display: flex;
  700. flex-direction: column;
  701. align-items: center;
  702. padding: 16rpx 0;
  703. }
  704. .service-icon {
  705. font-size: 48rpx;
  706. margin-bottom: 8rpx;
  707. }
  708. .service-label {
  709. font-size: 22rpx;
  710. color: #666;
  711. }
  712. /* 底部菜单 */
  713. .menu-list {
  714. margin: 30rpx 30rpx 0;
  715. background: #fff;
  716. border-radius: 16rpx;
  717. }
  718. .menu-item {
  719. padding: 30rpx;
  720. border-bottom: 1rpx solid #f0f0f0;
  721. display: flex;
  722. justify-content: space-between;
  723. font-size: 28rpx;
  724. }
  725. .menu-item:last-child {
  726. border-bottom: none;
  727. }
  728. .arrow {
  729. color: #ccc;
  730. font-size: 32rpx;
  731. }
  732. .logout-item {
  733. color: #EF4444;
  734. }
  735. /* 未登录 */
  736. .login-prompt {
  737. display: flex;
  738. flex-direction: column;
  739. align-items: center;
  740. justify-content: center;
  741. min-height: 80vh;
  742. padding: 60rpx;
  743. }
  744. .prompt-icon {
  745. font-size: 120rpx;
  746. margin-bottom: 30rpx;
  747. width: 160rpx;
  748. height: 160rpx;
  749. line-height: 160rpx;
  750. text-align: center;
  751. background: #f5f5f5;
  752. border-radius: 50%;
  753. }
  754. .prompt-title {
  755. font-size: 36rpx;
  756. font-weight: bold;
  757. color: #333;
  758. margin-bottom: 16rpx;
  759. }
  760. .prompt-desc {
  761. font-size: 26rpx;
  762. color: #999;
  763. text-align: center;
  764. margin-bottom: 40rpx;
  765. }
  766. .login-prompt .login-btn {
  767. width: 60%;
  768. height: 80rpx;
  769. line-height: 80rpx;
  770. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  771. color: #fff;
  772. font-size: 30rpx;
  773. font-weight: bold;
  774. border-radius: 40rpx;
  775. text-align: center;
  776. border: none;
  777. }
  778. .login-prompt .login-btn::after {
  779. border: none;
  780. }
  781. /* 退出切换 */
  782. .exit-switch {
  783. margin: 20rpx 30rpx 0;
  784. padding: 16rpx 24rpx;
  785. background: #FEF3C7;
  786. border-radius: 12rpx;
  787. text-align: center;
  788. font-size: 26rpx;
  789. color: #92400E;
  790. }
  791. </style>