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