index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  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. <DimensionActivities
  162. dimensionCode="wealth"
  163. :activities="dimensionActivities"
  164. :isLoggedIn="isLoggedIn"
  165. @activityClick="goActivityDetail"
  166. @moreActivities="goMoreActivities" />
  167. <!-- 推荐阅读 -->
  168. <ArticleBookshelf
  169. :articles="wealthArticles"
  170. :loading="articlesLoading"
  171. @articleClick="goArticleDetail"
  172. @moreArticles="goMoreArticles" />
  173. <!-- 个性化推荐 -->
  174. <RecommendedSection
  175. :items="recommendItems"
  176. :hasMore="recommendHasMore"
  177. @itemClick="onRecommendItemClick"
  178. @more="goMoreRecommend" />
  179. <!-- 底部菜单 -->
  180. <view class="menu-list">
  181. <view class="menu-item" @click="goToProfile">
  182. <text>👤 个人中心</text>
  183. <text class="arrow">›</text>
  184. </view>
  185. <view class="menu-item" @click="goToPointsLogs">
  186. <text>📊 积分记录</text>
  187. <text class="arrow">›</text>
  188. </view>
  189. <view class="menu-item logout-item" @click="logout">
  190. <text>🚪 退出登录</text>
  191. <text class="arrow">›</text>
  192. </view>
  193. </view>
  194. </template>
  195. </view>
  196. </template>
  197. <script>
  198. import TabTransition from '../../components/tab-transition.vue'
  199. import PageBanner from '../../components/PageBanner.vue'
  200. import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
  201. import DimensionProductList from '../../components/DimensionProductList.vue'
  202. import DimensionActivities from '../../components/DimensionActivities.vue'
  203. import WealthSubScores from '../../components/WealthSubScores.vue'
  204. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  205. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  206. import RecommendedSection from '../../components/RecommendedSection.vue'
  207. import recommendMixin from '../../mixins/recommend-mixin'
  208. import {
  209. verifyPassword,
  210. getChildren,
  211. getWealthDetail,
  212. getReferralCode,
  213. getReferralSummary,
  214. getCommissionSummary,
  215. getVisibleFamilyMembers,
  216. getFeaturedArticles,
  217. getActivityList
  218. } from '../../utils/api.js'
  219. export default {
  220. mixins: [recommendMixin],
  221. components: { TabTransition, PageBanner, DimensionProductList, DimensionActivities, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, RecommendedSection, ArticleBookshelf },
  222. data() {
  223. return {
  224. showTabTransition: true,
  225. isLoggedIn: false,
  226. role: 'parent',
  227. isSwitchedChild: false,
  228. // 五维评分
  229. bodyScore: 0,
  230. mindScore: 0,
  231. wisdomScore: 0,
  232. actionScore: 0,
  233. wealthScore: 0,
  234. // 心的子维度(仅孩子有真实数据)
  235. heartEmotionStable: null,
  236. heartUnderstanding: null,
  237. heartLegacy: null,
  238. // 子维度 - parent
  239. wealthIncome: null,
  240. wealthAchievement: null,
  241. wealthNetwork: null,
  242. // 子维度 - child
  243. wealthEducation: null,
  244. wealthSocial: null,
  245. wealthPoints: null,
  246. // 身克富杠杆
  247. bodyWealthStatus: 'normal',
  248. bodyWealthMessage: '',
  249. // 财富数据
  250. wealthData: {
  251. totalEarnings: 0,
  252. availableAmount: 0,
  253. referralCount: 0,
  254. referralCode: ''
  255. },
  256. children: [],
  257. familyMembersVisible: [],
  258. selectedMemberId: null,
  259. wealthArticles: [],
  260. articlesLoading: false,
  261. dimensionActivities: []
  262. }
  263. },
  264. computed: {
  265. activeChildId() {
  266. if (this.role === 'child') {
  267. return uni.getStorageSync('currentChildId')
  268. }
  269. return ''
  270. }
  271. },
  272. onShow() {
  273. this.showTabTransition = true
  274. var token = uni.getStorageSync('token')
  275. if (!token) {
  276. this.isLoggedIn = false
  277. this._watchPageReady()
  278. return
  279. }
  280. this.isLoggedIn = true
  281. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  282. if (currentRole === 'teacher') {
  283. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  284. return
  285. }
  286. this.role = currentRole
  287. this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
  288. this.loadChildren()
  289. this.loadWealthDetail()
  290. this.loadWealthData()
  291. this.loadFamilyMembersVisible()
  292. this.loadRecommendations('wealth')
  293. this.loadWealthArticles()
  294. this.loadDimensionActivities()
  295. this._watchPageReady()
  296. },
  297. methods: {
  298. onFamilyMemberSelect(member) {
  299. this.selectedMemberId = member.id
  300. },
  301. goMoreRecommend: function() {
  302. uni.navigateTo({ url: '/pages/discover/index' })
  303. },
  304. loadDimensionActivities: function() {
  305. var self = this
  306. getActivityList({ dimensionCode: 'wealth', page: 1, size: 3 }).then(function(res) {
  307. if (res && res.data) {
  308. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  309. self.dimensionActivities = list.slice(0, 3)
  310. }
  311. }).catch(function() { self.dimensionActivities = [] })
  312. },
  313. goActivityDetail: function(act) {
  314. if (!act || !act.id) return
  315. uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id })
  316. },
  317. goMoreActivities: function() {
  318. uni.navigateTo({ url: '/pages/discover/index?type=activity' })
  319. },
  320. loadWealthArticles: function() {
  321. var self = this
  322. self.articlesLoading = true
  323. getFeaturedArticles({ size: 5 }).then(function(res) {
  324. if (res.code === 200 && res.data) {
  325. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  326. var result = []
  327. for (var i = 0; i < list.length; i++) {
  328. var a = list[i]
  329. if (a.relatedDimensions && a.relatedDimensions.indexOf('wealth') !== -1) {
  330. result.push(a)
  331. }
  332. }
  333. self.wealthArticles = result.length > 0 ? result.slice(0, 5) : list.slice(0, 5)
  334. }
  335. }).catch(function() {
  336. self.wealthArticles = []
  337. }).then(function() {
  338. self.articlesLoading = false
  339. })
  340. },
  341. goArticleDetail: function(article) {
  342. var id = article && article.id ? article.id : article
  343. uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id })
  344. },
  345. goMoreArticles: function() {
  346. uni.navigateTo({ url: '/pages/article-center/index?dimension=wealth' })
  347. },
  348. loadFamilyMembersVisible() {
  349. var self = this
  350. getVisibleFamilyMembers().then(function(res) {
  351. self.familyMembersVisible = res.data || []
  352. }).catch(function(e) {
  353. console.log('获取可见家庭成员失败', e)
  354. self.familyMembersVisible = []
  355. })
  356. },
  357. goLogin() {
  358. uni.navigateTo({ url: '/pages/login/login' })
  359. },
  360. _watchPageReady() {
  361. var self = this
  362. this.$nextTick(function() {
  363. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  364. })
  365. },
  366. async loadChildren() {
  367. try {
  368. var res = await getChildren()
  369. this.children = res.data || []
  370. } catch (e) {
  371. console.error('获取孩子列表失败', e)
  372. }
  373. },
  374. async loadWealthDetail() {
  375. var memberId = null
  376. var memberType = this.role
  377. if (this.role === 'child') {
  378. memberId = uni.getStorageSync('currentChildId')
  379. if (!memberId && this.children.length > 0) {
  380. memberId = this.children[0].id
  381. }
  382. } else {
  383. memberId = uni.getStorageSync('userId')
  384. }
  385. if (!memberId) return
  386. try {
  387. var res = await getWealthDetail(memberId, memberType)
  388. if (res && res.data) {
  389. var d = res.data
  390. this.wealthScore = d.wealthScore || 0
  391. if (memberType === 'parent') {
  392. this.wealthIncome = d.wealthIncome
  393. this.wealthAchievement = d.wealthAchievement
  394. this.wealthNetwork = d.wealthNetwork
  395. } else {
  396. this.wealthEducation = d.wealthEducation
  397. this.wealthSocial = d.wealthSocial
  398. this.wealthPoints = d.wealthPoints
  399. this.heartEmotionStable = d.heartEmotionStable
  400. this.heartUnderstanding = d.heartUnderstanding
  401. this.heartLegacy = d.heartLegacy
  402. }
  403. // 身克富杠杆状态
  404. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  405. this.bodyWealthMessage = d.bodyWealthMessage || ''
  406. }
  407. } catch (e) {
  408. console.error('获取富维度详情失败', e)
  409. }
  410. },
  411. async loadWealthData() {
  412. if (this.role !== 'parent') return
  413. try {
  414. var codeRes = await getReferralCode()
  415. if (codeRes && codeRes.code === 200 && codeRes.data) {
  416. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  417. }
  418. } catch (e) {
  419. console.error('获取邀请码失败', e)
  420. }
  421. try {
  422. var summaryRes = await getReferralSummary()
  423. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  424. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  425. }
  426. } catch (e) {
  427. console.error('获取邀请统计失败', e)
  428. }
  429. try {
  430. var commissionRes = await getCommissionSummary()
  431. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  432. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  433. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  434. }
  435. } catch (e) {
  436. console.error('获取佣金统计失败', e)
  437. }
  438. },
  439. copyReferralCode() {
  440. if (!this.wealthData.referralCode) return
  441. uni.setClipboardData({
  442. data: this.wealthData.referralCode,
  443. success: function() {
  444. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  445. }
  446. })
  447. },
  448. onSwitchMode() {
  449. if (this.role === 'child') {
  450. this.exitSwitch()
  451. return
  452. }
  453. // parent → switch to child
  454. if (this.children.length === 0) {
  455. this.loadChildren()
  456. if (this.children.length === 0) {
  457. uni.showModal({
  458. title: '提示',
  459. content: '您还没有添加孩子,请先在家庭成员中添加',
  460. success: function(res) {
  461. if (res.confirm) {
  462. uni.navigateTo({ url: '/pages/profile-extra/family-members' })
  463. }
  464. }
  465. })
  466. return
  467. }
  468. }
  469. if (this.children.length === 1) {
  470. this.$store.commit('switchToChild', this.children[0].id)
  471. this.role = 'child'
  472. this.isSwitchedChild = true
  473. uni.showToast({ title: '已切换为孩子模式', icon: 'success' })
  474. return
  475. }
  476. var self = this
  477. uni.showActionSheet({
  478. itemList: this.children.map(function(c) { return c.nickname }),
  479. success: function(res) {
  480. var selectedChild = self.children[res.tapIndex]
  481. self.$store.commit('switchToChild', selectedChild.id)
  482. self.role = 'child'
  483. self.isSwitchedChild = true
  484. uni.showToast({ title: '已切换为' + selectedChild.nickname + '模式', icon: 'success' })
  485. }
  486. })
  487. },
  488. exitSwitch() {
  489. if (!this.isSwitchedChild) return
  490. var self = this
  491. uni.showModal({
  492. title: '退出切换',
  493. content: '请输入家长密码以确认退出',
  494. editable: true,
  495. success: function(res) {
  496. if (res.confirm && res.content) {
  497. verifyPassword(res.content).then(function(result) {
  498. if (result.code === 200) {
  499. uni.removeStorageSync('isSwitchedChild')
  500. uni.removeStorageSync('currentChildId')
  501. self.isSwitchedChild = false
  502. self.role = 'parent'
  503. if (self.$store && self.$store.commit) {
  504. self.$store.commit('switchBackToParent')
  505. }
  506. uni.showToast({ title: '已退出切换', icon: 'success' })
  507. setTimeout(function() {
  508. uni.reLaunch({ url: '/pages/index-home/index' })
  509. }, 1000)
  510. } else {
  511. uni.showToast({ title: '密码错误', icon: 'none' })
  512. }
  513. }).catch(function() {
  514. uni.showToast({ title: '验证失败', icon: 'none' })
  515. })
  516. }
  517. }
  518. })
  519. },
  520. logout() {
  521. uni.showModal({
  522. title: '退出登录',
  523. content: '确定要退出登录吗?',
  524. success: function(res) {
  525. if (res.confirm) {
  526. uni.clearStorageSync()
  527. uni.reLaunch({ url: '/pages/login/login' })
  528. }
  529. }
  530. })
  531. },
  532. goToProfile() {
  533. uni.navigateTo({ url: '/pages/profile/profile' })
  534. },
  535. goToCheckin() {
  536. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  537. },
  538. goToInsurance() {
  539. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  540. },
  541. goToCreator() {
  542. uni.navigateTo({ url: '/pages/promotion/index' })
  543. },
  544. goToPointsLogs() {
  545. uni.navigateTo({ url: '/pages/points/points' })
  546. },
  547. goToShop() {
  548. uni.navigateTo({ url: '/pages/shop/index/index' })
  549. },
  550. goToCart() {
  551. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  552. },
  553. goToOrders() {
  554. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  555. },
  556. goToAfterSales() {
  557. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  558. },
  559. goToIncome() {
  560. uni.navigateTo({ url: '/pages/promotion/commission' })
  561. },
  562. goToAchievements() {
  563. uni.navigateTo({ url: '/pages/rewards/badge' })
  564. },
  565. goToNetwork() {
  566. uni.navigateTo({ url: '/pages/promotion/team' })
  567. },
  568. childSubDimClick(key) {
  569. var routes = {
  570. education: '/pages/assessment/results',
  571. social: '/pages/activity/index',
  572. points: '/pages/points/mall',
  573. emotion: '/pages/mind-detail/emotion-report',
  574. understanding: '/pages/mind-detail/emotion-trend',
  575. legacy: '/pages/wishes/index'
  576. }
  577. var url = routes[key]
  578. if (url) {
  579. uni.navigateTo({ url: url })
  580. }
  581. }
  582. }
  583. }
  584. </script>
  585. <style scoped>
  586. .container {
  587. min-height: 100vh;
  588. background: #f5f7fa;
  589. padding-bottom: 120rpx;
  590. }
  591. .section {
  592. margin: 20rpx 30rpx;
  593. }
  594. .section-header {
  595. display: flex;
  596. justify-content: space-between;
  597. align-items: center;
  598. margin-bottom: 20rpx;
  599. }
  600. .section-title {
  601. font-size: 30rpx;
  602. font-weight: bold;
  603. color: #333;
  604. }
  605. .section-more {
  606. font-size: 24rpx;
  607. color: #999;
  608. }
  609. /* 切换区域 */
  610. .switch-section {
  611. margin: 0 30rpx 20rpx;
  612. }
  613. .btn-switch {
  614. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  615. color: #fff;
  616. font-size: 26rpx;
  617. padding: 16rpx 0;
  618. border-radius: 40rpx;
  619. text-align: center;
  620. line-height: 1.5;
  621. }
  622. /* 财富数据卡片 */
  623. .wealth-card {
  624. background: #fff;
  625. border-radius: 20rpx;
  626. padding: 30rpx 20rpx;
  627. display: flex;
  628. align-items: center;
  629. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  630. }
  631. .wealth-item {
  632. flex: 1;
  633. display: flex;
  634. flex-direction: column;
  635. align-items: center;
  636. }
  637. .wealth-value {
  638. font-size: 40rpx;
  639. font-weight: bold;
  640. color: #F97316;
  641. }
  642. .wealth-label {
  643. font-size: 24rpx;
  644. color: #999;
  645. margin-top: 8rpx;
  646. }
  647. .wealth-divider {
  648. width: 1rpx;
  649. height: 60rpx;
  650. background: #f0f0f0;
  651. }
  652. /* 邀请码复制条 */
  653. .referral-code-bar {
  654. display: flex;
  655. align-items: center;
  656. background: #fff;
  657. margin-top: 16rpx;
  658. border-radius: 16rpx;
  659. padding: 24rpx 30rpx;
  660. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  661. }
  662. .referral-code-label {
  663. font-size: 26rpx;
  664. color: #666;
  665. margin-right: 16rpx;
  666. }
  667. .referral-code-value {
  668. flex: 1;
  669. font-size: 30rpx;
  670. font-weight: bold;
  671. color: #F59E0B;
  672. letter-spacing: 2rpx;
  673. }
  674. .referral-code-copy {
  675. font-size: 24rpx;
  676. color: #fff;
  677. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  678. padding: 8rpx 24rpx;
  679. border-radius: 20rpx;
  680. }
  681. /* 三子维度卡片 */
  682. .sub-dim-grid {
  683. display: flex;
  684. }
  685. .sub-dim-card {
  686. flex: 1;
  687. margin-right: 16rpx;
  688. background: #fff;
  689. border-radius: 16rpx;
  690. padding: 24rpx 16rpx;
  691. display: flex;
  692. flex-direction: column;
  693. align-items: center;
  694. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  695. }
  696. .sub-dim-card:last-child {
  697. margin-right: 0;
  698. }
  699. .sub-dim-score {
  700. font-size: 48rpx;
  701. font-weight: bold;
  702. color: #F59E0B;
  703. }
  704. .heart-sub-dim .sub-dim-score {
  705. color: #FF6B9D;
  706. }
  707. .sub-dim-label {
  708. font-size: 24rpx;
  709. color: #333;
  710. margin-top: 8rpx;
  711. font-weight: 500;
  712. }
  713. .sub-dim-desc {
  714. font-size: 20rpx;
  715. color: #999;
  716. margin-top: 4rpx;
  717. }
  718. /* 增值服务 */
  719. .service-grid {
  720. display: flex;
  721. flex-wrap: wrap;
  722. background: #fff;
  723. border-radius: 20rpx;
  724. padding: 24rpx 16rpx;
  725. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  726. }
  727. .service-item {
  728. width: 25%;
  729. display: flex;
  730. flex-direction: column;
  731. align-items: center;
  732. padding: 16rpx 0;
  733. }
  734. .service-icon {
  735. font-size: 48rpx;
  736. margin-bottom: 8rpx;
  737. }
  738. .service-label {
  739. font-size: 22rpx;
  740. color: #666;
  741. }
  742. /* 底部菜单 */
  743. .menu-list {
  744. margin: 30rpx 30rpx 0;
  745. background: #fff;
  746. border-radius: 16rpx;
  747. }
  748. .menu-item {
  749. padding: 30rpx;
  750. border-bottom: 1rpx solid #f0f0f0;
  751. display: flex;
  752. justify-content: space-between;
  753. font-size: 28rpx;
  754. }
  755. .menu-item:last-child {
  756. border-bottom: none;
  757. }
  758. .arrow {
  759. color: #ccc;
  760. font-size: 32rpx;
  761. }
  762. .logout-item {
  763. color: #EF4444;
  764. }
  765. /* 未登录 */
  766. .login-guide-section {
  767. display: flex;
  768. flex-direction: column;
  769. align-items: center;
  770. padding: 60rpx 40rpx;
  771. margin: 30rpx;
  772. background: #fff;
  773. border-radius: 20rpx;
  774. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  775. }
  776. .login-guide-text {
  777. font-size: 26rpx;
  778. color: #999;
  779. text-align: center;
  780. margin-bottom: 30rpx;
  781. line-height: 1.6;
  782. }
  783. .login-guide-section .login-btn {
  784. width: 60%;
  785. height: 80rpx;
  786. line-height: 80rpx;
  787. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  788. color: #fff;
  789. font-size: 30rpx;
  790. font-weight: bold;
  791. border-radius: 40rpx;
  792. text-align: center;
  793. border: none;
  794. }
  795. .login-prompt .login-btn::after {
  796. border: none;
  797. }
  798. /* 退出切换 */
  799. .exit-switch {
  800. margin: 20rpx 30rpx 0;
  801. padding: 16rpx 24rpx;
  802. background: #FEF3C7;
  803. border-radius: 12rpx;
  804. text-align: center;
  805. font-size: 26rpx;
  806. color: #92400E;
  807. }
  808. </style>