index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  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="brand-strap">
  12. <text class="brand-strap-text">分享价值,收获财富</text>
  13. </view>
  14. <!-- 登录引导 -->
  15. <view class="login-guide-section">
  16. <LoginGuideCard
  17. title="解锁财富能量与推广收益"
  18. :items="[
  19. '查看家庭财富能量仪表盘与推广收益',
  20. '管理邀请返利,开通会员享专属折扣',
  21. '浏览商城精选商品,一键加入购物车'
  22. ]" />
  23. </view>
  24. <!-- 商城精选预览(无需登录) -->
  25. <view class="section">
  26. <view class="section-header">
  27. <text class="section-title">🛍️ 商城精选</text>
  28. <text class="section-more" @click="goToShop">查看全部 ›</text>
  29. </view>
  30. <scroll-view scroll-x class="product-scroll" show-scrollbar="false">
  31. <view class="product-list">
  32. <view class="product-card" v-for="(item, idx) in guestProducts" :key="idx" @click="goProductDetail(item.id)">
  33. <image class="product-img" :src="item.image || '/static/default-product.png'" mode="aspectFill" />
  34. <text class="product-name">{{ item.name }}</text>
  35. <text class="product-price">¥{{ item.price || 0 }}</text>
  36. </view>
  37. </view>
  38. </scroll-view>
  39. </view>
  40. </template>
  41. <template v-else>
  42. <!-- 品牌头部 -->
  43. <PageBanner theme="wealth"
  44. tagline="利他创富 · 价值共享"
  45. quote="富足源于利他与坚持" />
  46. <!-- 家庭成员选择条 -->
  47. <FamilyMemberStrip
  48. v-if="isLoggedIn"
  49. :members="familyMembersVisible"
  50. :selectedMemberId="selectedMemberId"
  51. @select="onFamilyMemberSelect"
  52. @removed="loadFamilyMembersVisible" />
  53. <!-- 身克富杠杆警告 -->
  54. <body-wealth-alert
  55. :status="bodyWealthStatus"
  56. :message="bodyWealthMessage"
  57. :showTip="true" />
  58. <!-- 财富能量环 -->
  59. <WealthEnergyRing
  60. :score="wealthScore"
  61. :delta="deltaPercent" />
  62. <!-- 成长溪流 -->
  63. <view class="section stream-section">
  64. <view class="section-header">
  65. <text class="section-title">📈 成长溪流</text>
  66. </view>
  67. <view class="stream-stages">
  68. <view
  69. class="stage-card"
  70. :class="{ active: stage.key === currentStage }"
  71. v-for="stage in streamStages"
  72. :key="stage.key">
  73. <text class="stage-icon">{{ stage.icon }}</text>
  74. <text class="stage-name">{{ stage.name }}</text>
  75. <text class="stage-desc">{{ stage.desc }}</text>
  76. <text class="stage-range">{{ stage.range }}</text>
  77. </view>
  78. </view>
  79. <view class="stream-water">
  80. <view class="stream-water-fill" :style="{ width: wealthScore + '%' }"></view>
  81. </view>
  82. <text class="stream-percent">水位 {{ wealthScore }}%</text>
  83. <text class="stream-tip">{{ streamTip }}</text>
  84. </view>
  85. <!-- 子维度水滴 -->
  86. <wealth-sub-scores
  87. :role="role"
  88. :income="wealthIncome"
  89. :achievement="wealthAchievement"
  90. :network="wealthNetwork"
  91. :education="wealthEducation"
  92. :social="wealthSocial"
  93. :points="wealthPoints" />
  94. <!-- 财富数据卡(家长) -->
  95. <view class="section" v-if="role === 'parent'">
  96. <view class="disc-card">
  97. <text class="disc-label">💰 累计收益</text>
  98. <text class="disc-value">¥{{ wealthData.totalEarnings || 0 }}</text>
  99. <text class="disc-sub">较上月 ↑ {{ deltaPercent }}%</text>
  100. </view>
  101. <view class="disc-sub-row">
  102. <view class="disc-sub-card" @click="goToIncome">
  103. <text class="disc-sub-label">可提现</text>
  104. <text class="disc-sub-value">¥{{ wealthData.availableAmount || 0 }}</text>
  105. <text class="disc-sub-action">提现 →</text>
  106. </view>
  107. <view class="disc-sub-card" @click="goToAchievements">
  108. <text class="disc-sub-label">邀请人数</text>
  109. <text class="disc-sub-value">{{ wealthData.referralCount || 0 }}人</text>
  110. <text class="disc-sub-action">邀请 →</text>
  111. </view>
  112. </view>
  113. <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
  114. <text class="referral-code-label">我的邀请码</text>
  115. <text class="referral-code-value">{{ wealthData.referralCode }}</text>
  116. <text class="referral-code-copy">复制</text>
  117. </view>
  118. </view>
  119. <!-- 财富数据卡(孩子) -->
  120. <view class="section" v-else>
  121. <view class="child-wealth-card">
  122. <view class="child-wealth-item">
  123. <text class="child-wealth-icon">⭐</text>
  124. <text class="child-wealth-value">{{ wealthPoints || 0 }}</text>
  125. <text class="child-wealth-label">累计积分</text>
  126. </view>
  127. <view class="child-wealth-item">
  128. <text class="child-wealth-icon">📝</text>
  129. <text class="child-wealth-value">{{ taskPercent }}%</text>
  130. <text class="child-wealth-label">任务完成</text>
  131. </view>
  132. <view class="child-wealth-item">
  133. <text class="child-wealth-icon">🏆</text>
  134. <text class="child-wealth-value">{{ badgeCount }}</text>
  135. <text class="child-wealth-label">已获徽章</text>
  136. </view>
  137. </view>
  138. <view class="child-trend">
  139. <text class="child-trend-title">📊 本周成长趋势</text>
  140. <view class="child-trend-bars">
  141. <view class="trend-bar" v-for="(h, i) in weekTrend" :key="i" :style="{ height: h + '%' }"></view>
  142. </view>
  143. <view class="child-trend-days">
  144. <text class="trend-day" v-for="(d, i) in weekDays" :key="i">{{ d }}</text>
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 财富服务 8 宫格 -->
  149. <view class="section">
  150. <view class="section-header">
  151. <text class="section-title">🚀 财富服务</text>
  152. </view>
  153. <view class="service-grid">
  154. <view class="service-item" v-for="item in serviceList" :key="item.label" @click="onServiceClick(item.action)">
  155. <view class="service-icon-wrap">
  156. <text class="service-icon">{{ item.icon }}</text>
  157. </view>
  158. <text class="service-label">{{ item.label }}</text>
  159. </view>
  160. </view>
  161. </view>
  162. <!-- 富维度介绍卡片 -->
  163. <DimensionIntroCard dimCode="wealth" v-if="isLoggedIn" learn-more-url="/pages/wealth/dimension-intro" />
  164. </template>
  165. </view>
  166. </template>
  167. <script>
  168. import TabTransition from '../../components/tab-transition.vue'
  169. import PageBanner from '../../components/PageBanner.vue'
  170. import WealthEnergyRing from '../../components/WealthEnergyRing.vue'
  171. import WealthSubScores from '../../components/WealthSubScores.vue'
  172. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  173. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  174. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  175. import {
  176. getChildren,
  177. getWealthDetail,
  178. getReferralCode,
  179. getReferralSummary,
  180. getCommissionSummary,
  181. getVisibleFamilyMembers,
  182. productList
  183. } from '../../utils/api.js'
  184. import nav from '../../utils/nav.js'
  185. export default {
  186. components: { TabTransition, PageBanner, WealthEnergyRing, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, DimensionIntroCard },
  187. data() {
  188. return {
  189. showTabTransition: true,
  190. isLoggedIn: false,
  191. role: 'parent',
  192. // 五维评分
  193. wealthScore: 0,
  194. // 子维度 - parent
  195. wealthIncome: null,
  196. wealthAchievement: null,
  197. wealthNetwork: null,
  198. // 子维度 - child
  199. wealthEducation: null,
  200. wealthSocial: null,
  201. wealthPoints: null,
  202. // 身克富杠杆
  203. bodyWealthStatus: 'normal',
  204. bodyWealthMessage: '',
  205. // 财富数据
  206. wealthData: {
  207. totalEarnings: 0,
  208. availableAmount: 0,
  209. referralCount: 0,
  210. referralCode: ''
  211. },
  212. // 成长溪流
  213. deltaPercent: 5.2,
  214. streamStages: [
  215. { key: 'start', icon: '💧', name: '起步', desc: '新人阶段', range: '0-30%' },
  216. { key: 'mid', icon: '🌊', name: '汇流', desc: '成长阶段', range: '30-70%' },
  217. { key: 'surge', icon: '🌊🌊', name: '奔涌', desc: '达人阶段', range: '70-100%' }
  218. ],
  219. // 孩子数据
  220. taskPercent: 0,
  221. badgeCount: 0,
  222. weekTrend: [30, 40, 35, 50, 60, 55, 70],
  223. weekDays: ['一', '二', '三', '四', '五', '六', '日'],
  224. // 服务列表
  225. serviceList: [
  226. { icon: '📝', label: '记账打卡', action: 'goToCheckin' },
  227. { icon: '🛡️', label: '保单管理', action: 'goToInsurance' },
  228. { icon: '🎨', label: '创客中心', action: 'goToCreator' },
  229. { icon: '🏪', label: '商城首页', action: 'goToShop' },
  230. { icon: '🛒', label: '购物车', action: 'goToCart' },
  231. { icon: '📋', label: '我的订单', action: 'goToOrders' },
  232. { icon: '🔄', label: '售后服务', action: 'goToAfterSales' },
  233. { icon: '📊', label: '收益中心', action: 'goToIncome' }
  234. ],
  235. children: [],
  236. familyMembersVisible: [],
  237. selectedMemberId: null,
  238. guestProducts: [],
  239. }
  240. },
  241. computed: {
  242. activeChildId() {
  243. if (this.role === 'child') {
  244. return uni.getStorageSync('currentChildId')
  245. }
  246. return ''
  247. },
  248. currentStage() {
  249. var s = this.wealthScore
  250. if (s >= 70) return 'surge'
  251. if (s >= 30) return 'mid'
  252. return 'start'
  253. },
  254. streamTip() {
  255. var s = this.wealthScore
  256. if (s >= 70) return '🎉 已是富足达人,继续引领全家成长!'
  257. if (s >= 30) return '💡 坚持分享,下一阶段"奔涌"在望'
  258. return '🌱 从今天开始,迈出创富第一步'
  259. }
  260. },
  261. onShow() {
  262. this.showTabTransition = true
  263. var token = uni.getStorageSync('token')
  264. if (!token) {
  265. this.isLoggedIn = false
  266. this.loadGuestProducts()
  267. this._watchPageReady()
  268. return
  269. }
  270. this.isLoggedIn = true
  271. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  272. if (currentRole === 'teacher') {
  273. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  274. return
  275. }
  276. this.role = currentRole
  277. this.loadChildren()
  278. this.loadWealthDetail()
  279. this.loadWealthData()
  280. this.loadFamilyMembersVisible()
  281. this._watchPageReady()
  282. },
  283. methods: {
  284. onFamilyMemberSelect(member) {
  285. this.selectedMemberId = member.id
  286. },
  287. loadFamilyMembersVisible() {
  288. var self = this
  289. getVisibleFamilyMembers().then(function(res) {
  290. self.familyMembersVisible = res.data || []
  291. }).catch(function(e) {
  292. console.log('获取可见家庭成员失败', e)
  293. self.familyMembersVisible = []
  294. })
  295. },
  296. goLogin() {
  297. uni.navigateTo({ url: '/pages/login/login' })
  298. },
  299. _watchPageReady() {
  300. var self = this
  301. this.$nextTick(function() {
  302. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  303. })
  304. },
  305. async loadChildren() {
  306. try {
  307. var res = await getChildren()
  308. this.children = res.data || []
  309. } catch (e) {
  310. console.error('获取孩子列表失败', e)
  311. }
  312. },
  313. async loadWealthDetail() {
  314. var memberId = null
  315. var memberType = this.role
  316. if (this.role === 'child') {
  317. memberId = uni.getStorageSync('currentChildId')
  318. if (!memberId && this.children.length > 0) {
  319. memberId = this.children[0].id
  320. }
  321. } else {
  322. memberId = uni.getStorageSync('userId')
  323. }
  324. if (!memberId) return
  325. try {
  326. var res = await getWealthDetail(memberId, memberType)
  327. if (res && res.data) {
  328. var d = res.data
  329. this.wealthScore = d.wealthScore || 0
  330. if (memberType === 'parent') {
  331. this.wealthIncome = d.wealthIncome
  332. this.wealthAchievement = d.wealthAchievement
  333. this.wealthNetwork = d.wealthNetwork
  334. } else {
  335. this.wealthEducation = d.wealthEducation
  336. this.wealthSocial = d.wealthSocial
  337. this.wealthPoints = d.wealthPoints
  338. }
  339. // 身克富杠杆状态
  340. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  341. this.bodyWealthMessage = d.bodyWealthMessage || ''
  342. }
  343. } catch (e) {
  344. console.error('获取富维度详情失败', e)
  345. }
  346. },
  347. async loadWealthData() {
  348. if (this.role !== 'parent') return
  349. try {
  350. var codeRes = await getReferralCode()
  351. if (codeRes && codeRes.code === 200 && codeRes.data) {
  352. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  353. }
  354. } catch (e) {
  355. console.error('获取邀请码失败', e)
  356. }
  357. try {
  358. var summaryRes = await getReferralSummary()
  359. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  360. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  361. }
  362. } catch (e) {
  363. console.error('获取邀请统计失败', e)
  364. }
  365. try {
  366. var commissionRes = await getCommissionSummary()
  367. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  368. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  369. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  370. }
  371. } catch (e) {
  372. console.error('获取佣金统计失败', e)
  373. }
  374. },
  375. copyReferralCode() {
  376. if (!this.wealthData.referralCode) return
  377. uni.setClipboardData({
  378. data: this.wealthData.referralCode,
  379. success: function() {
  380. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  381. }
  382. })
  383. },
  384. logout() {
  385. uni.showModal({
  386. title: '退出登录',
  387. content: '确定要退出登录吗?',
  388. success: function(res) {
  389. if (res.confirm) {
  390. uni.clearStorageSync()
  391. uni.reLaunch({ url: '/pages/login/login' })
  392. }
  393. }
  394. })
  395. },
  396. goToCheckin() {
  397. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  398. },
  399. goToInsurance() {
  400. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  401. },
  402. goToCreator() {
  403. uni.navigateTo({ url: '/pages/promotion/index' })
  404. },
  405. goToShop() {
  406. uni.navigateTo({ url: '/pages/shop/index/index' })
  407. },
  408. goToOrders() {
  409. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  410. },
  411. goToAfterSales() {
  412. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  413. },
  414. goToIncome() {
  415. uni.navigateTo({ url: '/pages/promotion/commission' })
  416. },
  417. goToAchievements() {
  418. uni.navigateTo({ url: '/pages/rewards/badge' })
  419. },
  420. goToNetwork() {
  421. uni.navigateTo({ url: '/pages/promotion/team' })
  422. },
  423. goToCart() {
  424. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  425. },
  426. loadGuestProducts() {
  427. var self = this
  428. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  429. if (res.code === 200 && res.data && res.data.records) {
  430. self.guestProducts = res.data.records.slice(0, 4)
  431. }
  432. }).catch(function() {})
  433. },
  434. goProductDetail(id) {
  435. uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
  436. },
  437. onServiceClick(action) {
  438. if (this[action]) {
  439. this[action]()
  440. }
  441. }
  442. }
  443. }
  444. </script>
  445. <style scoped>
  446. .container {
  447. min-height: 100vh;
  448. background: #f5f7fa;
  449. padding-bottom: 120rpx;
  450. }
  451. .section {
  452. margin: 20rpx 30rpx;
  453. }
  454. .section-header {
  455. display: flex;
  456. justify-content: space-between;
  457. align-items: center;
  458. margin-bottom: 20rpx;
  459. }
  460. .section-title {
  461. font-size: 30rpx;
  462. font-weight: bold;
  463. color: #333;
  464. }
  465. .section-more {
  466. font-size: 24rpx;
  467. color: #999;
  468. }
  469. /* 成长溪流 */
  470. .stream-section {
  471. background: #fff;
  472. border-radius: 20rpx;
  473. padding: 24rpx;
  474. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  475. }
  476. .stream-stages {
  477. display: flex;
  478. justify-content: space-between;
  479. margin-bottom: 20rpx;
  480. }
  481. .stage-card {
  482. flex: 1;
  483. margin: 0 8rpx;
  484. padding: 20rpx;
  485. border-radius: 16rpx;
  486. background: #F5F9FC;
  487. display: flex;
  488. flex-direction: column;
  489. align-items: center;
  490. }
  491. .stage-card.active {
  492. background: #FFF7ED;
  493. border: 2rpx solid #FBBF24;
  494. }
  495. .stage-icon {
  496. font-size: 44rpx;
  497. }
  498. .stage-name {
  499. font-size: 26rpx;
  500. font-weight: bold;
  501. color: #333;
  502. margin-top: 8rpx;
  503. }
  504. .stage-desc {
  505. font-size: 20rpx;
  506. color: #999;
  507. margin-top: 4rpx;
  508. }
  509. .stage-range {
  510. font-size: 20rpx;
  511. color: #F59E0B;
  512. margin-top: 4rpx;
  513. }
  514. .stream-water {
  515. height: 20rpx;
  516. border-radius: 10rpx;
  517. background: #FEF3C7;
  518. overflow: hidden;
  519. }
  520. .stream-water-fill {
  521. height: 100%;
  522. border-radius: 10rpx;
  523. background: linear-gradient(90deg, #F59E0B, #FBBF24);
  524. transition: width 0.8s ease;
  525. }
  526. .stream-percent {
  527. display: block;
  528. text-align: right;
  529. font-size: 22rpx;
  530. color: #F59E0B;
  531. margin-top: 8rpx;
  532. }
  533. .stream-tip {
  534. display: block;
  535. text-align: center;
  536. font-size: 24rpx;
  537. color: #92400E;
  538. margin-top: 12rpx;
  539. }
  540. /* 财富数据主卡 */
  541. .disc-card {
  542. background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  543. border-radius: 20rpx;
  544. padding: 30rpx;
  545. margin-bottom: 16rpx;
  546. display: flex;
  547. flex-direction: column;
  548. }
  549. .disc-label {
  550. font-size: 26rpx;
  551. color: #92400E;
  552. }
  553. .disc-value {
  554. font-size: 56rpx;
  555. font-weight: bold;
  556. color: #F59E0B;
  557. margin-top: 8rpx;
  558. }
  559. .disc-sub {
  560. font-size: 24rpx;
  561. color: #B45309;
  562. margin-top: 8rpx;
  563. }
  564. .disc-sub-row {
  565. display: flex;
  566. margin-bottom: 16rpx;
  567. }
  568. .disc-sub-card {
  569. flex: 1;
  570. background: #fff;
  571. border-radius: 16rpx;
  572. padding: 24rpx;
  573. display: flex;
  574. flex-direction: column;
  575. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  576. }
  577. .disc-sub-card:first-child {
  578. margin-right: 8rpx;
  579. }
  580. .disc-sub-card:last-child {
  581. margin-left: 8rpx;
  582. }
  583. .disc-sub-label {
  584. font-size: 24rpx;
  585. color: #999;
  586. }
  587. .disc-sub-value {
  588. font-size: 36rpx;
  589. font-weight: bold;
  590. color: #333;
  591. margin-top: 8rpx;
  592. }
  593. .disc-sub-action {
  594. font-size: 22rpx;
  595. color: #F59E0B;
  596. margin-top: 8rpx;
  597. }
  598. /* 孩子财富卡 */
  599. .child-wealth-card {
  600. display: flex;
  601. background: #fff;
  602. border-radius: 20rpx;
  603. padding: 24rpx 0;
  604. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  605. }
  606. .child-wealth-item {
  607. flex: 1;
  608. display: flex;
  609. flex-direction: column;
  610. align-items: center;
  611. }
  612. .child-wealth-icon {
  613. font-size: 44rpx;
  614. }
  615. .child-wealth-value {
  616. font-size: 36rpx;
  617. font-weight: bold;
  618. color: #F59E0B;
  619. margin-top: 8rpx;
  620. }
  621. .child-wealth-label {
  622. font-size: 22rpx;
  623. color: #999;
  624. margin-top: 4rpx;
  625. }
  626. .child-trend {
  627. margin-top: 16rpx;
  628. background: #fff;
  629. border-radius: 20rpx;
  630. padding: 24rpx;
  631. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  632. }
  633. .child-trend-title {
  634. font-size: 26rpx;
  635. color: #333;
  636. font-weight: bold;
  637. }
  638. .child-trend-bars {
  639. display: flex;
  640. align-items: flex-end;
  641. height: 120rpx;
  642. margin-top: 16rpx;
  643. }
  644. .trend-bar {
  645. flex: 1;
  646. margin: 0 6rpx;
  647. background: linear-gradient(180deg, #FBBF24, #F59E0B);
  648. border-radius: 6rpx 6rpx 0 0;
  649. }
  650. .child-trend-days {
  651. display: flex;
  652. margin-top: 8rpx;
  653. }
  654. .trend-day {
  655. flex: 1;
  656. text-align: center;
  657. font-size: 20rpx;
  658. color: #999;
  659. }
  660. /* 邀请码复制条 */
  661. .referral-code-bar {
  662. display: flex;
  663. align-items: center;
  664. background: #fff;
  665. margin-top: 16rpx;
  666. border-radius: 16rpx;
  667. padding: 24rpx 30rpx;
  668. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  669. }
  670. .referral-code-label {
  671. font-size: 26rpx;
  672. color: #666;
  673. margin-right: 16rpx;
  674. }
  675. .referral-code-value {
  676. flex: 1;
  677. font-size: 30rpx;
  678. font-weight: bold;
  679. color: #F59E0B;
  680. letter-spacing: 2rpx;
  681. }
  682. .referral-code-copy {
  683. font-size: 24rpx;
  684. color: #fff;
  685. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  686. padding: 8rpx 24rpx;
  687. border-radius: 20rpx;
  688. }
  689. /* 服务入口 */
  690. .service-grid {
  691. display: flex;
  692. flex-wrap: wrap;
  693. background: #fff;
  694. border-radius: 20rpx;
  695. padding: 24rpx 16rpx;
  696. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  697. }
  698. .service-item {
  699. width: 25%;
  700. display: flex;
  701. flex-direction: column;
  702. align-items: center;
  703. padding: 16rpx 0;
  704. }
  705. .service-icon-wrap {
  706. width: 88rpx;
  707. height: 88rpx;
  708. border-radius: 24rpx;
  709. background: #FFF7ED;
  710. display: flex;
  711. align-items: center;
  712. justify-content: center;
  713. margin-bottom: 8rpx;
  714. }
  715. .service-icon {
  716. font-size: 40rpx;
  717. }
  718. .service-label {
  719. font-size: 22rpx;
  720. color: #666;
  721. }
  722. .logout-item {
  723. color: #EF4444;
  724. }
  725. /* 未登录 */
  726. .login-guide-section {
  727. display: flex;
  728. flex-direction: column;
  729. align-items: center;
  730. padding: 60rpx 40rpx;
  731. margin: 30rpx;
  732. background: #fff;
  733. border-radius: 20rpx;
  734. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  735. }
  736. .login-guide-text {
  737. font-size: 26rpx;
  738. color: #999;
  739. text-align: center;
  740. margin-bottom: 30rpx;
  741. line-height: 1.6;
  742. }
  743. .login-guide-section .login-btn {
  744. width: 60%;
  745. height: 80rpx;
  746. line-height: 80rpx;
  747. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  748. color: #fff;
  749. font-size: 30rpx;
  750. font-weight: bold;
  751. border-radius: 40rpx;
  752. text-align: center;
  753. border: none;
  754. }
  755. .login-prompt .login-btn::after {
  756. border: none;
  757. }
  758. /* 品牌定位语 */
  759. .brand-strap {
  760. margin: 16rpx 30rpx 0;
  761. padding: 20rpx 28rpx;
  762. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
  763. border-radius: 16rpx;
  764. border-left: 4rpx solid #F59E0B;
  765. }
  766. .brand-strap-text {
  767. font-size: 26rpx;
  768. color: #92400E;
  769. font-weight: 500;
  770. }
  771. /* 商城精选预览 */
  772. .product-scroll {
  773. white-space: nowrap;
  774. padding: 0 30rpx;
  775. }
  776. .product-list {
  777. display: inline-flex;
  778. gap: 20rpx;
  779. }
  780. .product-card {
  781. width: 220rpx;
  782. flex-shrink: 0;
  783. background: #fff;
  784. border-radius: 16rpx;
  785. overflow: hidden;
  786. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  787. }
  788. .product-img {
  789. width: 220rpx;
  790. height: 220rpx;
  791. background: #f5f5f5;
  792. }
  793. .product-name {
  794. display: block;
  795. padding: 12rpx 12rpx 4rpx;
  796. font-size: 24rpx;
  797. color: #333;
  798. overflow: hidden;
  799. text-overflow: ellipsis;
  800. white-space: nowrap;
  801. }
  802. .product-price {
  803. display: block;
  804. padding: 4rpx 12rpx 12rpx;
  805. font-size: 26rpx;
  806. font-weight: bold;
  807. color: #F59E0B;
  808. }
  809. </style>