index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  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-icon-wrap">
  155. <text class="service-icon">{{ item.icon }}</text>
  156. </view>
  157. <text class="service-label">{{ item.label }}</text>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- 富维度介绍卡片 -->
  162. <DimensionIntroCard dimCode="wealth" v-if="isLoggedIn" learn-more-url="/pages/wealth/dimension-intro" />
  163. </template>
  164. </view>
  165. </template>
  166. <script>
  167. import TabTransition from '../../components/tab-transition.vue'
  168. import PageBanner from '../../components/PageBanner.vue'
  169. import WealthEnergyRing from '../../components/WealthEnergyRing.vue'
  170. import WealthSubScores from '../../components/WealthSubScores.vue'
  171. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  172. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  173. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  174. import {
  175. getChildren,
  176. getWealthDetail,
  177. getReferralCode,
  178. getReferralSummary,
  179. getCommissionSummary,
  180. getVisibleFamilyMembers,
  181. productList
  182. } from '../../utils/api.js'
  183. import nav from '../../utils/nav.js'
  184. export default {
  185. components: { TabTransition, PageBanner, WealthEnergyRing, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, DimensionIntroCard },
  186. data() {
  187. return {
  188. showTabTransition: true,
  189. isLoggedIn: false,
  190. role: 'parent',
  191. // 五维评分
  192. wealthScore: 0,
  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. // 成长溪流
  212. deltaPercent: 5.2,
  213. streamStages: [
  214. { key: 'start', icon: '💧', name: '起步', desc: '新人阶段', range: '0-30%' },
  215. { key: 'mid', icon: '🌊', name: '汇流', desc: '成长阶段', range: '30-70%' },
  216. { key: 'surge', icon: '🌊🌊', name: '奔涌', desc: '达人阶段', range: '70-100%' }
  217. ],
  218. // 孩子数据
  219. taskPercent: 0,
  220. badgeCount: 0,
  221. weekTrend: [30, 40, 35, 50, 60, 55, 70],
  222. weekDays: ['一', '二', '三', '四', '五', '六', '日'],
  223. // 服务列表
  224. children: [],
  225. familyMembersVisible: [],
  226. selectedMemberId: null,
  227. guestProducts: [],
  228. }
  229. },
  230. computed: {
  231. activeChildId() {
  232. if (this.role === 'child') {
  233. return uni.getStorageSync('currentChildId')
  234. }
  235. return ''
  236. },
  237. currentStage() {
  238. var s = this.wealthScore
  239. if (s >= 70) return 'surge'
  240. if (s >= 30) return 'mid'
  241. return 'start'
  242. },
  243. streamTip() {
  244. var s = this.wealthScore
  245. if (s >= 70) return '🎉 已是富足达人,继续引领全家成长!'
  246. if (s >= 30) return '💡 坚持分享,下一阶段"奔涌"在望'
  247. return '🌱 从今天开始,迈出创富第一步'
  248. }
  249. },
  250. onShow() {
  251. this.showTabTransition = true
  252. var token = uni.getStorageSync('token')
  253. if (!token) {
  254. this.isLoggedIn = false
  255. this.loadGuestProducts()
  256. this._watchPageReady()
  257. return
  258. }
  259. this.isLoggedIn = true
  260. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  261. if (currentRole === 'teacher') {
  262. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  263. return
  264. }
  265. this.role = currentRole
  266. this.loadChildren()
  267. this.loadWealthDetail()
  268. this.loadWealthData()
  269. this.loadFamilyMembersVisible()
  270. this._watchPageReady()
  271. },
  272. methods: {
  273. onFamilyMemberSelect(member) {
  274. this.selectedMemberId = member.id
  275. },
  276. loadFamilyMembersVisible() {
  277. var self = this
  278. getVisibleFamilyMembers().then(function(res) {
  279. self.familyMembersVisible = res.data || []
  280. }).catch(function(e) {
  281. console.log('获取可见家庭成员失败', e)
  282. self.familyMembersVisible = []
  283. })
  284. },
  285. goLogin() {
  286. uni.navigateTo({ url: '/pages/login/login' })
  287. },
  288. _watchPageReady() {
  289. var self = this
  290. this.$nextTick(function() {
  291. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  292. })
  293. },
  294. async loadChildren() {
  295. try {
  296. var res = await getChildren()
  297. this.children = res.data || []
  298. } catch (e) {
  299. console.error('获取孩子列表失败', e)
  300. }
  301. },
  302. async loadWealthDetail() {
  303. var memberId = null
  304. var memberType = this.role
  305. if (this.role === 'child') {
  306. memberId = uni.getStorageSync('currentChildId')
  307. if (!memberId && this.children.length > 0) {
  308. memberId = this.children[0].id
  309. }
  310. } else {
  311. memberId = uni.getStorageSync('userId')
  312. }
  313. if (!memberId) return
  314. try {
  315. var res = await getWealthDetail(memberId, memberType)
  316. if (res && res.data) {
  317. var d = res.data
  318. this.wealthScore = d.wealthScore || 0
  319. if (memberType === 'parent') {
  320. this.wealthIncome = d.wealthIncome
  321. this.wealthAchievement = d.wealthAchievement
  322. this.wealthNetwork = d.wealthNetwork
  323. } else {
  324. this.wealthEducation = d.wealthEducation
  325. this.wealthSocial = d.wealthSocial
  326. this.wealthPoints = d.wealthPoints
  327. }
  328. // 身克富杠杆状态
  329. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  330. this.bodyWealthMessage = d.bodyWealthMessage || ''
  331. }
  332. } catch (e) {
  333. console.error('获取富维度详情失败', e)
  334. }
  335. },
  336. async loadWealthData() {
  337. if (this.role !== 'parent') return
  338. try {
  339. var codeRes = await getReferralCode()
  340. if (codeRes && codeRes.code === 200 && codeRes.data) {
  341. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  342. }
  343. } catch (e) {
  344. console.error('获取邀请码失败', e)
  345. }
  346. try {
  347. var summaryRes = await getReferralSummary()
  348. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  349. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  350. }
  351. } catch (e) {
  352. console.error('获取邀请统计失败', e)
  353. }
  354. try {
  355. var commissionRes = await getCommissionSummary()
  356. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  357. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  358. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  359. }
  360. } catch (e) {
  361. console.error('获取佣金统计失败', e)
  362. }
  363. },
  364. copyReferralCode() {
  365. if (!this.wealthData.referralCode) return
  366. uni.setClipboardData({
  367. data: this.wealthData.referralCode,
  368. success: function() {
  369. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  370. }
  371. })
  372. },
  373. logout() {
  374. uni.showModal({
  375. title: '退出登录',
  376. content: '确定要退出登录吗?',
  377. success: function(res) {
  378. if (res.confirm) {
  379. uni.clearStorageSync()
  380. uni.reLaunch({ url: '/pages/login/login' })
  381. }
  382. }
  383. })
  384. },
  385. goToCheckin() {
  386. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  387. },
  388. goToInsurance() {
  389. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  390. },
  391. goToCreator() {
  392. uni.navigateTo({ url: '/pages/promotion/index' })
  393. },
  394. goToShop() {
  395. uni.navigateTo({ url: '/pages/shop/index/index' })
  396. },
  397. goToOrders() {
  398. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  399. },
  400. goToAfterSales() {
  401. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  402. },
  403. goToIncome() {
  404. uni.navigateTo({ url: '/pages/promotion/commission' })
  405. },
  406. goToAchievements() {
  407. uni.navigateTo({ url: '/pages/rewards/badge' })
  408. },
  409. goToNetwork() {
  410. uni.navigateTo({ url: '/pages/promotion/team' })
  411. },
  412. goToCart() {
  413. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  414. },
  415. loadGuestProducts() {
  416. var self = this
  417. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  418. if (res.code === 200 && res.data && res.data.records) {
  419. self.guestProducts = res.data.records.slice(0, 4)
  420. }
  421. }).catch(function() {})
  422. },
  423. goProductDetail(id) {
  424. uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
  425. },
  426. onServiceClick(action) {
  427. if (this[action]) {
  428. this[action]()
  429. }
  430. }
  431. }
  432. }
  433. </script>
  434. <style scoped>
  435. .container {
  436. min-height: 100vh;
  437. background: #f5f7fa;
  438. padding-bottom: 120rpx;
  439. }
  440. .section {
  441. margin: 20rpx 30rpx;
  442. }
  443. .section-header {
  444. display: flex;
  445. justify-content: space-between;
  446. align-items: center;
  447. margin-bottom: 20rpx;
  448. }
  449. .section-title {
  450. font-size: 30rpx;
  451. font-weight: bold;
  452. color: #333;
  453. }
  454. .section-more {
  455. font-size: 24rpx;
  456. color: #999;
  457. }
  458. /* 成长溪流 */
  459. .stream-section {
  460. background: #fff;
  461. border-radius: 20rpx;
  462. padding: 24rpx;
  463. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  464. }
  465. .stream-stages {
  466. display: flex;
  467. justify-content: space-between;
  468. margin-bottom: 20rpx;
  469. }
  470. .stage-card {
  471. flex: 1;
  472. margin: 0 8rpx;
  473. padding: 20rpx;
  474. border-radius: 16rpx;
  475. background: #F5F9FC;
  476. display: flex;
  477. flex-direction: column;
  478. align-items: center;
  479. }
  480. .stage-card.active {
  481. background: #FFF7ED;
  482. border: 2rpx solid #FBBF24;
  483. }
  484. .stage-icon {
  485. font-size: 44rpx;
  486. }
  487. .stage-name {
  488. font-size: 26rpx;
  489. font-weight: bold;
  490. color: #333;
  491. margin-top: 8rpx;
  492. }
  493. .stage-desc {
  494. font-size: 20rpx;
  495. color: #999;
  496. margin-top: 4rpx;
  497. }
  498. .stage-range {
  499. font-size: 20rpx;
  500. color: #F59E0B;
  501. margin-top: 4rpx;
  502. }
  503. .stream-water {
  504. height: 20rpx;
  505. border-radius: 10rpx;
  506. background: #FEF3C7;
  507. overflow: hidden;
  508. }
  509. .stream-water-fill {
  510. height: 100%;
  511. border-radius: 10rpx;
  512. background: linear-gradient(90deg, #F59E0B, #FBBF24);
  513. transition: width 0.8s ease;
  514. }
  515. .stream-percent {
  516. display: block;
  517. text-align: right;
  518. font-size: 22rpx;
  519. color: #F59E0B;
  520. margin-top: 8rpx;
  521. }
  522. .stream-tip {
  523. display: block;
  524. text-align: center;
  525. font-size: 24rpx;
  526. color: #92400E;
  527. margin-top: 12rpx;
  528. }
  529. /* 财富数据主卡 */
  530. .disc-card {
  531. background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  532. border-radius: 20rpx;
  533. padding: 30rpx;
  534. margin-bottom: 16rpx;
  535. display: flex;
  536. flex-direction: column;
  537. }
  538. .disc-label {
  539. font-size: 26rpx;
  540. color: #92400E;
  541. }
  542. .disc-value {
  543. font-size: 56rpx;
  544. font-weight: bold;
  545. color: #F59E0B;
  546. margin-top: 8rpx;
  547. }
  548. .disc-sub {
  549. font-size: 24rpx;
  550. color: #B45309;
  551. margin-top: 8rpx;
  552. }
  553. .disc-sub-row {
  554. display: flex;
  555. margin-bottom: 16rpx;
  556. }
  557. .disc-sub-card {
  558. flex: 1;
  559. background: #fff;
  560. border-radius: 16rpx;
  561. padding: 24rpx;
  562. display: flex;
  563. flex-direction: column;
  564. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  565. }
  566. .disc-sub-card:first-child {
  567. margin-right: 8rpx;
  568. }
  569. .disc-sub-card:last-child {
  570. margin-left: 8rpx;
  571. }
  572. .disc-sub-label {
  573. font-size: 24rpx;
  574. color: #999;
  575. }
  576. .disc-sub-value {
  577. font-size: 36rpx;
  578. font-weight: bold;
  579. color: #333;
  580. margin-top: 8rpx;
  581. }
  582. .disc-sub-action {
  583. font-size: 22rpx;
  584. color: #F59E0B;
  585. margin-top: 8rpx;
  586. }
  587. /* 孩子财富卡 */
  588. .child-wealth-card {
  589. display: flex;
  590. background: #fff;
  591. border-radius: 20rpx;
  592. padding: 24rpx 0;
  593. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  594. }
  595. .child-wealth-item {
  596. flex: 1;
  597. display: flex;
  598. flex-direction: column;
  599. align-items: center;
  600. }
  601. .child-wealth-icon {
  602. font-size: 44rpx;
  603. }
  604. .child-wealth-value {
  605. font-size: 36rpx;
  606. font-weight: bold;
  607. color: #F59E0B;
  608. margin-top: 8rpx;
  609. }
  610. .child-wealth-label {
  611. font-size: 22rpx;
  612. color: #999;
  613. margin-top: 4rpx;
  614. }
  615. .child-trend {
  616. margin-top: 16rpx;
  617. background: #fff;
  618. border-radius: 20rpx;
  619. padding: 24rpx;
  620. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  621. }
  622. .child-trend-title {
  623. font-size: 26rpx;
  624. color: #333;
  625. font-weight: bold;
  626. }
  627. .child-trend-bars {
  628. display: flex;
  629. align-items: flex-end;
  630. height: 120rpx;
  631. margin-top: 16rpx;
  632. }
  633. .trend-bar {
  634. flex: 1;
  635. margin: 0 6rpx;
  636. background: linear-gradient(180deg, #FBBF24, #F59E0B);
  637. border-radius: 6rpx 6rpx 0 0;
  638. }
  639. .child-trend-days {
  640. display: flex;
  641. margin-top: 8rpx;
  642. }
  643. .trend-day {
  644. flex: 1;
  645. text-align: center;
  646. font-size: 20rpx;
  647. color: #999;
  648. }
  649. /* 邀请码复制条 */
  650. .referral-code-bar {
  651. display: flex;
  652. align-items: center;
  653. background: #fff;
  654. margin-top: 16rpx;
  655. border-radius: 16rpx;
  656. padding: 24rpx 30rpx;
  657. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  658. }
  659. .referral-code-label {
  660. font-size: 26rpx;
  661. color: #666;
  662. margin-right: 16rpx;
  663. }
  664. .referral-code-value {
  665. flex: 1;
  666. font-size: 30rpx;
  667. font-weight: bold;
  668. color: #F59E0B;
  669. letter-spacing: 2rpx;
  670. }
  671. .referral-code-copy {
  672. font-size: 24rpx;
  673. color: #fff;
  674. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  675. padding: 8rpx 24rpx;
  676. border-radius: 20rpx;
  677. }
  678. /* 服务入口 */
  679. .service-grid {
  680. display: flex;
  681. flex-wrap: wrap;
  682. background: #fff;
  683. border-radius: 20rpx;
  684. padding: 24rpx 16rpx;
  685. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  686. }
  687. .service-item {
  688. width: 25%;
  689. display: flex;
  690. flex-direction: column;
  691. align-items: center;
  692. padding: 16rpx 0;
  693. }
  694. .service-icon-wrap {
  695. width: 88rpx;
  696. height: 88rpx;
  697. border-radius: 24rpx;
  698. background: #FFF7ED;
  699. display: flex;
  700. align-items: center;
  701. justify-content: center;
  702. margin-bottom: 8rpx;
  703. }
  704. .service-icon {
  705. font-size: 40rpx;
  706. }
  707. .service-label {
  708. font-size: 22rpx;
  709. color: #666;
  710. }
  711. .logout-item {
  712. color: #EF4444;
  713. }
  714. /* 未登录 */
  715. .login-guide-section {
  716. display: flex;
  717. flex-direction: column;
  718. align-items: center;
  719. padding: 60rpx 40rpx;
  720. margin: 30rpx;
  721. background: #fff;
  722. border-radius: 20rpx;
  723. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  724. }
  725. .login-guide-text {
  726. font-size: 26rpx;
  727. color: #999;
  728. text-align: center;
  729. margin-bottom: 30rpx;
  730. line-height: 1.6;
  731. }
  732. .login-guide-section .login-btn {
  733. width: 60%;
  734. height: 80rpx;
  735. line-height: 80rpx;
  736. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  737. color: #fff;
  738. font-size: 30rpx;
  739. font-weight: bold;
  740. border-radius: 40rpx;
  741. text-align: center;
  742. border: none;
  743. }
  744. .login-prompt .login-btn::after {
  745. border: none;
  746. }
  747. /* 品牌定位语 */
  748. .brand-strap {
  749. margin: 16rpx 30rpx 0;
  750. padding: 20rpx 28rpx;
  751. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
  752. border-radius: 16rpx;
  753. border-left: 4rpx solid #F59E0B;
  754. }
  755. .brand-strap-text {
  756. font-size: 26rpx;
  757. color: #92400E;
  758. font-weight: 500;
  759. }
  760. /* 商城精选预览 */
  761. .product-scroll {
  762. white-space: nowrap;
  763. padding: 0 30rpx;
  764. }
  765. .product-list {
  766. display: inline-flex;
  767. gap: 20rpx;
  768. }
  769. .product-card {
  770. width: 220rpx;
  771. flex-shrink: 0;
  772. background: #fff;
  773. border-radius: 16rpx;
  774. overflow: hidden;
  775. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  776. }
  777. .product-img {
  778. width: 220rpx;
  779. height: 220rpx;
  780. background: #f5f5f5;
  781. }
  782. .product-name {
  783. display: block;
  784. padding: 12rpx 12rpx 4rpx;
  785. font-size: 24rpx;
  786. color: #333;
  787. overflow: hidden;
  788. text-overflow: ellipsis;
  789. white-space: nowrap;
  790. }
  791. .product-price {
  792. display: block;
  793. padding: 4rpx 12rpx 12rpx;
  794. font-size: 26rpx;
  795. font-weight: bold;
  796. color: #F59E0B;
  797. }
  798. </style>