index.vue 24 KB

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