index.vue 23 KB

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