index.vue 21 KB

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