index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037
  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. <!-- 品牌定位语 -->
  8. <view class="brand-strap">
  9. <text class="brand-strap-text">分享价值,收获财富</text>
  10. </view>
  11. <!-- 月度引导语 -->
  12. <view class="monthly-guidance" v-if="!isLoggedIn">
  13. <text class="guidance-icon">💧</text>
  14. <text class="guidance-text">{{ monthlyGuidance }}</text>
  15. </view>
  16. <!-- 登录引导 -->
  17. <view class="login-guide-section">
  18. <LoginGuideCard
  19. title="解锁财富能量与推广收益"
  20. :items="[
  21. '查看家庭财富能量仪表盘与推广收益',
  22. '管理邀请返利,开通会员享专属折扣',
  23. '浏览商城精选商品,一键加入购物车'
  24. ]" />
  25. </view>
  26. <!-- 商城精选预览(无需登录) -->
  27. <view class="section">
  28. <view class="section-header">
  29. <text class="section-title">🛍️ 商城精选</text>
  30. <text class="section-more" @click="goToShop">查看全部 ›</text>
  31. </view>
  32. <scroll-view scroll-x class="product-scroll" show-scrollbar="false">
  33. <view class="product-list">
  34. <view class="product-card" v-for="(item, idx) in guestProducts" :key="idx" @click="goProductDetail(item.id)">
  35. <image class="product-img" :src="getImageUrl(item.coverImage || item.image) || '/static/default-product.png'" mode="aspectFill" />
  36. <text class="product-name">{{ item.name }}</text>
  37. <text class="product-price">¥{{ item.price || 0 }}</text>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <template v-else>
  44. <!-- 家庭成员选择条 -->
  45. <FamilyMemberStrip
  46. v-if="currentView === 'self' && isLoggedIn"
  47. :members="familyMembersVisible"
  48. :selectedMemberId="selectedMemberId"
  49. @select="onFamilyMemberSelect"
  50. @removed="loadFamilyMembersVisible" />
  51. <!-- 身克富杠杆警告 -->
  52. <body-wealth-alert
  53. :status="bodyWealthStatus"
  54. :message="bodyWealthMessage"
  55. :showTip="true" />
  56. <!-- 财富能量环 -->
  57. <WealthEnergyRing
  58. :score="wealthScore"
  59. :delta="deltaPercent" />
  60. <!-- 财富成长 -->
  61. <view class="section stream-section">
  62. <view class="section-header">
  63. <text class="section-title">💰 财富成长</text>
  64. <text class="section-sub">记录家庭财富积累过程,看到每月的成长变化</text>
  65. </view>
  66. <view class="stream-stages">
  67. <view
  68. class="stage-card"
  69. :class="{ active: stage.key === currentStage }"
  70. v-for="stage in streamStages"
  71. :key="stage.key">
  72. <text class="stage-icon">{{ stage.icon }}</text>
  73. <text class="stage-name">{{ stage.name }}</text>
  74. <text class="stage-desc">{{ stage.desc }}</text>
  75. <text class="stage-range">{{ stage.range }}</text>
  76. </view>
  77. </view>
  78. <view class="stream-water">
  79. <view class="stream-water-fill" :style="{ width: wealthScore + '%' }"></view>
  80. </view>
  81. <text class="stream-percent">水位 {{ wealthScore }}%</text>
  82. <text class="stream-tip">{{ streamTip }}</text>
  83. </view>
  84. <!-- 子维度水滴 -->
  85. <wealth-sub-scores
  86. :role="role"
  87. :skill="wealthSkill"
  88. :altruism="wealthAltruism"
  89. :income="wealthIncome"
  90. :fx="wealthFx" />
  91. <!-- 子维度评分表 -->
  92. <dimension-sub-dims
  93. v-if="isLoggedIn && wealthSubDims.length > 0"
  94. title="💧 财富维度构成"
  95. subtitle="家庭财富能量的各个方面"
  96. accent-color="#F59E0B"
  97. :dims="wealthSubDims" />
  98. <!-- 财富数据卡(家长) -->
  99. <view class="section" v-if="role === 'parent'">
  100. <view class="disc-card">
  101. <text class="disc-label">💰 累计收益</text>
  102. <text class="disc-value">¥{{ wealthData.totalEarnings || 0 }}</text>
  103. <text class="disc-sub">较上月 ↑ {{ deltaPercent }}%</text>
  104. </view>
  105. <view class="disc-sub-row">
  106. <view class="disc-sub-card" @click="goToIncome">
  107. <text class="disc-sub-label">可提现</text>
  108. <text class="disc-sub-value">¥{{ wealthData.availableAmount || 0 }}</text>
  109. <text class="disc-sub-action">提现 →</text>
  110. </view>
  111. <view class="disc-sub-card" @click="goToAchievements">
  112. <text class="disc-sub-label">邀请人数</text>
  113. <text class="disc-sub-value">{{ wealthData.referralCount || 0 }}人</text>
  114. <text class="disc-sub-action">邀请 →</text>
  115. </view>
  116. </view>
  117. <view class="referral-code-bar" v-if="wealthData.referralCode" @click="copyReferralCode">
  118. <text class="referral-code-label">我的邀请码</text>
  119. <text class="referral-code-value">{{ wealthData.referralCode }}</text>
  120. <text class="referral-code-copy">复制</text>
  121. </view>
  122. </view>
  123. <!-- 财富数据卡(孩子) -->
  124. <view class="section" v-else>
  125. <view class="child-wealth-card">
  126. <view class="child-wealth-item">
  127. <text class="child-wealth-icon">⭐</text>
  128. <text class="child-wealth-value">{{ wealthIncome || 0 }}</text>
  129. <text class="child-wealth-label">累计积分</text>
  130. </view>
  131. <view class="child-wealth-item">
  132. <text class="child-wealth-icon">📝</text>
  133. <text class="child-wealth-value">{{ taskPercent }}%</text>
  134. <text class="child-wealth-label">任务完成</text>
  135. </view>
  136. <view class="child-wealth-item">
  137. <text class="child-wealth-icon">🏆</text>
  138. <text class="child-wealth-value">{{ badgeCount }}</text>
  139. <text class="child-wealth-label">已获徽章</text>
  140. </view>
  141. </view>
  142. <view class="child-trend">
  143. <text class="child-trend-title">📊 本周成长趋势</text>
  144. <view class="child-trend-bars">
  145. <view class="trend-bar" v-for="(h, i) in weekTrend" :key="i" :style="{ height: h + '%' }"></view>
  146. </view>
  147. <view class="child-trend-days">
  148. <text class="trend-day" v-for="(d, i) in weekDays" :key="i">{{ d }}</text>
  149. </view>
  150. </view>
  151. </view>
  152. <!-- 保单管理 -->
  153. <view class="section" v-if="insuranceLoaded">
  154. <view class="section-header">
  155. <text class="section-title">🛡️ 保单管理</text>
  156. <text class="section-more" @click="goToInsuranceList">查看更多 ›</text>
  157. </view>
  158. <view class="insurance-card" v-if="insuranceList.length === 0">
  159. <view class="insurance-empty">
  160. <text class="insurance-empty-icon">📋</text>
  161. <text class="insurance-empty-text">暂无保单</text>
  162. </view>
  163. </view>
  164. <view class="insurance-card" v-else>
  165. <view class="insurance-item" v-for="(item, idx) in insuranceList" :key="idx" @click="goToInsuranceList">
  166. <view class="insurance-item-header">
  167. <text class="insurance-item-name">{{ item.policyName }}</text>
  168. <text class="insurance-item-status" :class="'status-' + item.status">{{ getPolicyStatusLabel(item.status) }}</text>
  169. </view>
  170. <view class="insurance-item-row">
  171. <text class="insurance-item-label">保险公司</text>
  172. <text class="insurance-item-value">{{ item.insuranceCompany || '未知' }}</text>
  173. </view>
  174. <view class="insurance-item-row">
  175. <text class="insurance-item-label">被保人</text>
  176. <text class="insurance-item-value">{{ item.insuredPerson }}</text>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <!-- 富维度介绍卡片 -->
  182. <DimensionIntroCard dimCode="wealth" v-if="isLoggedIn" learn-more-url="/pages/wealth/dimension-intro" />
  183. </template>
  184. </view>
  185. </template>
  186. <script>
  187. import TabTransition from '../../components/tab-transition.vue'
  188. import WealthEnergyRing from '../../components/WealthEnergyRing.vue'
  189. import WealthSubScores from '../../components/WealthSubScores.vue'
  190. import BodyWealthAlert from '../../components/BodyWealthAlert.vue'
  191. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  192. import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
  193. import DimensionSubDims from '../../components/DimensionSubDims.vue'
  194. import {
  195. getChildren,
  196. getWealthDetail,
  197. getReferralCode,
  198. getReferralSummary,
  199. getCommissionSummary,
  200. getFamilyMemberList,
  201. getInsuranceList,
  202. productList
  203. } from '../../utils/api.js'
  204. import nav from '../../utils/nav.js'
  205. import config from '../../config.js'
  206. export default {
  207. components: { TabTransition, WealthEnergyRing, WealthSubScores, BodyWealthAlert, FamilyMemberStrip, DimensionIntroCard, DimensionSubDims },
  208. data() {
  209. return {
  210. showTabTransition: true,
  211. isLoggedIn: false,
  212. role: 'parent',
  213. // 五维评分
  214. wealthScore: 0,
  215. // 子维度 - 利他创富四维(家长/孩子共用字段)
  216. wealthSkill: null,
  217. wealthAltruism: null,
  218. wealthIncome: null,
  219. wealthFx: null,
  220. // 子维度汇总(DimensionSubDims 用)
  221. wealthSubDims: [],
  222. // 身克富杠杆
  223. bodyWealthStatus: 'normal',
  224. bodyWealthMessage: '',
  225. // 财富数据
  226. wealthData: {
  227. totalEarnings: 0,
  228. availableAmount: 0,
  229. referralCount: 0,
  230. referralCode: ''
  231. },
  232. // 财富成长
  233. deltaPercent: 5.2,
  234. streamStages: [
  235. { key: 'start', icon: '💧', name: '起步', desc: '新人阶段', range: '0-30%' },
  236. { key: 'mid', icon: '🌊', name: '汇流', desc: '成长阶段', range: '30-70%' },
  237. { key: 'surge', icon: '🌊🌊', name: '奔涌', desc: '达人阶段', range: '70-100%' }
  238. ],
  239. // 孩子数据
  240. taskPercent: 0,
  241. badgeCount: 0,
  242. weekTrend: [30, 40, 35, 50, 60, 55, 70],
  243. weekDays: ['一', '二', '三', '四', '五', '六', '日'],
  244. // 服务列表
  245. serviceList: [
  246. { icon: '📝', label: '记账打卡', action: 'goToCheckin' },
  247. { icon: '🛡️', label: '保单管理', action: 'goToInsurance' },
  248. { icon: '🎨', label: '创客中心', action: 'goToCreator' },
  249. { icon: '🏪', label: '商城首页', action: 'goToShop' },
  250. { icon: '🛒', label: '购物车', action: 'goToCart' },
  251. { icon: '📋', label: '我的订单', action: 'goToOrders' },
  252. { icon: '🔄', label: '售后服务', action: 'goToAfterSales' },
  253. { icon: '📊', label: '收益中心', action: 'goToIncome' },
  254. { icon: '💎', label: '家庭CF值', action: 'goToFamilyCf' }
  255. ],
  256. children: [],
  257. familyMembersVisible: [],
  258. selectedMemberId: null,
  259. guestProducts: [],
  260. // 保单列表
  261. insuranceList: [],
  262. insuranceLoaded: false,
  263. }
  264. },
  265. computed: {
  266. activeChildId() {
  267. if (this.role === 'child') {
  268. return uni.getStorageSync('currentChildId')
  269. }
  270. return ''
  271. },
  272. currentStage() {
  273. var s = this.wealthScore
  274. if (s >= 70) return 'surge'
  275. if (s >= 30) return 'mid'
  276. return 'start'
  277. },
  278. streamTip() {
  279. var s = this.wealthScore
  280. if (s >= 70) return '🎉 已是富足达人,继续引领全家成长!'
  281. if (s >= 30) return '💡 坚持分享,下一阶段"奔涌"在望'
  282. return '🌱 从今天开始,迈出创富第一步'
  283. }
  284. },
  285. onShow() {
  286. this.showTabTransition = true
  287. var token = uni.getStorageSync('token')
  288. if (!token) {
  289. this.isLoggedIn = false
  290. this.loadGuestProducts()
  291. this._watchPageReady()
  292. return
  293. }
  294. this.isLoggedIn = true
  295. var currentRole = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || 'parent'
  296. if (currentRole === 'teacher') {
  297. uni.redirectTo({ url: '/pages/teacher/teacher-profile' })
  298. return
  299. }
  300. this.role = currentRole
  301. this.loadChildren()
  302. this.loadWealthDetail()
  303. this.loadWealthData()
  304. this.loadFamilyMembersVisible()
  305. this.loadInsuranceList()
  306. this._watchPageReady()
  307. },
  308. /** 每月引导语 */
  309. monthlyGuidance: function() {
  310. var month = new Date().getMonth()
  311. var messages = [
  312. '一月:理财从记账开始,养习惯',
  313. '二月:新年规划,梳理家庭收支',
  314. '三月:春耕时节,播种财富种子',
  315. '四月:清明踏青,规划家庭支出',
  316. '五月:劳动节后,复盘收支状况',
  317. '六月:年中复盘,调整财富目标',
  318. '七月:暑期规划,优化家庭消费',
  319. '八月:开学季,教育专项规划',
  320. '九月:金秋收获,检视推广收益',
  321. '十月:国庆消费,理性理财',
  322. '十一月:年终冲刺,盘点年度收益',
  323. '十二月:年度总结,规划来年财富'
  324. ]
  325. return messages[month] || messages[0]
  326. },
  327. methods: {
  328. onFamilyMemberSelect(member) {
  329. this.selectedMemberId = member.id
  330. },
  331. loadFamilyMembersVisible() {
  332. var self = this
  333. getFamilyMemberList({ visibleOnly: true }).then(function(res) {
  334. self.familyMembersVisible = res.data || []
  335. }).catch(function(e) {
  336. console.log('获取可见家庭成员失败', e)
  337. self.familyMembersVisible = []
  338. })
  339. },
  340. loadInsuranceList() {
  341. var self = this
  342. this.insuranceLoaded = false
  343. getInsuranceList({}).then(function(res) {
  344. if (res && res.code === 200) {
  345. self.insuranceList = (res.data || []).slice(0, 3)
  346. }
  347. self.insuranceLoaded = true
  348. }).catch(function() {
  349. self.insuranceLoaded = true
  350. })
  351. },
  352. getPolicyStatusLabel: function(status) {
  353. var map = { active: '有效', expired: '已过期', cancelled: '已取消' }
  354. return map[status] || status || '未知'
  355. },
  356. goLogin() {
  357. uni.navigateTo({ url: '/pages/login/login' })
  358. },
  359. _watchPageReady() {
  360. var self = this
  361. this.$nextTick(function() {
  362. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  363. })
  364. },
  365. async loadChildren() {
  366. try {
  367. var res = await getChildren()
  368. this.children = res.data || []
  369. } catch (e) {
  370. console.error('获取孩子列表失败', e)
  371. }
  372. },
  373. async loadWealthDetail() {
  374. var memberId = null
  375. var memberType = this.role
  376. if (this.role === 'child') {
  377. memberId = uni.getStorageSync('currentChildId')
  378. if (!memberId && this.children.length > 0) {
  379. memberId = this.children[0].id
  380. }
  381. } else {
  382. memberId = uni.getStorageSync('userId')
  383. }
  384. if (!memberId) return
  385. try {
  386. var res = await getWealthDetail(memberId, memberType)
  387. if (res && res.data) {
  388. var d = res.data
  389. this.wealthScore = d.wealthScore || 0
  390. // 利他创富四子维度(家长/孩子共用字段)
  391. this.wealthSkill = d.wealthSkill
  392. this.wealthAltruism = d.wealthAltruism
  393. this.wealthIncome = d.wealthIncome
  394. this.wealthFx = d.wealthFx
  395. // 身克富杠杆状态
  396. this.bodyWealthStatus = d.bodyWealthStatus || 'normal'
  397. this.bodyWealthMessage = d.bodyWealthMessage || ''
  398. // 子维度汇总(供 DimensionSubDims 使用)
  399. if (memberType === 'parent') {
  400. this.wealthSubDims = [
  401. { label: '个人能力', score: this.wealthSkill || 0, desc: '服务商资质与成长学习' },
  402. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '邀请分享帮助他人' },
  403. { label: 'CF值积累', score: this.wealthIncome || 0, desc: '家庭第二收入曲线' },
  404. { label: '财务素养', score: this.wealthFx || 0, desc: '记账理财储蓄习惯' }
  405. ]
  406. } else {
  407. this.wealthSubDims = [
  408. { label: '学业能力', score: this.wealthSkill || 0, desc: '测评成绩与进步趋势' },
  409. { label: '利他贡献', score: this.wealthAltruism || 0, desc: '帮助他人与分享' },
  410. { label: '积分积累', score: this.wealthIncome || 0, desc: '完成任务获取积分' },
  411. { label: '财务素养', score: this.wealthFx || 0, desc: '财商学习与储蓄习惯' }
  412. ]
  413. }
  414. }
  415. } catch (e) {
  416. console.error('获取富维度详情失败', e)
  417. }
  418. },
  419. async loadWealthData() {
  420. if (this.role !== 'parent') return
  421. try {
  422. var codeRes = await getReferralCode()
  423. if (codeRes && codeRes.code === 200 && codeRes.data) {
  424. this.wealthData.referralCode = codeRes.data.code || codeRes.data || ''
  425. }
  426. } catch (e) {
  427. console.error('获取邀请码失败', e)
  428. }
  429. try {
  430. var summaryRes = await getReferralSummary()
  431. if (summaryRes && summaryRes.code === 200 && summaryRes.data) {
  432. this.wealthData.referralCount = summaryRes.data.totalCount || summaryRes.data.count || 0
  433. }
  434. } catch (e) {
  435. console.error('获取邀请统计失败', e)
  436. }
  437. try {
  438. var commissionRes = await getCommissionSummary()
  439. if (commissionRes && commissionRes.code === 200 && commissionRes.data) {
  440. this.wealthData.totalEarnings = commissionRes.data.totalEarnings || 0
  441. this.wealthData.availableAmount = commissionRes.data.availableAmount || 0
  442. }
  443. } catch (e) {
  444. console.error('获取佣金统计失败', e)
  445. }
  446. },
  447. copyReferralCode() {
  448. if (!this.wealthData.referralCode) return
  449. uni.setClipboardData({
  450. data: this.wealthData.referralCode,
  451. success: function() {
  452. uni.showToast({ title: '邀请码已复制', icon: 'success' })
  453. }
  454. })
  455. },
  456. logout() {
  457. uni.showModal({
  458. title: '退出登录',
  459. content: '确定要退出登录吗?',
  460. success: function(res) {
  461. if (res.confirm) {
  462. uni.clearStorageSync()
  463. uni.reLaunch({ url: '/pages/login/login' })
  464. }
  465. }
  466. })
  467. },
  468. goToCheckin() {
  469. uni.navigateTo({ url: '/pages/wealth-sub/checkin' })
  470. },
  471. goToInsurance() {
  472. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  473. },
  474. goToInsuranceList: function() {
  475. uni.navigateTo({ url: '/pages/wealth-sub/insurance-list' })
  476. },
  477. goToCreator() {
  478. uni.navigateTo({ url: '/pages/promotion/index' })
  479. },
  480. goToShop() {
  481. uni.navigateTo({ url: '/pages/shop/index/index' })
  482. },
  483. goToOrders() {
  484. uni.navigateTo({ url: '/pages/shop/order-list/order-list' })
  485. },
  486. goToAfterSales() {
  487. uni.navigateTo({ url: '/pages/shop/after-sales/after-sales' })
  488. },
  489. goToIncome() {
  490. uni.navigateTo({ url: '/pages/promotion/commission' })
  491. },
  492. goToFamilyCf() {
  493. uni.navigateTo({ url: '/pages/wealth-cf/index' })
  494. },
  495. goToAchievements() {
  496. uni.navigateTo({ url: '/pages/rewards/badge' })
  497. },
  498. goToNetwork() {
  499. uni.navigateTo({ url: '/pages/promotion/team' })
  500. },
  501. goToCart() {
  502. uni.navigateTo({ url: '/pages/shop/cart/cart' })
  503. },
  504. loadGuestProducts() {
  505. var self = this
  506. productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
  507. if (res.code === 200 && res.data && res.data.records) {
  508. self.guestProducts = res.data.records.slice(0, 4)
  509. }
  510. }).catch(function() {})
  511. },
  512. goProductDetail(id) {
  513. uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
  514. },
  515. getImageUrl: function(path) {
  516. return config.API_BASE_URL + path
  517. },
  518. onServiceClick(action) {
  519. if (this[action]) {
  520. this[action]()
  521. }
  522. }
  523. }
  524. }
  525. </script>
  526. .view-toggle {
  527. display: flex;
  528. margin: 20rpx 30rpx;
  529. background: rgba(255,255,255,0.12);
  530. border-radius: 12rpx;
  531. padding: 6rpx;
  532. }
  533. .toggle-btn {
  534. flex: 1;
  535. text-align: center;
  536. padding: 12rpx 0;
  537. border-radius: 8rpx;
  538. font-size: 26rpx;
  539. color: rgba(255,255,255,0.65);
  540. }
  541. .toggle-btn.active {
  542. background: rgba(255,255,255,0.22);
  543. color: #fff;
  544. font-weight: 600;
  545. }
  546. /* 页面说明 */
  547. .section-sub {
  548. font-size: 22rpx;
  549. color: rgba(255,255,255,0.55);
  550. margin-top: 6rpx;
  551. display: block;
  552. }
  553. /* 得分解读卡片 */
  554. .score-explain-card {
  555. margin: 20rpx 30rpx;
  556. padding: 28rpx 24rpx;
  557. background: rgba(255,255,255,0.1);
  558. border-radius: 20rpx;
  559. border: 1rpx solid rgba(255,255,255,0.15);
  560. }
  561. .explain-header {
  562. display: flex;
  563. align-items: center;
  564. margin-bottom: 14rpx;
  565. }
  566. .explain-icon {
  567. font-size: 36rpx;
  568. margin-right: 10rpx;
  569. }
  570. .explain-title {
  571. font-size: 28rpx;
  572. font-weight: 600;
  573. color: #fff;
  574. }
  575. .explain-text {
  576. font-size: 26rpx;
  577. color: rgba(255,255,255,0.8);
  578. line-height: 1.6;
  579. }
  580. <style scoped>
  581. .container {
  582. min-height: 100vh;
  583. background: #f5f7fa;
  584. padding-bottom: 120rpx;
  585. }
  586. .section {
  587. margin: 20rpx 30rpx;
  588. }
  589. .section-header {
  590. display: flex;
  591. justify-content: space-between;
  592. align-items: center;
  593. margin-bottom: 20rpx;
  594. }
  595. .section-title {
  596. font-size: 30rpx;
  597. font-weight: bold;
  598. color: #333;
  599. }
  600. .section-more {
  601. font-size: 24rpx;
  602. color: #999;
  603. }
  604. /* 财富成长 */
  605. .stream-section {
  606. background: #fff;
  607. border-radius: 20rpx;
  608. padding: 24rpx;
  609. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  610. }
  611. .stream-stages {
  612. display: flex;
  613. justify-content: space-between;
  614. margin-bottom: 20rpx;
  615. }
  616. .stage-card {
  617. flex: 1;
  618. margin: 0 8rpx;
  619. padding: 20rpx;
  620. border-radius: 16rpx;
  621. background: #F5F9FC;
  622. display: flex;
  623. flex-direction: column;
  624. align-items: center;
  625. }
  626. .stage-card.active {
  627. background: #FFF7ED;
  628. border: 2rpx solid #FBBF24;
  629. }
  630. .stage-icon {
  631. font-size: 44rpx;
  632. }
  633. .stage-name {
  634. font-size: 26rpx;
  635. font-weight: bold;
  636. color: #333;
  637. margin-top: 8rpx;
  638. }
  639. .stage-desc {
  640. font-size: 20rpx;
  641. color: #999;
  642. margin-top: 4rpx;
  643. }
  644. .stage-range {
  645. font-size: 20rpx;
  646. color: #F59E0B;
  647. margin-top: 4rpx;
  648. }
  649. .stream-water {
  650. height: 20rpx;
  651. border-radius: 10rpx;
  652. background: #FEF3C7;
  653. overflow: hidden;
  654. }
  655. .stream-water-fill {
  656. height: 100%;
  657. border-radius: 10rpx;
  658. background: linear-gradient(90deg, #F59E0B, #FBBF24);
  659. transition: width 0.8s ease;
  660. }
  661. .stream-percent {
  662. display: block;
  663. text-align: right;
  664. font-size: 22rpx;
  665. color: #F59E0B;
  666. margin-top: 8rpx;
  667. }
  668. .stream-tip {
  669. display: block;
  670. text-align: center;
  671. font-size: 24rpx;
  672. color: #92400E;
  673. margin-top: 12rpx;
  674. }
  675. /* 财富数据主卡 */
  676. .disc-card {
  677. background: linear-gradient(135deg, #FFF7ED, #FEF3C7);
  678. border-radius: 20rpx;
  679. padding: 30rpx;
  680. margin-bottom: 16rpx;
  681. display: flex;
  682. flex-direction: column;
  683. }
  684. .disc-label {
  685. font-size: 26rpx;
  686. color: #92400E;
  687. }
  688. .disc-value {
  689. font-size: 56rpx;
  690. font-weight: bold;
  691. color: #F59E0B;
  692. margin-top: 8rpx;
  693. }
  694. .disc-sub {
  695. font-size: 24rpx;
  696. color: #B45309;
  697. margin-top: 8rpx;
  698. }
  699. .disc-sub-row {
  700. display: flex;
  701. margin-bottom: 16rpx;
  702. }
  703. .disc-sub-card {
  704. flex: 1;
  705. background: #fff;
  706. border-radius: 16rpx;
  707. padding: 24rpx;
  708. display: flex;
  709. flex-direction: column;
  710. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  711. }
  712. .disc-sub-card:first-child {
  713. margin-right: 8rpx;
  714. }
  715. .disc-sub-card:last-child {
  716. margin-left: 8rpx;
  717. }
  718. .disc-sub-label {
  719. font-size: 24rpx;
  720. color: #999;
  721. }
  722. .disc-sub-value {
  723. font-size: 36rpx;
  724. font-weight: bold;
  725. color: #333;
  726. margin-top: 8rpx;
  727. }
  728. .disc-sub-action {
  729. font-size: 22rpx;
  730. color: #F59E0B;
  731. margin-top: 8rpx;
  732. }
  733. /* 孩子财富卡 */
  734. .child-wealth-card {
  735. display: flex;
  736. background: #fff;
  737. border-radius: 20rpx;
  738. padding: 24rpx 0;
  739. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  740. }
  741. .child-wealth-item {
  742. flex: 1;
  743. display: flex;
  744. flex-direction: column;
  745. align-items: center;
  746. }
  747. .child-wealth-icon {
  748. font-size: 44rpx;
  749. }
  750. .child-wealth-value {
  751. font-size: 36rpx;
  752. font-weight: bold;
  753. color: #F59E0B;
  754. margin-top: 8rpx;
  755. }
  756. .child-wealth-label {
  757. font-size: 22rpx;
  758. color: #999;
  759. margin-top: 4rpx;
  760. }
  761. .child-trend {
  762. margin-top: 16rpx;
  763. background: #fff;
  764. border-radius: 20rpx;
  765. padding: 24rpx;
  766. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  767. }
  768. .child-trend-title {
  769. font-size: 26rpx;
  770. color: #333;
  771. font-weight: bold;
  772. }
  773. .child-trend-bars {
  774. display: flex;
  775. align-items: flex-end;
  776. height: 120rpx;
  777. margin-top: 16rpx;
  778. }
  779. .trend-bar {
  780. flex: 1;
  781. margin: 0 6rpx;
  782. background: linear-gradient(180deg, #FBBF24, #F59E0B);
  783. border-radius: 6rpx 6rpx 0 0;
  784. }
  785. .child-trend-days {
  786. display: flex;
  787. margin-top: 8rpx;
  788. }
  789. .trend-day {
  790. flex: 1;
  791. text-align: center;
  792. font-size: 20rpx;
  793. color: #999;
  794. }
  795. /* 邀请码复制条 */
  796. .referral-code-bar {
  797. display: flex;
  798. align-items: center;
  799. background: #fff;
  800. margin-top: 16rpx;
  801. border-radius: 16rpx;
  802. padding: 24rpx 30rpx;
  803. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  804. }
  805. .referral-code-label {
  806. font-size: 26rpx;
  807. color: #666;
  808. margin-right: 16rpx;
  809. }
  810. .referral-code-value {
  811. flex: 1;
  812. font-size: 30rpx;
  813. font-weight: bold;
  814. color: #F59E0B;
  815. letter-spacing: 2rpx;
  816. }
  817. .referral-code-copy {
  818. font-size: 24rpx;
  819. color: #fff;
  820. background: linear-gradient(135deg, #F59E0B, #FBBF24);
  821. padding: 8rpx 24rpx;
  822. border-radius: 20rpx;
  823. }
  824. /* 服务入口 */
  825. .service-grid {
  826. display: flex;
  827. flex-wrap: wrap;
  828. background: #fff;
  829. border-radius: 20rpx;
  830. padding: 24rpx 16rpx;
  831. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  832. }
  833. .service-item {
  834. width: 25%;
  835. display: flex;
  836. flex-direction: column;
  837. align-items: center;
  838. padding: 16rpx 0;
  839. }
  840. .service-icon-wrap {
  841. width: 88rpx;
  842. height: 88rpx;
  843. border-radius: 24rpx;
  844. background: #FFF7ED;
  845. display: flex;
  846. align-items: center;
  847. justify-content: center;
  848. margin-bottom: 8rpx;
  849. }
  850. .service-icon {
  851. font-size: 40rpx;
  852. }
  853. .service-label {
  854. font-size: 22rpx;
  855. color: #666;
  856. }
  857. .logout-item {
  858. color: #EF4444;
  859. }
  860. /* 未登录 */
  861. .login-guide-section {
  862. display: flex;
  863. flex-direction: column;
  864. align-items: center;
  865. padding: 60rpx 40rpx;
  866. margin: 30rpx;
  867. background: #fff;
  868. border-radius: 20rpx;
  869. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  870. }
  871. .login-guide-text {
  872. font-size: 26rpx;
  873. color: #999;
  874. text-align: center;
  875. margin-bottom: 30rpx;
  876. line-height: 1.6;
  877. }
  878. .login-guide-section .login-btn {
  879. width: 60%;
  880. height: 80rpx;
  881. line-height: 80rpx;
  882. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  883. color: #fff;
  884. font-size: 30rpx;
  885. font-weight: bold;
  886. border-radius: 40rpx;
  887. text-align: center;
  888. border: none;
  889. }
  890. .login-prompt .login-btn::after {
  891. border: none;
  892. }
  893. /* 品牌定位语 */
  894. .brand-strap {
  895. margin: 16rpx 30rpx 0;
  896. padding: 20rpx 28rpx;
  897. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
  898. border-radius: 16rpx;
  899. border-left: 4rpx solid #F59E0B;
  900. }
  901. .brand-strap-text {
  902. font-size: 26rpx;
  903. color: #92400E;
  904. font-weight: 500;
  905. }
  906. /* 商城精选预览 */
  907. .product-scroll {
  908. white-space: nowrap;
  909. padding: 0 30rpx;
  910. }
  911. .product-list {
  912. display: inline-flex;
  913. gap: 20rpx;
  914. }
  915. .product-card {
  916. width: 220rpx;
  917. flex-shrink: 0;
  918. background: #fff;
  919. border-radius: 16rpx;
  920. overflow: hidden;
  921. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  922. }
  923. .product-img {
  924. width: 220rpx;
  925. height: 220rpx;
  926. background: #f5f5f5;
  927. }
  928. .product-name {
  929. display: block;
  930. padding: 12rpx 12rpx 4rpx;
  931. font-size: 24rpx;
  932. color: #333;
  933. overflow: hidden;
  934. text-overflow: ellipsis;
  935. white-space: nowrap;
  936. }
  937. .product-price {
  938. display: block;
  939. padding: 4rpx 12rpx 12rpx;
  940. font-size: 26rpx;
  941. font-weight: bold;
  942. color: #F59E0B;
  943. }
  944. /* 保单管理 */
  945. .insurance-card {
  946. background: #fff;
  947. border-radius: 20rpx;
  948. padding: 24rpx;
  949. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  950. }
  951. .insurance-empty {
  952. display: flex;
  953. flex-direction: column;
  954. align-items: center;
  955. padding: 40rpx 0;
  956. }
  957. .insurance-empty-icon { font-size: 60rpx; }
  958. .insurance-empty-text { font-size: 24rpx; color: #999; margin-top: 12rpx; }
  959. .insurance-item {
  960. padding: 16rpx 0;
  961. border-bottom: 1rpx solid #f5f5f5;
  962. }
  963. .insurance-item:last-child { border-bottom: none; }
  964. .insurance-item-header {
  965. display: flex;
  966. justify-content: space-between;
  967. align-items: center;
  968. margin-bottom: 8rpx;
  969. }
  970. .insurance-item-name {
  971. font-size: 26rpx;
  972. font-weight: 600;
  973. color: #333;
  974. }
  975. .insurance-item-status {
  976. font-size: 20rpx;
  977. padding: 4rpx 12rpx;
  978. border-radius: 8rpx;
  979. }
  980. .insurance-item-status.status-active { background: #DCFCE7; color: #16A34A; }
  981. .insurance-item-status.status-expired { background: #FEF2F2; color: #DC2626; }
  982. .insurance-item-status.status-cancelled { background: #F5F5F5; color: #999; }
  983. .insurance-item-row {
  984. display: flex;
  985. justify-content: space-between;
  986. padding: 4rpx 0;
  987. }
  988. .insurance-item-label { font-size: 22rpx; color: #999; }
  989. .insurance-item-value { font-size: 22rpx; color: #666; }
  990. </style>
  991. /* 月度引导语 */
  992. .monthly-guidance {
  993. margin: 0 30rpx 20rpx;
  994. background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.1));
  995. border-radius: 16rpx;
  996. padding: 20rpx 24rpx;
  997. display: flex;
  998. align-items: center;
  999. gap: 12rpx;
  1000. }
  1001. .guidance-icon { font-size: 32rpx; flex-shrink: 0; }
  1002. .guidance-text { font-size: 26rpx; color: #F59E0B; font-weight: 500; }