index.vue 21 KB

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