index.vue 21 KB

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