index.vue 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149
  1. <template>
  2. <view class="container">
  3. <!-- Tabbar 切换过渡页 -->
  4. <tab-transition v-if="showTabTransition" dimCode="mind" ref="tabTransition" @close="showTabTransition = false" />
  5. <!-- 品牌头部 -->
  6. <PageBanner theme="mind-wisdom"
  7. tagline="心智成长 · 智慧人生"
  8. quote="知己知彼,百战不殆" />
  9. <!-- ===== 家庭天盘模块(今日运势 / 今日心情 / 吉位) ===== -->
  10. <FamilyTianpanCard
  11. v-if="isLoggedIn"
  12. :visible="isLoggedIn"
  13. :fortune="dailyFortuneSafe"
  14. :mood="todayMood"
  15. :dominantElement="dominantElementSafe"
  16. :weeklyTip="familyWeeklyInsight"
  17. :traditionalData="traditionalData" />
  18. <!-- 家庭成员选择条 -->
  19. <FamilyMemberStrip
  20. v-if="isLoggedIn"
  21. :members="familyMembersVisible"
  22. :selectedMemberId="selectedMemberId"
  23. @select="onFamilyMemberSelect"
  24. @removed="loadFamilyMembersVisible" />
  25. <!-- 游客登录引导卡 -->
  26. <template v-if="!isLoggedIn">
  27. <LoginGuideCard
  28. title="登录后查看心理成长报告"
  29. :items="[
  30. '查看EMI心理测评四维分析',
  31. '查看大五人格分析报告',
  32. '阅读专属文章、参与情绪打卡'
  33. ]" />
  34. </template>
  35. <!-- 登录后:五维能量条 -->
  36. <FamilyEnergyBar
  37. v-if="isLoggedIn"
  38. dimensionCode="mind"
  39. :sandboxData="sandboxData" />
  40. <!-- 心理报告卡片(登录后可见) -->
  41. <view class="emi-card" v-if="isLoggedIn && emiData">
  42. <view class="emi-header">
  43. <text class="emi-title">心理测评报告</text>
  44. <view class="emi-overall-wrap">
  45. <text class="emi-overall-label">综合EQ分</text>
  46. <text class="emi-overall-value">{{ emiData.overallScore || 0 }}</text>
  47. <text :class="['emi-overall-level', 'level-' + getScoreLevel(emiData.overallScore || 0)]">
  48. {{ getScoreLevelText(emiData.overallScore || 0) }}
  49. </text>
  50. </view>
  51. </view>
  52. <view class="emi-dimensions">
  53. <view class="emi-dimension" v-for="dim in emiDimensions" :key="dim.key">
  54. <view class="emi-dim-header">
  55. <text class="emi-dim-label">{{ dim.label }}</text>
  56. <view class="emi-dim-values">
  57. <text class="emi-dim-score">{{ emiData[dim.key] || 0 }}</text>
  58. <text :class="['emi-dim-level', 'level-' + getScoreLevel(emiData[dim.key] || 0)]">
  59. {{ getScoreLevelText(emiData[dim.key] || 0) }}
  60. </text>
  61. </view>
  62. </view>
  63. <view class="emi-dim-bar">
  64. <view class="emi-dim-bar-fill" :style="{ width: (emiData[dim.key] || 0) + '%', background: dim.color }"></view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="emi-footer" @click="goEmotionReport">
  69. <text class="emi-footer-text">查看详情</text>
  70. <text class="emi-footer-icon">&#x2192;</text>
  71. </view>
  72. </view>
  73. <!-- 肠脑轴情绪卡片 -->
  74. <view class="section" v-if="gutIndicators && gutIndicators.length > 0">
  75. <view class="section-header">
  76. <text class="section-title">&#x1F9E0; 肠脑情绪关联</text>
  77. </view>
  78. <view class="gut-insight-text" v-if="gutInsight">
  79. <text>{{ gutInsight }}</text>
  80. </view>
  81. <view class="gut-indicator-list">
  82. <view class="gut-indicator-item" v-for="ind in gutIndicators" :key="ind.id">
  83. <view class="gut-indicator-left">
  84. <text class="gut-indicator-name">{{ ind.indicatorName || ind.name }}</text>
  85. </view>
  86. <view class="gut-indicator-bar-track">
  87. <view class="gut-indicator-bar-fill" :style="{ width: (ind.value || 0) + '%', background: indicatorColor(ind.status) }"></view>
  88. </view>
  89. <text class="gut-indicator-value">{{ ind.value }}{{ ind.unit || '%' }}</text>
  90. <text :class="['gut-indicator-status', 'status-' + (ind.status || 'normal')]">{{ statusLabel(ind.status) }}</text>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- ===== 底部:维度任务/活动/商品 ===== -->
  95. <DimensionTasks
  96. v-if="isLoggedIn"
  97. :dimensionCode="currentDimensionCode"
  98. :tasks="dimensionTasks"
  99. @taskClick="onTaskClick"
  100. @moreTasks="goTasks" />
  101. <DimensionActivities
  102. :dimensionCode="currentDimensionCode"
  103. :activities="dimensionActivities"
  104. :isLoggedIn="isLoggedIn"
  105. @activityClick="goActivityDetail"
  106. @moreActivities="goMoreActivities" />
  107. <DimensionProducts
  108. dimensionCode="mind"
  109. :familyId="currentChildId"
  110. :products="dimensionProducts"
  111. title="推荐商品"
  112. @productClick="goProductDetail"
  113. @moreProducts="goMoreProducts" />
  114. <!-- 推荐阅读 -->
  115. <ArticleBookshelf
  116. :articles="emotionArticles"
  117. :isLoggedIn="isLoggedIn"
  118. @articleClick="goArticleDetail"
  119. @moreArticles="goArticles" />
  120. <!-- ===== Phase 1.2: 心理告警横幅 ===== -->
  121. <PsychCrisisBanner v-if="isLoggedIn" :childId="currentChildId" source="screening" />
  122. <!-- ===== 底部:功能入口 Grid(通用,两行) ===== -->
  123. <view class="func-section" v-if="sectionVisible('func_entries')">
  124. <view class="func-grid">
  125. <view class="func-row">
  126. <view class="func-item" v-for="item in funcListRow1" :key="item.label" @click="onFuncClick(item)">
  127. <view class="func-icon-wrap">
  128. <text class="func-icon">{{ item.icon }}</text>
  129. </view>
  130. <text class="func-label">{{ item.label }}</text>
  131. </view>
  132. </view>
  133. <view class="func-row">
  134. <view class="func-item" v-for="item in funcListRow2" :key="item.label" @click="onFuncClick(item)">
  135. <view class="func-icon-wrap">
  136. <text class="func-icon">{{ item.icon }}</text>
  137. </view>
  138. <text class="func-label">{{ item.label }}</text>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <!-- 底部占位 -->
  144. <view class="bottom-spacer"></view>
  145. <AIFloatingAvatar />
  146. </view>
  147. </template>
  148. <script>
  149. import TabTransition from '../../components/tab-transition.vue'
  150. import PageBanner from '../../components/PageBanner.vue'
  151. import LoginGuideCard from '../../components/LoginGuideCard.vue'
  152. import RadarChart from '../../components/RadarChart.vue'
  153. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  154. import DimensionTasks from '../../components/DimensionTasks.vue'
  155. import DimensionActivities from '../../components/DimensionActivities.vue'
  156. import DimensionProducts from '../../components/DimensionProducts.vue'
  157. import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
  158. import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
  159. import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
  160. import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
  161. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  162. import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
  163. import config from '../../config.js'
  164. export default {
  165. components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, ArticleBookshelf, PsychCrisisBanner, AIFloatingAvatar, FamilyTianpanCard, FamilyMemberStrip },
  166. data() {
  167. return {
  168. isLoggedIn: false,
  169. role: null,
  170. showTabTransition: true,
  171. currentChildId: null,
  172. selectedMemberId: null,
  173. visibleSections: [],
  174. familyMembersVisible: [],
  175. // 心理 Tab 数据
  176. emiData: null,
  177. emiLoading: true,
  178. emiDimensions: [
  179. { key: 'emotionScore', label: '情绪商数', color: '#FF6B35' },
  180. { key: 'resilienceScore', label: '心理韧性', color: '#F97316' },
  181. { key: 'stressCopingScore', label: '压力应对', color: '#FB923C' },
  182. { key: 'selfAwarenessScore', label: '自我认知', color: '#FBBF24' }
  183. ],
  184. // 大五维度(用于雷达图)
  185. personalityDimensions: [
  186. { key: 'opennessScore', label: '开放性' },
  187. { key: 'conscientiousnessScore', label: '尽责性' },
  188. { key: 'extraversionScore', label: '外向性' },
  189. { key: 'agreeablenessScore', label: '宜人性' },
  190. { key: 'neuroticismScore', label: '神经质' }
  191. ],
  192. // 功能入口
  193. funcList: [
  194. { icon: '\u{1F4D6}', label: '阅读', needLogin: false, page: '/pages/mind-extra/articles' },
  195. { icon: '\u{1F4CA}', label: '测评报告', needLogin: true, page: '/pages/mind/emotion-report' },
  196. { icon: '\u{1F4DD}', label: '成长档案', needLogin: true, page: '/pages/growth/index' },
  197. { icon: '\u{2728}', label: '情绪打卡', needLogin: true, page: '/pages/mind-detail/emotion-checkin' },
  198. { icon: '\u{1F4C8}', label: '情绪趋势', needLogin: true, page: '/pages/mind-detail/emotion-trend' },
  199. { icon: '\u{1F9E9}', label: '心理自评', needLogin: true, page: '/pages/mind-detail/screening' },
  200. { icon: '\u{1F3E0}', label: '家庭天盘', needLogin: true, page: '/pages/mind-detail/family-dashboard' },
  201. { icon: '\u{1F9D8}', label: '疏导工具', needLogin: true, page: '/pages/mind-detail/soothe-toolbox' }
  202. ],
  203. articles: [],
  204. // 肠脑轴数据
  205. gutIndicators: null,
  206. gutInsight: '',
  207. // 传统文化数据
  208. traditionalData: null,
  209. traditionalLoading: true,
  210. compatibilityData: null,
  211. wuxingConfig: {
  212. wood: { label: '木', color: '#10B981' },
  213. fire: { label: '火', color: '#FF6B9D' },
  214. earth: { label: '土', color: '#FF8C42' },
  215. metal: { label: '金', color: '#6366F1' },
  216. water: { label: '水', color: '#3B82F6' }
  217. },
  218. pillarLabels: { year: '年柱', month: '月柱', day: '日柱', hour: '时柱' },
  219. familyScore: 0,
  220. // 五维组件数据
  221. userName: '',
  222. children: [],
  223. sandboxData: null,
  224. dimensionTasks: [],
  225. dimensionActivities: [],
  226. dimensionProducts: [],
  227. contactList: [],
  228. healthAlerts: [],
  229. milestones: [],
  230. danReports: [],
  231. // 家庭天盘 - 今日心情(占位数据)
  232. todayMood: {
  233. emoji: '\u{1F60A}',
  234. text: '平静',
  235. score: 65
  236. },
  237. // 家庭天盘 - 每日运势数据
  238. dailyFortuneData: null,
  239. // 心理报告上传
  240. uploadedReports: [],
  241. reportUploadLoading: false
  242. }
  243. },
  244. computed: {
  245. personalityScores: function() {
  246. if (!this.emiData) return []
  247. return [
  248. this.emiData.opennessScore || 0,
  249. this.emiData.conscientiousnessScore || 0,
  250. this.emiData.extraversionScore || 0,
  251. this.emiData.agreeablenessScore || 0,
  252. this.emiData.neuroticismScore || 0
  253. ]
  254. },
  255. emotionArticles: function() {
  256. if (!this.articles || this.articles.length === 0) return []
  257. var result = []
  258. for (var i = 0; i < this.articles.length; i++) {
  259. var a = this.articles[i]
  260. if (a.relatedDimensions && a.relatedDimensions.indexOf('mind') !== -1) {
  261. result.push(a)
  262. }
  263. }
  264. if (result.length === 0) return this.articles.slice(0, 5)
  265. return result.slice(0, 5)
  266. },
  267. wuxingData: function() {
  268. if (!this.traditionalData || !this.traditionalData.wuxingElements) return []
  269. var elements = this.traditionalData.wuxingElements
  270. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  271. var result = []
  272. for (var i = 0; i < keys.length; i++) {
  273. var k = keys[i]
  274. if (elements[k] !== undefined) {
  275. result.push({
  276. key: k,
  277. label: this.wuxingConfig[k].label,
  278. color: this.wuxingConfig[k].color,
  279. value: elements[k]
  280. })
  281. }
  282. }
  283. return result.sort(function(a, b) { return b.value - a.value })
  284. },
  285. currentDimensionCode: function() {
  286. return 'mind'
  287. },
  288. funcListRow1: function() {
  289. return this.funcList.slice(0, 4)
  290. },
  291. funcListRow2: function() {
  292. return this.funcList.slice(4)
  293. },
  294. // ===== 关键信息 - 家庭 =====
  295. familyWuxingLabel: function() {
  296. if (!this.compatibilityData || !this.compatibilityData.familyWuxing || !this.compatibilityData.familyWuxing.aggregatePercentages) return null
  297. var pcts = this.compatibilityData.familyWuxing.aggregatePercentages
  298. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  299. var maxKey = null
  300. var maxVal = -1
  301. for (var i = 0; i < keys.length; i++) {
  302. if (pcts[keys[i]] !== undefined && pcts[keys[i]] > maxVal) {
  303. maxVal = pcts[keys[i]]
  304. maxKey = keys[i]
  305. }
  306. }
  307. if (!maxKey) return null
  308. return { key: maxKey, label: this.wuxingConfig[maxKey].label, color: this.wuxingConfig[maxKey].color, value: maxVal }
  309. },
  310. familyMemberCount: function() {
  311. if (!this.compatibilityData || !this.compatibilityData.members) return 0
  312. return this.compatibilityData.members.length
  313. },
  314. familyWeeklyInsight: function() {
  315. if (!this.compatibilityData || !this.compatibilityData.weeklyInsight) return ''
  316. return this.compatibilityData.weeklyInsight
  317. },
  318. // ===== 关键信息 - 个人 =====
  319. dominantElement: function() {
  320. if (!this.traditionalData || !this.traditionalData.wuxingElements) return null
  321. var elements = this.traditionalData.wuxingElements
  322. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  323. var maxKey = null
  324. var maxVal = -1
  325. for (var i = 0; i < keys.length; i++) {
  326. if (elements[keys[i]] !== undefined && elements[keys[i]] > maxVal) {
  327. maxVal = elements[keys[i]]
  328. maxKey = keys[i]
  329. }
  330. }
  331. return maxKey
  332. },
  333. luckyColorInfo: function() {
  334. var colorMap = {
  335. wood: { name: '绿', hex: '#10B981' },
  336. fire: { name: '红', hex: '#FF6B9D' },
  337. earth: { name: '黄', hex: '#FF8C42' },
  338. metal: { name: '白', hex: '#6366F1' },
  339. water: { name: '蓝', hex: '#3B82F6' }
  340. }
  341. var elem = this.dominantElement
  342. if (!elem) return null
  343. return colorMap[elem] || null
  344. },
  345. luckyNumber: function() {
  346. if (this.traditionalData && this.traditionalData.lifeNumber) {
  347. return this.traditionalData.lifeNumber
  348. }
  349. var numMap = { wood: 3, fire: 9, earth: 5, metal: 7, water: 1 }
  350. var elem = this.dominantElement
  351. return elem ? numMap[elem] : null
  352. },
  353. fortuneSeed: function() {
  354. if (this.traditionalData && this.traditionalData.lifeNumber) {
  355. return String(this.traditionalData.lifeNumber)
  356. }
  357. return '0'
  358. },
  359. // WXML 不支持模板内 || {} 字面量,需在 computed 中预先做 fallback
  360. dailyFortuneSafe: function() {
  361. return this.dailyFortune || {}
  362. },
  363. // WXML 不支持模板内 || '' 字面量,需在 computed 中预先做 fallback
  364. dominantElementSafe: function() {
  365. return this.dominantElement || ''
  366. },
  367. dailyFortune: function() {
  368. // 优先使用后端接口数据
  369. if (this.dailyFortuneData) {
  370. var levels = ['大吉', '吉', '平', '凶', '大凶']
  371. return {
  372. level: this.dailyFortuneData.level,
  373. text: levels[this.dailyFortuneData.level],
  374. description: this.dailyFortuneData.description
  375. }
  376. }
  377. // 兼容模式:没有接口数据时使用原算法
  378. if (!this.dominantElement) return null
  379. var today = new Date()
  380. var dateStr = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate()
  381. var seedStr = dateStr + (this.fortuneSeed || '')
  382. var hash = 0
  383. for (var i = 0; i < seedStr.length; i++) {
  384. hash = ((hash << 5) - hash) + seedStr.charCodeAt(i)
  385. hash = hash & hash
  386. }
  387. var level = Math.abs(hash) % 5
  388. var levels = ['大吉', '吉', '平', '凶', '大凶']
  389. var descMap = {
  390. wood: ['大吉:木气旺盛,宜规划', '吉:行动力强', '平:静心养性', '凶:谨言慎行', '大凶:忌冲动'],
  391. fire: ['大吉:热情高涨', '吉:精力充沛', '平:适当休息', '凶:注意情绪', '大凶:静心冥想'],
  392. earth: ['大吉:稳重踏实', '吉:贵人运佳', '平:按部就班', '凶:注意肠胃', '大凶:不宜投资'],
  393. metal: ['大吉:决策力强', '吉:思维清晰', '平:保持专注', '凶:注意言辞', '大凶:不宜强求'],
  394. water: ['大吉:灵感丰富', '吉:人际和谐', '平:安静内省', '凶:情绪波动', '大凶:宜藏不宜放']
  395. }
  396. var descList = descMap[this.dominantElement] || descMap.wood
  397. return { level: level, text: levels[level], description: descList[level] }
  398. }
  399. },
  400. onShow() {
  401. this.showTabTransition = true
  402. var token = uni.getStorageSync('token')
  403. this.isLoggedIn = !!token
  404. if (this.isLoggedIn) {
  405. this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  406. // FIX: 从 Vuex store 读取 currentChildId,而非仅从 localStorage
  407. this.currentChildId = (this.$store.state && this.$store.state.currentChildId) || uni.getStorageSync('currentChildId') || null
  408. this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
  409. }
  410. this.loadSectionConfig()
  411. this.loadFeaturedArticles()
  412. if (this.isLoggedIn) {
  413. this.loadChildren()
  414. this.loadFamilyMembersVisible()
  415. this.loadSandboxData()
  416. this.loadEmiData()
  417. this.loadGutData()
  418. this.loadEnergyData()
  419. this.loadTraditionalCultureData()
  420. this.loadContacts()
  421. this.loadHealthAlerts()
  422. this.loadMilestones()
  423. this.loadDanReports()
  424. }
  425. // 游客也能浏览活动和商品
  426. this.loadDimensionActivities()
  427. this.loadDimensionProducts()
  428. this.loadFamilyFortune()
  429. this._watchPageReady()
  430. },
  431. methods: {
  432. // ===== 区块可见性 =====
  433. loadSectionConfig: function() {
  434. var self = this
  435. var baseSections = ['func_entries', 'daily_tip', 'recommended_reading']
  436. if (!uni.getStorageSync('token')) {
  437. self.visibleSections = baseSections
  438. return
  439. }
  440. var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  441. getVisibleSections({ pageKey: 'mind', role: role }).then(function(res) {
  442. if (res.code === 200 && res.data) {
  443. var keys = res.data.map(function(s) { return s.sectionKey })
  444. var merged = baseSections.slice()
  445. keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
  446. self.visibleSections = merged
  447. }
  448. }).catch(function() {
  449. self.visibleSections = ['func_entries', 'daily_tip', 'recommended_reading', 'mind_tasks', 'related_activities', 'purchased_courses']
  450. })
  451. },
  452. // 加载家庭天盘数据
  453. loadFamilyFortune: function() {
  454. var self = this
  455. if (!self.isLoggedIn) return
  456. getFamilyFortune().then(function(res) {
  457. if (res.code === 200 && res.data) {
  458. // 更新 todayMood 占位数据为真实接口数据
  459. self.todayMood = {
  460. emoji: res.data.moodEmoji || '\u{1F60A}',
  461. text: res.data.moodText || '平静',
  462. score: res.data.moodScore || 65
  463. }
  464. // 更新 dailyFortune computed 函数依赖的数据
  465. self.dailyFortuneData = {
  466. level: res.data.fortuneLevel,
  467. text: res.data.fortuneLevelText,
  468. description: res.data.fortuneDescription
  469. }
  470. // 更新主导五行
  471. self.traditionalData = self.traditionalData || {}
  472. self.traditionalData.wuxingElements = {}
  473. if (res.data.dominantElement) {
  474. self.traditionalData.wuxingElements[res.data.dominantElement] = 100
  475. }
  476. // 更新周报提示
  477. self.compatibilityData = self.compatibilityData || {}
  478. self.compatibilityData.weeklyInsight = res.data.weeklyTip || self.compatibilityData.weeklyInsight
  479. }
  480. }).catch(function(err) {
  481. console.error('Failed to load family fortune:', err)
  482. })
  483. },
  484. // ===== 心理报告上传 =====
  485. chooseAndUploadReport: function() {
  486. var self = this
  487. uni.chooseImage({
  488. count: 1,
  489. sizeType: ['original', 'compressed'],
  490. sourceType: ['album', 'camera'],
  491. success: function(chooseRes) {
  492. self.reportUploadLoading = true
  493. var tempFilePath = chooseRes.tempFilePaths[0]
  494. var fileName = '心理报告_' + Date.now() + '.jpg'
  495. uni.uploadFile({
  496. url: config.baseUrl + '/api/mind/report/upload',
  497. filePath: tempFilePath,
  498. name: 'report',
  499. formData: {
  500. familyId: self.currentChildId || ''
  501. },
  502. header: {
  503. 'Authorization': 'Bearer ' + uni.getStorageSync('token')
  504. },
  505. success: function(uploadRes) {
  506. self.reportUploadLoading = false
  507. if (uploadRes.statusCode === 200) {
  508. var result = JSON.parse(uploadRes.data)
  509. if (result.code === 200) {
  510. self.uploadedReports.unshift(result.data)
  511. uni.showToast({ title: '上传成功', icon: 'success' })
  512. } else {
  513. uni.showToast({ title: result.message || '上传失败', icon: 'none' })
  514. }
  515. } else {
  516. uni.showToast({ title: '上传失败: ' + uploadRes.statusCode, icon: 'none' })
  517. }
  518. },
  519. fail: function(err) {
  520. self.reportUploadLoading = false
  521. uni.showToast({ title: '上传失败: ' + (err.errMsg || ''), icon: 'none' })
  522. }
  523. })
  524. },
  525. fail: function() {
  526. // 用户取消选择
  527. }
  528. })
  529. },
  530. viewReport: function(report) {
  531. if (report && report.fileUrl) {
  532. uni.downloadFile({
  533. url: report.fileUrl,
  534. success: function(res) {
  535. if (res.statusCode === 200) {
  536. uni.openDocument({
  537. filePath: res.tempFilePath,
  538. success: function() {
  539. console.log('打开报告成功')
  540. }
  541. })
  542. }
  543. }
  544. })
  545. }
  546. },
  547. loadUploadedReports: function() {
  548. var self = this
  549. uni.request({
  550. url: config.baseUrl + '/api/mind/report/list',
  551. method: 'POST',
  552. data: { familyId: self.currentChildId || '' },
  553. header: {
  554. 'Authorization': 'Bearer ' + uni.getStorageSync('token')
  555. },
  556. success: function(res) {
  557. if (res.data && res.data.code === 200 && res.data.data) {
  558. self.uploadedReports = res.data.data
  559. }
  560. }
  561. })
  562. },
  563. formatDate: function(dateStr) {
  564. if (!dateStr) return ''
  565. var d = new Date(dateStr)
  566. var month = d.getMonth() + 1
  567. var day = d.getDate()
  568. return month + '月' + day + '日'
  569. },
  570. sectionVisible: function(key) {
  571. return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
  572. },
  573. // ===== 心理 Tab:EMI 数据 =====
  574. loadEmiData: function() {
  575. var self = this
  576. var childId = self.currentChildId
  577. if (!childId) {
  578. self.emiLoading = false
  579. return
  580. }
  581. self.emiLoading = true
  582. getEmiReport(childId).then(function(res) {
  583. if (res.code === 200 && res.data) {
  584. self.emiData = res.data
  585. }
  586. self.emiLoading = false
  587. }).catch(function() {
  588. self.emiLoading = false
  589. })
  590. },
  591. // ===== 肠脑轴情绪指标 =====
  592. loadGutData: function() {
  593. var self = this
  594. var childId = self.currentChildId
  595. if (!childId) return
  596. var token = uni.getStorageSync('token')
  597. // 获取神经递质指标
  598. uni.request({
  599. url: config.API_BASE_URL + '/api/mind/neurotransmitters',
  600. method: 'POST',
  601. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  602. data: { childId: childId },
  603. success: function(r) {
  604. if (r.statusCode === 200 && r.data && r.data.code === 200) {
  605. var list = r.data.data
  606. if (Array.isArray(list) && list.length > 0) {
  607. self.gutIndicators = list.slice(0, 4)
  608. }
  609. }
  610. }
  611. })
  612. // 获取情绪洞察摘要
  613. uni.request({
  614. url: config.API_BASE_URL + '/api/mind/gut-emotion-insight',
  615. method: 'POST',
  616. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  617. data: { childId: childId },
  618. success: function(r) {
  619. if (r.statusCode === 200 && r.data && r.data.code === 200 && r.data.data) {
  620. self.gutInsight = r.data.data.summary || ''
  621. }
  622. }
  623. })
  624. },
  625. indicatorColor: function(status) {
  626. if (status === 'abnormal' || status === '偏高' || status === '偏低') return '#EF4444'
  627. if (status === 'warning' || status === '偏高' || status === '偏低') return '#F59E0B'
  628. return '#10B981'
  629. },
  630. statusLabel: function(status) {
  631. if (status === 'normal') return '正常'
  632. if (status === 'abnormal') return '异常'
  633. if (status === 'warning') return '警讯'
  634. return status || '正常'
  635. },
  636. // ===== 文章 =====
  637. parseRelatedDimensions: function(val) {
  638. if (!val) return []
  639. if (Array.isArray(val)) return val
  640. if (typeof val === 'string') {
  641. try {
  642. var parsed = JSON.parse(val)
  643. return Array.isArray(parsed) ? parsed : []
  644. } catch (e) {
  645. return val.split(',').map(function(s) { return s.trim() }).filter(function(s) { return s })
  646. }
  647. }
  648. return []
  649. },
  650. loadFeaturedArticles: function() {
  651. var self = this
  652. getFeaturedArticles({ size: 5, dimensionCode: 'mind' }).then(function(res) {
  653. if (res.code === 200 && res.data) {
  654. var gradientColors = [
  655. 'linear-gradient(135deg, #8B5CF6, #A78BFA)',
  656. 'linear-gradient(135deg, #5B9BD5, #8FC5E8)',
  657. 'linear-gradient(135deg, #10B981, #34D399)',
  658. 'linear-gradient(135deg, #8B5CF6, #C084FC)',
  659. 'linear-gradient(135deg, #F97316, #FB923C)'
  660. ]
  661. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  662. self.articles = list.map(function(item, index) {
  663. return {
  664. id: item.id,
  665. category: item.categoryName || '成长心理',
  666. categoryColor: gradientColors[index % gradientColors.length],
  667. title: item.title || '',
  668. summary: item.summary || '',
  669. dimensionWeights: item.dimensionWeights || null,
  670. views: item.viewCount ? String(item.viewCount) : '0',
  671. likes: '0',
  672. date: item.publishedAt ? item.publishedAt.slice(0, 10) : '',
  673. relatedDimensions: self.parseRelatedDimensions(item.relatedDimensions)
  674. }
  675. })
  676. }
  677. }).catch(function() {})
  678. },
  679. // ===== EMI 分数评级 =====
  680. getScoreLevel: function(score) {
  681. if (score >= 85) return 'excellent'
  682. if (score >= 70) return 'good'
  683. if (score >= 55) return 'average'
  684. return 'low'
  685. },
  686. getScoreLevelText: function(score) {
  687. if (score >= 85) return '优秀'
  688. if (score >= 70) return '良好'
  689. if (score >= 55) return '一般'
  690. return '需提升'
  691. },
  692. // ===== 导航 =====
  693. goEmotionReport: function() {
  694. var childId = this.currentChildId || ''
  695. uni.navigateTo({ url: '/pages/mind-detail/emotion-report?childId=' + childId })
  696. },
  697. goArticles: function() {
  698. uni.navigateTo({ url: '/pages/article-center/index?dimension=mind' })
  699. },
  700. onFuncClick: function(item) {
  701. if (item.needLogin && !this.isLoggedIn) {
  702. uni.showModal({
  703. title: '提示',
  704. content: '请先登录后使用此功能',
  705. success: function(res) { if (res.confirm) uni.navigateTo({ url: '/pages/login/login' }) }
  706. })
  707. return
  708. }
  709. if (item.page) uni.navigateTo({ url: item.page })
  710. },
  711. goArticleDetail: function(article) {
  712. var id = article.id || article
  713. uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id })
  714. },
  715. goProductDetail: function(prod) {
  716. if (!prod || !prod.id) return
  717. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  718. },
  719. goMoreProducts: function() {
  720. uni.navigateTo({ url: '/pages/shop/index/index' })
  721. },
  722. // ===== 孩子列表与维度数据 =====
  723. loadChildren: function() {
  724. var self = this
  725. getChildren().then(function(res) {
  726. if (res.code === 200 && res.data) {
  727. self.children = res.data
  728. var savedChildId = uni.getStorageSync('currentChildId')
  729. var found = false
  730. for (var i = 0; i < self.children.length; i++) {
  731. if (self.children[i].childId === savedChildId) {
  732. self.currentChildId = savedChildId
  733. found = true
  734. break
  735. }
  736. }
  737. // FIX: 不再自动选择第一个孩子。仅在用户通过 UserQuickEntry 切换时设置 currentChildId
  738. if (found) {
  739. self.loadDimensionData()
  740. self.loadEmiData()
  741. }
  742. }
  743. }).catch(function(e) {
  744. console.log('获取孩子列表失败', e)
  745. })
  746. },
  747. loadDimensionData: function() {
  748. this.loadDimensionTasks()
  749. this.loadDimensionActivities()
  750. if (this.familyMembersVisible.length > 0) {
  751. this.loadCompatibilityData()
  752. }
  753. },
  754. loadSandboxData: function() {
  755. var self = this
  756. getFamilyEnergySandbox().then(function(res) {
  757. if (res && res.data) {
  758. self.sandboxData = res.data
  759. }
  760. }).catch(function() {})
  761. },
  762. loadEnergyData: function() {
  763. var self = this
  764. if (!this.currentChildId) return
  765. getEnergyOverview(this.currentChildId).then(function(res) {
  766. if (res && res.data) {
  767. var dims = res.data.dimensions
  768. if (dims && dims.length > 0) {
  769. for (var i = 0; i < dims.length; i++) {
  770. if (dims[i] && dims[i].code === 'mind' && res.data.energyScores) {
  771. self.familyScore = res.data.energyScores.mindScore || 0
  772. }
  773. }
  774. }
  775. }
  776. }).catch(function(e) {
  777. console.log('获取能量概览失败', e)
  778. })
  779. },
  780. loadDimensionTasks: function() {
  781. var self = this
  782. if (!this.currentChildId) return
  783. getTodayTasksByCategory(this.currentChildId, 'mind').then(function(res) {
  784. if (res && res.data) {
  785. self.dimensionTasks = Array.isArray(res.data) ? res.data.slice(0, 5) : []
  786. }
  787. }).catch(function() { self.dimensionTasks = [] })
  788. },
  789. loadDimensionActivities: function() {
  790. var self = this
  791. var dimCode = self.currentDimensionCode
  792. getActivityList({ dimensionCode: dimCode, page: 1, size: 3 }).then(function(res) {
  793. if (res && res.data) {
  794. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  795. self.dimensionActivities = list.slice(0, 3)
  796. }
  797. }).catch(function() { self.dimensionActivities = [] })
  798. },
  799. loadDimensionProducts: function() {
  800. var self = this
  801. getProductsByDomain('mind', 1, 4).then(function(res) {
  802. if (res && res.data) {
  803. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  804. self.dimensionProducts = list.slice(0, 4)
  805. }
  806. }).catch(function() { self.dimensionProducts = [] })
  807. },
  808. onFamilyMemberSelect: function(member) {
  809. this.selectedMemberId = member.id
  810. },
  811. onChildChanged: function(child) {
  812. this.currentChildId = child.childId
  813. // FIX: 同步提交到 Vuex store
  814. this.$store.commit('switchToChild', child.childId)
  815. this.loadDimensionData()
  816. this.loadEmiData()
  817. this.loadTraditionalCultureData()
  818. },
  819. loadFamilyMembersVisible: function() {
  820. var self = this
  821. getVisibleFamilyMembers().then(function(res) {
  822. self.familyMembersVisible = res.data || []
  823. }).catch(function(e) {
  824. console.log('获取可见家庭成员失败', e)
  825. self.familyMembersVisible = []
  826. })
  827. },
  828. loadCompatibilityData: function() {
  829. var self = this
  830. var familyId = uni.getStorageSync('currentFamilyId')
  831. if (!familyId) {
  832. var userInfo = uni.getStorageSync('userInfo')
  833. if (userInfo && userInfo.familyId) familyId = userInfo.familyId
  834. }
  835. if (!familyId) return
  836. var token = uni.getStorageSync('token')
  837. uni.request({
  838. url: config.API_BASE_URL + '/api/mind/traditional/family-dashboard',
  839. method: 'POST',
  840. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  841. data: { familyId: familyId },
  842. success: function(res) {
  843. if (res.data && res.data.code === 200 && res.data.data) {
  844. self.compatibilityData = res.data.data
  845. }
  846. },
  847. fail: function() {}
  848. })
  849. },
  850. scrollToSection: function(section) {
  851. uni.pageScrollTo({ selector: '#' + section, duration: 300 })
  852. },
  853. onTaskClick: function(task) {
  854. uni.navigateTo({ url: '/pages/tasks/tasks' })
  855. },
  856. goActivityDetail: function(act) {
  857. if (act && act.id) uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id })
  858. },
  859. goMoreActivities: function() {
  860. uni.navigateTo({ url: '/pages/activity/index' })
  861. },
  862. goTasks: function() { uni.navigateTo({ url: '/pages/tasks/tasks' }) },
  863. goFamilyMembers: function() {
  864. uni.navigateTo({ url: '/pages/profile-extra/family-members' })
  865. },
  866. goAssessment: function() { uni.navigateTo({ url: '/pages/assessment/apply' }) },
  867. goLogin: function() { uni.navigateTo({ url: '/pages/login/login' }) },
  868. // ===== 传统文化数据 =====
  869. // ===== 联系人 / 关系健康 =====
  870. loadContacts: function() {
  871. var self = this
  872. getContactList({}).then(function(res) {
  873. if (res.code === 200) {
  874. self.contactList = Array.isArray(res.data) ? res.data : []
  875. } else {
  876. self.contactList = []
  877. }
  878. }).catch(function() {
  879. self.contactList = []
  880. })
  881. },
  882. loadHealthAlerts: function() {
  883. var self = this
  884. getHealthAlerts({}).then(function(res) {
  885. if (res.code === 200) {
  886. self.healthAlerts = Array.isArray(res.data) ? res.data : []
  887. } else {
  888. self.healthAlerts = []
  889. }
  890. }).catch(function() {
  891. self.healthAlerts = []
  892. })
  893. },
  894. loadMilestones: function() {
  895. var self = this
  896. getMilestones({}, 30).then(function(res) {
  897. if (res.code === 200) {
  898. self.milestones = Array.isArray(res.data) ? res.data : []
  899. } else {
  900. self.milestones = []
  901. }
  902. }).catch(function() {
  903. self.milestones = []
  904. })
  905. },
  906. loadTraditionalCultureData: function() {
  907. var self = this
  908. var memberId = this.currentChildId
  909. if (!memberId) {
  910. self.traditionalLoading = false
  911. return
  912. }
  913. self.traditionalLoading = true
  914. uni.request({
  915. url: config.API_BASE_URL + '/api/mind/traditional/mirror',
  916. method: 'POST',
  917. data: { memberId: memberId, memberType: 'child' },
  918. success: function(res) {
  919. self.traditionalLoading = false
  920. if (res.data && res.data.code === 200 && res.data.data) {
  921. var d = res.data.data
  922. if (d.eightCharacters || d.wuxingElements || d.zodiac || d.numSoul) {
  923. self.traditionalData = d
  924. } else {
  925. self.traditionalData = null
  926. }
  927. } else {
  928. self.traditionalData = null
  929. }
  930. },
  931. fail: function() {
  932. self.traditionalLoading = false
  933. self.traditionalData = null
  934. }
  935. })
  936. },
  937. _watchPageReady() {
  938. var self = this
  939. var unwatch = this.$watch(function() {
  940. if (self.isLoggedIn) {
  941. return !!(self.emiData || self.energyOverview || (self.dimensionActivities && self.dimensionActivities.length > 0))
  942. }
  943. return !!(self.dimensionActivities && self.dimensionActivities.length > 0)
  944. }, function(val) {
  945. if (val) {
  946. if (unwatch) unwatch()
  947. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  948. }
  949. })
  950. },
  951. // ===== DAN 报告 =====
  952. loadDanReports: function() {
  953. var self = this
  954. var memberId = self.currentChildId
  955. if (!memberId) return
  956. getDanReportByChild(memberId, 'mind').then(function(res) {
  957. if (res.code === 200 && res.data) {
  958. self.danReports = res.data
  959. }
  960. }).catch(function() {})
  961. },
  962. goDanUpload: function(dimension) {
  963. uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
  964. },
  965. viewDanReport: function(report) {
  966. uni.navigateTo({ url: '/pages/dan-assessment/report-upload?draftId=' + report.id })
  967. },
  968. formatDate: function(dateStr) {
  969. if (!dateStr) return ''
  970. var d = new Date(dateStr)
  971. return d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate()
  972. }
  973. }
  974. }
  975. </script>
  976. <style scoped>
  977. .container {
  978. min-height: 100vh;
  979. background: #f5f7fa;
  980. padding-bottom: 120rpx;
  981. }
  982. /* ===== 心·心理 标题栏 ===== */
  983. .section-title-bar {
  984. display: flex;
  985. flex-direction: row;
  986. align-items: center;
  987. margin: 20rpx 30rpx 10rpx;
  988. padding: 16rpx 24rpx;
  989. background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  990. border-radius: 20rpx;
  991. box-shadow: 0 4rpx 16rpx rgba(139,92,246,0.25);
  992. }
  993. .section-title-icon {
  994. font-size: 32rpx;
  995. color: #fff;
  996. margin-right: 12rpx;
  997. }
  998. .section-title-text {
  999. font-size: 32rpx;
  1000. font-weight: bold;
  1001. color: #fff;
  1002. }
  1003. /* ===== 心理报告上传卡片 ===== */
  1004. .mind-report-section {
  1005. margin: 20rpx 30rpx;
  1006. }
  1007. .mind-report-card {
  1008. display: flex;
  1009. flex-direction: row;
  1010. align-items: center;
  1011. background: linear-gradient(135deg, #F3E8FF, #FCE4EC);
  1012. border-radius: 20rpx;
  1013. padding: 28rpx 24rpx;
  1014. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1015. }
  1016. .mind-report-left {
  1017. width: 100rpx;
  1018. height: 100rpx;
  1019. background: rgba(255,255,255,0.7);
  1020. border-radius: 20rpx;
  1021. display: flex;
  1022. align-items: center;
  1023. justify-content: center;
  1024. margin-right: 20rpx;
  1025. flex-shrink: 0;
  1026. }
  1027. .mind-report-icon {
  1028. font-size: 52rpx;
  1029. }
  1030. .mind-report-right {
  1031. flex: 1;
  1032. }
  1033. .mind-report-title {
  1034. font-size: 30rpx;
  1035. font-weight: bold;
  1036. color: #7C3AED;
  1037. display: block;
  1038. margin-bottom: 6rpx;
  1039. }
  1040. .mind-report-desc {
  1041. font-size: 22rpx;
  1042. color: #A855F7;
  1043. line-height: 1.5;
  1044. display: block;
  1045. margin-bottom: 10rpx;
  1046. }
  1047. .mind-report-tags {
  1048. display: flex;
  1049. flex-direction: row;
  1050. gap: 10rpx;
  1051. }
  1052. .mind-tag {
  1053. font-size: 20rpx;
  1054. color: #7C3AED;
  1055. background: rgba(255,255,255,0.6);
  1056. padding: 4rpx 14rpx;
  1057. border-radius: 20rpx;
  1058. }
  1059. .mind-report-arrow {
  1060. font-size: 36rpx;
  1061. color: #C084FC;
  1062. margin-left: 10rpx;
  1063. flex-shrink: 0;
  1064. }
  1065. .mind-report-card:active {
  1066. opacity: 0.7;
  1067. }
  1068. .mind-report-list {
  1069. margin-top: 12rpx;
  1070. }
  1071. .mind-report-item {
  1072. display: flex;
  1073. flex-direction: row;
  1074. align-items: center;
  1075. background: #fff;
  1076. border-radius: 14rpx;
  1077. padding: 20rpx 20rpx;
  1078. margin-bottom: 8rpx;
  1079. box-shadow: 0 1rpx 6rpx rgba(0,0,0,0.05);
  1080. }
  1081. .mind-report-item:active {
  1082. opacity: 0.7;
  1083. }
  1084. .mind-report-item-icon {
  1085. font-size: 28rpx;
  1086. margin-right: 14rpx;
  1087. }
  1088. .mind-report-item-name {
  1089. font-size: 26rpx;
  1090. color: #333;
  1091. flex: 1;
  1092. }
  1093. .mind-report-item-date {
  1094. font-size: 22rpx;
  1095. color: #999;
  1096. margin-right: 14rpx;
  1097. }
  1098. .mind-report-item-status {
  1099. font-size: 22rpx;
  1100. padding: 2rpx 12rpx;
  1101. border-radius: 20rpx;
  1102. }
  1103. .mind-report-item-status.parsed {
  1104. color: #7C3AED;
  1105. background: #F3E8FF;
  1106. }
  1107. .mind-report-item-status.pending {
  1108. color: #999;
  1109. background: #F5F5F5;
  1110. }
  1111. .mind-report-empty {
  1112. display: flex;
  1113. flex-direction: row;
  1114. align-items: center;
  1115. justify-content: center;
  1116. padding: 24rpx;
  1117. margin-top: 8rpx;
  1118. }
  1119. .mind-report-empty-icon {
  1120. font-size: 32rpx;
  1121. margin-right: 10rpx;
  1122. }
  1123. .mind-report-empty-text {
  1124. font-size: 24rpx;
  1125. color: #bbb;
  1126. }
  1127. /* ===== 心理能量概况 ===== */
  1128. .energy-overview {
  1129. display: flex;
  1130. flex-direction: row;
  1131. margin: 20rpx 30rpx;
  1132. background: #fff;
  1133. border-radius: 20rpx;
  1134. padding: 24rpx 16rpx;
  1135. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1136. justify-content: space-around;
  1137. }
  1138. .energy-badge {
  1139. display: flex;
  1140. flex-direction: column;
  1141. align-items: center;
  1142. flex: 1;
  1143. }
  1144. .badge-icon {
  1145. font-size: 36rpx;
  1146. margin-bottom: 8rpx;
  1147. }
  1148. .badge-value {
  1149. font-size: 36rpx;
  1150. font-weight: bold;
  1151. color: #333;
  1152. }
  1153. .badge-label {
  1154. font-size: 20rpx;
  1155. color: #999;
  1156. margin-top: 4rpx;
  1157. }
  1158. /* ===== EMI 四维条形图 ===== */
  1159. .emi-section {
  1160. margin: 20rpx 30rpx;
  1161. }
  1162. .emi-card {
  1163. background: #fff;
  1164. border-radius: 24rpx;
  1165. padding: 30rpx;
  1166. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1167. }
  1168. .emi-card-title {
  1169. font-size: 30rpx;
  1170. font-weight: bold;
  1171. color: #333;
  1172. display: block;
  1173. }
  1174. .personality-header {
  1175. display: flex;
  1176. flex-direction: row;
  1177. align-items: center;
  1178. justify-content: space-between;
  1179. margin-bottom: 24rpx;
  1180. }
  1181. .test-btn {
  1182. background: #8B5CF6;
  1183. padding: 8rpx 28rpx;
  1184. border-radius: 30rpx;
  1185. }
  1186. .test-btn-text {
  1187. font-size: 24rpx;
  1188. color: #fff;
  1189. font-weight: 500;
  1190. }
  1191. .emi-bar-item {
  1192. display: flex;
  1193. flex-direction: row;
  1194. align-items: center;
  1195. margin-bottom: 20rpx;
  1196. }
  1197. .emi-bar-label {
  1198. font-size: 24rpx;
  1199. color: #666;
  1200. width: 120rpx;
  1201. flex-shrink: 0;
  1202. }
  1203. .emi-bar-track {
  1204. flex: 1;
  1205. height: 20rpx;
  1206. background: #f0f0f0;
  1207. border-radius: 10rpx;
  1208. overflow: hidden;
  1209. margin: 0 16rpx;
  1210. }
  1211. .emi-bar-fill {
  1212. height: 100%;
  1213. border-radius: 10rpx;
  1214. transition: width 0.5s;
  1215. }
  1216. .emi-bar-score {
  1217. font-size: 26rpx;
  1218. font-weight: bold;
  1219. color: #333;
  1220. width: 60rpx;
  1221. text-align: right;
  1222. flex-shrink: 0;
  1223. }
  1224. .emi-bar-level {
  1225. font-size: 20rpx;
  1226. width: 80rpx;
  1227. text-align: right;
  1228. flex-shrink: 0;
  1229. }
  1230. .level-excellent { color: #10B981; }
  1231. .level-good { color: #3B82F6; }
  1232. .level-average { color: #F97316; }
  1233. .level-low { color: #EF4444; }
  1234. .emi-footer {
  1235. display: flex;
  1236. flex-direction: row;
  1237. justify-content: space-between;
  1238. align-items: center;
  1239. margin-top: 20rpx;
  1240. padding-top: 20rpx;
  1241. border-top: 1rpx solid #f0f0f0;
  1242. }
  1243. .emi-overall {
  1244. font-size: 28rpx;
  1245. font-weight: bold;
  1246. color: #FF6B35;
  1247. }
  1248. .emi-link {
  1249. display: flex;
  1250. flex-direction: row;
  1251. align-items: center;
  1252. }
  1253. .emi-link-text {
  1254. font-size: 26rpx;
  1255. color: #FF6B35;
  1256. font-weight: 500;
  1257. }
  1258. .emi-link-arrow {
  1259. font-size: 26rpx;
  1260. color: #FF6B35;
  1261. margin-left: 8rpx;
  1262. }
  1263. /* ===== EMI 心理报告卡片 ===== */
  1264. .emi-card {
  1265. margin: 30rpx;
  1266. background: #fff;
  1267. border-radius: 24rpx;
  1268. padding: 30rpx;
  1269. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1270. }
  1271. .emi-header {
  1272. margin-bottom: 24rpx;
  1273. }
  1274. .emi-title {
  1275. font-size: 30rpx;
  1276. font-weight: bold;
  1277. color: #333;
  1278. display: block;
  1279. }
  1280. .emi-overall-wrap {
  1281. display: flex;
  1282. flex-direction: column;
  1283. align-items: center;
  1284. padding: 32rpx 0;
  1285. background: linear-gradient(135deg, #FF6B35, #FFD700);
  1286. border-radius: 16rpx;
  1287. margin: 20rpx 0;
  1288. color: #fff;
  1289. }
  1290. .emi-overall-label {
  1291. font-size: 26rpx;
  1292. margin-bottom: 6rpx;
  1293. }
  1294. .emi-overall-value {
  1295. font-size: 64rpx;
  1296. font-weight: bold;
  1297. margin-bottom: 6rpx;
  1298. }
  1299. .emi-overall-level {
  1300. font-size: 24rpx;
  1301. padding: 4rpx 16rpx;
  1302. border-radius: 12rpx;
  1303. background: rgba(255,255,255,0.2);
  1304. }
  1305. .emi-dimensions {
  1306. display: flex;
  1307. flex-direction: column;
  1308. gap: 20rpx;
  1309. }
  1310. .emi-dimension {
  1311. display: flex;
  1312. flex-direction: column;
  1313. }
  1314. .emi-dim-header {
  1315. display: flex;
  1316. flex-direction: row;
  1317. justify-content: space-between;
  1318. align-items: center;
  1319. margin-bottom: 8rpx;
  1320. }
  1321. .emi-dim-label {
  1322. font-size: 26rpx;
  1323. color: #666;
  1324. }
  1325. .emi-dim-values {
  1326. display: flex;
  1327. flex-direction: row;
  1328. align-items: center;
  1329. }
  1330. .emi-dim-score {
  1331. font-size: 28rpx;
  1332. font-weight: bold;
  1333. color: #FF6B35;
  1334. margin-right: 12rpx;
  1335. }
  1336. .emi-dim-level {
  1337. font-size: 20rpx;
  1338. padding: 2rpx 12rpx;
  1339. border-radius: 8rpx;
  1340. }
  1341. .emi-dim-bar {
  1342. height: 14rpx;
  1343. background: #f0f0f0;
  1344. border-radius: 7rpx;
  1345. overflow: hidden;
  1346. }
  1347. .emi-dim-bar-fill {
  1348. height: 100%;
  1349. border-radius: 7rpx;
  1350. transition: width 0.5s;
  1351. }
  1352. .emi-footer {
  1353. display: flex;
  1354. justify-content: flex-end;
  1355. align-items: center;
  1356. padding-top: 20rpx;
  1357. border-top: 1rpx solid #f0f0f0;
  1358. margin-top: 20rpx;
  1359. }
  1360. .emi-footer-text {
  1361. font-size: 24rpx;
  1362. color: #F97316;
  1363. font-weight: 500;
  1364. }
  1365. .emi-footer-icon {
  1366. font-size: 24rpx;
  1367. margin-left: 8rpx;
  1368. }
  1369. .level-excellent { color: #10B981; background: #ECFDF5; }
  1370. .level-good { color: #3B82F6; background: #EFF6FF; }
  1371. .level-average { color: #F97316; background: #FFF7ED; }
  1372. .level-low { color: #EF4444; background: #FEF2F2; }
  1373. /* 雷达图内的空状态 */
  1374. .placeholder-content {
  1375. display: flex;
  1376. flex-direction: column;
  1377. align-items: center;
  1378. padding: 40rpx 20rpx;
  1379. }
  1380. /* ===== 占位卡 ===== */
  1381. .placeholder-card {
  1382. margin: 30rpx;
  1383. background: #fff;
  1384. border-radius: 24rpx;
  1385. padding: 60rpx 40rpx;
  1386. display: flex;
  1387. flex-direction: column;
  1388. align-items: center;
  1389. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1390. }
  1391. .placeholder-icon {
  1392. font-size: 80rpx;
  1393. margin-bottom: 20rpx;
  1394. }
  1395. .placeholder-title {
  1396. font-size: 32rpx;
  1397. font-weight: bold;
  1398. color: #333;
  1399. margin-bottom: 16rpx;
  1400. }
  1401. .placeholder-desc {
  1402. font-size: 26rpx;
  1403. color: #999;
  1404. text-align: center;
  1405. line-height: 1.6;
  1406. margin-bottom: 30rpx;
  1407. }
  1408. .placeholder-btn {
  1409. background: linear-gradient(135deg, #FF6B35, #FFD700);
  1410. color: #fff;
  1411. font-size: 28rpx;
  1412. font-weight: bold;
  1413. padding: 16rpx 64rpx;
  1414. border-radius: 40rpx;
  1415. box-shadow: 0 4rpx 16rpx rgba(255,107,53,0.3);
  1416. }
  1417. /* ===== 传统文化卡片 ===== */
  1418. .culture-section {
  1419. margin: 20rpx 30rpx;
  1420. }
  1421. .culture-card {
  1422. background: #fff;
  1423. border-radius: 20rpx;
  1424. padding: 24rpx;
  1425. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.04);
  1426. margin-bottom: 16rpx;
  1427. }
  1428. .culture-card-header {
  1429. display: flex;
  1430. align-items: center;
  1431. margin-bottom: 16rpx;
  1432. }
  1433. .culture-card-icon {
  1434. font-size: 32rpx;
  1435. margin-right: 10rpx;
  1436. }
  1437. .culture-card-title {
  1438. font-size: 28rpx;
  1439. font-weight: 600;
  1440. color: #333;
  1441. }
  1442. .culture-card-body {
  1443. font-size: 24rpx;
  1444. color: #666;
  1445. line-height: 1.6;
  1446. }
  1447. /* 八字四柱 */
  1448. .bazi-grid {
  1449. display: flex;
  1450. justify-content: space-around;
  1451. padding: 8rpx 0;
  1452. }
  1453. .bazi-column {
  1454. display: flex;
  1455. flex-direction: column;
  1456. align-items: center;
  1457. }
  1458. .bazi-pillar-label {
  1459. font-size: 22rpx;
  1460. color: #999;
  1461. margin-bottom: 6rpx;
  1462. }
  1463. .bazi-pillar-value {
  1464. font-size: 32rpx;
  1465. font-weight: 700;
  1466. color: #8B5CF6;
  1467. background: #F5F0FF;
  1468. padding: 10rpx 14rpx;
  1469. border-radius: 10rpx;
  1470. }
  1471. /* 五行能量 */
  1472. .wuxing-list {
  1473. display: flex;
  1474. flex-direction: column;
  1475. gap: 12rpx;
  1476. }
  1477. .wuxing-item {
  1478. display: flex;
  1479. align-items: center;
  1480. gap: 12rpx;
  1481. }
  1482. .wuxing-label {
  1483. font-size: 26rpx;
  1484. font-weight: 600;
  1485. width: 44rpx;
  1486. text-align: center;
  1487. }
  1488. .wuxing-bar-track {
  1489. flex: 1;
  1490. height: 20rpx;
  1491. background: #F0F0F0;
  1492. border-radius: 10rpx;
  1493. overflow: hidden;
  1494. }
  1495. .wuxing-bar-fill {
  1496. height: 100%;
  1497. border-radius: 10rpx;
  1498. }
  1499. .wuxing-value {
  1500. font-size: 22rpx;
  1501. color: #666;
  1502. width: 56rpx;
  1503. text-align: right;
  1504. }
  1505. .energy-card {
  1506. margin-top: 20rpx;
  1507. padding: 24rpx 20rpx;
  1508. background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  1509. border-radius: 20rpx;
  1510. position: relative;
  1511. overflow: hidden;
  1512. }
  1513. .energy-card::before {
  1514. content: '';
  1515. position: absolute;
  1516. top: -60rpx;
  1517. right: -60rpx;
  1518. width: 200rpx;
  1519. height: 200rpx;
  1520. background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%);
  1521. border-radius: 50%;
  1522. }
  1523. .energy-card::after {
  1524. content: '';
  1525. position: absolute;
  1526. bottom: -40rpx;
  1527. left: -40rpx;
  1528. width: 160rpx;
  1529. height: 160rpx;
  1530. background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  1531. border-radius: 50%;
  1532. }
  1533. .energy-header {
  1534. display: flex;
  1535. align-items: center;
  1536. margin-bottom: 14rpx;
  1537. position: relative;
  1538. z-index: 1;
  1539. }
  1540. .energy-icon {
  1541. font-size: 32rpx;
  1542. margin-right: 10rpx;
  1543. }
  1544. .energy-label {
  1545. font-size: 28rpx;
  1546. font-weight: 700;
  1547. background: linear-gradient(135deg, #F59E0B, #FF6B9D);
  1548. -webkit-background-clip: text;
  1549. -webkit-text-fill-color: transparent;
  1550. background-clip: text;
  1551. }
  1552. .energy-divider {
  1553. height: 2rpx;
  1554. background: linear-gradient(90deg, rgba(255,215,0,0.5), rgba(255,107,157,0.3), transparent);
  1555. margin-bottom: 18rpx;
  1556. position: relative;
  1557. z-index: 1;
  1558. }
  1559. .energy-quote {
  1560. font-size: 26rpx;
  1561. color: #E2E8F0;
  1562. line-height: 1.8;
  1563. display: block;
  1564. margin-bottom: 14rpx;
  1565. position: relative;
  1566. z-index: 1;
  1567. padding-left: 20rpx;
  1568. letter-spacing: 1rpx;
  1569. }
  1570. .energy-quote::before {
  1571. content: '';
  1572. position: absolute;
  1573. left: 0;
  1574. top: 4rpx;
  1575. bottom: 4rpx;
  1576. width: 4rpx;
  1577. background: linear-gradient(180deg, #F59E0B, #FF6B9D);
  1578. border-radius: 2rpx;
  1579. }
  1580. .energy-advice {
  1581. font-size: 24rpx;
  1582. color: #94A3B8;
  1583. line-height: 1.7;
  1584. display: block;
  1585. position: relative;
  1586. z-index: 1;
  1587. padding: 14rpx 18rpx;
  1588. background: rgba(255,255,255,0.05);
  1589. border-radius: 12rpx;
  1590. border: 1rpx solid rgba(255,255,255,0.08);
  1591. }
  1592. .energy-footer {
  1593. display: flex;
  1594. justify-content: center;
  1595. gap: 12rpx;
  1596. margin-top: 18rpx;
  1597. position: relative;
  1598. z-index: 1;
  1599. }
  1600. .energy-footer-dot {
  1601. width: 8rpx;
  1602. height: 8rpx;
  1603. border-radius: 50%;
  1604. background: rgba(255,255,255,0.3);
  1605. }
  1606. .energy-footer-dot:nth-child(2) {
  1607. background: rgba(255,215,0,0.6);
  1608. width: 10rpx;
  1609. height: 10rpx;
  1610. }
  1611. /* 星座+灵数双栏 */
  1612. .culture-dual {
  1613. display: flex;
  1614. gap: 16rpx;
  1615. }
  1616. .culture-dual-item {
  1617. flex: 1;
  1618. background: #fff;
  1619. border-radius: 20rpx;
  1620. padding: 20rpx;
  1621. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.04);
  1622. display: flex;
  1623. flex-direction: column;
  1624. align-items: center;
  1625. }
  1626. .culture-dual-icon {
  1627. font-size: 36rpx;
  1628. margin-bottom: 8rpx;
  1629. }
  1630. .culture-dual-label {
  1631. font-size: 22rpx;
  1632. color: #999;
  1633. margin-bottom: 6rpx;
  1634. }
  1635. .culture-dual-value {
  1636. font-size: 28rpx;
  1637. font-weight: 700;
  1638. color: #8B5CF6;
  1639. }
  1640. .culture-empty {
  1641. text-align: center;
  1642. padding: 30rpx 0;
  1643. color: #bbb;
  1644. font-size: 24rpx;
  1645. }
  1646. /* ===== 每日心理 ===== */
  1647. .tip-card {
  1648. background: #fff;
  1649. border-radius: 20rpx;
  1650. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1651. display: flex;
  1652. flex-direction: row;
  1653. overflow: hidden;
  1654. }
  1655. .tip-left-bar {
  1656. width: 6rpx;
  1657. background: linear-gradient(180deg, #5B9BD5, #8FC5E8);
  1658. flex-shrink: 0;
  1659. }
  1660. .tip-body {
  1661. flex: 1;
  1662. padding: 28rpx 24rpx;
  1663. }
  1664. .tip-title {
  1665. font-size: 28rpx;
  1666. font-weight: bold;
  1667. color: #5B9BD5;
  1668. display: block;
  1669. margin-bottom: 12rpx;
  1670. }
  1671. .tip-content {
  1672. font-size: 24rpx;
  1673. color: #666;
  1674. line-height: 1.6;
  1675. display: block;
  1676. margin-bottom: 16rpx;
  1677. }
  1678. .tip-footer {
  1679. display: flex;
  1680. flex-direction: row;
  1681. justify-content: flex-end;
  1682. }
  1683. .tip-source {
  1684. font-size: 22rpx;
  1685. color: #bbb;
  1686. }
  1687. /* ===== 通用区块 ===== */
  1688. .section {
  1689. margin: 20rpx 30rpx;
  1690. }
  1691. .section-header {
  1692. margin-bottom: 20rpx;
  1693. }
  1694. .section-title {
  1695. font-size: 30rpx;
  1696. font-weight: bold;
  1697. color: #333;
  1698. }
  1699. /* ===== 推荐阅读 ===== */
  1700. .article-list {
  1701. display: flex;
  1702. flex-direction: column;
  1703. }
  1704. .article-card {
  1705. background: #fff;
  1706. border-radius: 20rpx;
  1707. padding: 28rpx 24rpx;
  1708. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1709. margin-bottom: 20rpx;
  1710. }
  1711. .article-category {
  1712. display: inline-block;
  1713. padding: 4rpx 18rpx;
  1714. border-radius: 20rpx;
  1715. margin-bottom: 14rpx;
  1716. }
  1717. .article-category-text {
  1718. font-size: 20rpx;
  1719. color: #fff;
  1720. font-weight: 500;
  1721. }
  1722. .article-title {
  1723. font-size: 28rpx;
  1724. font-weight: bold;
  1725. color: #333;
  1726. display: block;
  1727. margin-bottom: 10rpx;
  1728. }
  1729. .article-summary {
  1730. font-size: 24rpx;
  1731. color: #888;
  1732. line-height: 1.5;
  1733. display: block;
  1734. margin-bottom: 20rpx;
  1735. }
  1736. .article-meta {
  1737. display: flex;
  1738. flex-direction: row;
  1739. align-items: center;
  1740. justify-content: space-between;
  1741. }
  1742. .meta-item {
  1743. display: flex;
  1744. flex-direction: row;
  1745. align-items: center;
  1746. margin-right: 20rpx;
  1747. }
  1748. .meta-icon {
  1749. font-size: 22rpx;
  1750. margin-right: 4rpx;
  1751. }
  1752. .meta-text {
  1753. font-size: 22rpx;
  1754. color: #bbb;
  1755. }
  1756. .article-date {
  1757. font-size: 22rpx;
  1758. color: #bbb;
  1759. margin-left: auto;
  1760. }
  1761. /* ===== 功能区入口 ===== */
  1762. .func-section {
  1763. margin: 20rpx 30rpx;
  1764. }
  1765. .func-grid {
  1766. display: flex;
  1767. flex-direction: column;
  1768. gap: 16rpx;
  1769. background: #fff;
  1770. border-radius: 20rpx;
  1771. padding: 24rpx 16rpx;
  1772. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1773. }
  1774. .func-row {
  1775. display: flex;
  1776. flex-direction: row;
  1777. justify-content: space-between;
  1778. }
  1779. .func-item {
  1780. display: flex;
  1781. flex-direction: column;
  1782. align-items: center;
  1783. flex: 1;
  1784. }
  1785. .func-icon-wrap {
  1786. width: 80rpx;
  1787. height: 80rpx;
  1788. border-radius: 40rpx;
  1789. background: linear-gradient(135deg, #D6EAF8, #EBF2FA);
  1790. display: flex;
  1791. align-items: center;
  1792. justify-content: center;
  1793. margin-bottom: 10rpx;
  1794. }
  1795. .func-icon {
  1796. font-size: 40rpx;
  1797. }
  1798. .func-label {
  1799. font-size: 22rpx;
  1800. color: #666;
  1801. font-weight: 500;
  1802. }
  1803. .func-item:active {
  1804. opacity: 0.7;
  1805. }
  1806. /* ===== 底部 ===== */
  1807. .bottom-spacer {
  1808. height: 120rpx;
  1809. }
  1810. /* ===== 肠脑轴 ===== */
  1811. .gut-insight-text {
  1812. font-size: 24rpx;
  1813. color: #666;
  1814. margin-bottom: 16rpx;
  1815. padding: 12rpx 16rpx;
  1816. background: #F0FFF4;
  1817. border-radius: 12rpx;
  1818. line-height: 1.6;
  1819. }
  1820. .gut-indicator-list {
  1821. display: flex;
  1822. flex-direction: column;
  1823. gap: 12rpx;
  1824. }
  1825. .gut-indicator-item {
  1826. display: flex;
  1827. align-items: center;
  1828. gap: 12rpx;
  1829. }
  1830. .gut-indicator-left {
  1831. width: 80rpx;
  1832. flex-shrink: 0;
  1833. }
  1834. .gut-indicator-name {
  1835. font-size: 22rpx;
  1836. color: #666;
  1837. }
  1838. .gut-indicator-bar-track {
  1839. flex: 1;
  1840. height: 16rpx;
  1841. background: #F0F0F0;
  1842. border-radius: 8rpx;
  1843. overflow: hidden;
  1844. }
  1845. .gut-indicator-bar-fill {
  1846. height: 100%;
  1847. border-radius: 8rpx;
  1848. transition: width 0.3s;
  1849. }
  1850. .gut-indicator-value {
  1851. font-size: 22rpx;
  1852. color: #666;
  1853. width: 60rpx;
  1854. text-align: right;
  1855. }
  1856. .gut-indicator-status {
  1857. font-size: 20rpx;
  1858. padding: 2rpx 12rpx;
  1859. border-radius: 10rpx;
  1860. width: 60rpx;
  1861. text-align: center;
  1862. }
  1863. .status-normal {
  1864. background: #D1FAE5;
  1865. color: #059669;
  1866. }
  1867. .status-abnormal {
  1868. background: #FEE2E2;
  1869. color: #DC2626;
  1870. }
  1871. .status-warning {
  1872. background: #FEF3C7;
  1873. color: #D97706;
  1874. }
  1875. /* ===== 关键信息(家庭+个人) ===== */
  1876. .key-info-card {
  1877. background: #fff;
  1878. border-radius: 20rpx;
  1879. padding: 24rpx;
  1880. margin-top: 20rpx;
  1881. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1882. }
  1883. .key-info-header {
  1884. display: flex;
  1885. align-items: center;
  1886. margin-bottom: 20rpx;
  1887. }
  1888. .key-info-icon {
  1889. font-size: 28rpx;
  1890. margin-right: 8rpx;
  1891. }
  1892. .key-info-title {
  1893. font-size: 28rpx;
  1894. font-weight: 600;
  1895. color: #333;
  1896. }
  1897. .key-info-body {
  1898. display: flex;
  1899. flex-direction: row;
  1900. gap: 20rpx;
  1901. }
  1902. .key-info-col {
  1903. flex: 1;
  1904. background: #F8F9FA;
  1905. border-radius: 14rpx;
  1906. padding: 16rpx;
  1907. min-width: 0;
  1908. }
  1909. .ki-subtitle {
  1910. font-size: 22rpx;
  1911. color: #999;
  1912. margin-bottom: 12rpx;
  1913. font-weight: 500;
  1914. }
  1915. .ki-row {
  1916. display: flex;
  1917. align-items: center;
  1918. margin-bottom: 10rpx;
  1919. flex-wrap: nowrap;
  1920. }
  1921. .ki-row:last-child {
  1922. margin-bottom: 0;
  1923. }
  1924. .ki-label {
  1925. font-size: 22rpx;
  1926. color: #888;
  1927. margin-right: 8rpx;
  1928. white-space: nowrap;
  1929. }
  1930. .ki-dot {
  1931. width: 16rpx;
  1932. height: 16rpx;
  1933. border-radius: 50%;
  1934. margin-right: 6rpx;
  1935. flex-shrink: 0;
  1936. }
  1937. .ki-valuel {
  1938. font-size: 24rpx;
  1939. color: #333;
  1940. font-weight: 500;
  1941. white-space: nowrap;
  1942. }
  1943. .ki-valued {
  1944. font-size: 24rpx;
  1945. color: #333;
  1946. font-weight: 500;
  1947. }
  1948. .ki-swatch {
  1949. width: 28rpx;
  1950. height: 28rpx;
  1951. border-radius: 50%;
  1952. margin-right: 6rpx;
  1953. border: 2rpx solid rgba(0,0,0,0.06);
  1954. flex-shrink: 0;
  1955. }
  1956. .ki-num {
  1957. font-size: 30rpx;
  1958. font-weight: 700;
  1959. color: #FF6B9D;
  1960. }
  1961. .ki-fortune {
  1962. font-size: 24rpx;
  1963. font-weight: 700;
  1964. padding: 2rpx 12rpx;
  1965. border-radius: 10rpx;
  1966. }
  1967. .ki-fortune-0 {
  1968. color: #D32F2F;
  1969. background: #FFEBEE;
  1970. }
  1971. .ki-fortune-1 {
  1972. color: #E65100;
  1973. background: #FFF3E0;
  1974. }
  1975. .ki-fortune-2 {
  1976. color: #F9A825;
  1977. background: #FFFDE7;
  1978. }
  1979. .ki-fortune-3 {
  1980. color: #7B1FA2;
  1981. background: #F3E5F5;
  1982. }
  1983. .ki-fortune-4 {
  1984. color: #B71C1C;
  1985. background: #FFCDD2;
  1986. }
  1987. .ki-insight {
  1988. display: flex;
  1989. align-items: flex-start;
  1990. margin-top: 16rpx;
  1991. padding: 16rpx;
  1992. background: #FFF8F0;
  1993. border-radius: 12rpx;
  1994. }
  1995. .ki-insight-icon {
  1996. font-size: 24rpx;
  1997. margin-right: 8rpx;
  1998. flex-shrink: 0;
  1999. }
  2000. .ki-insight-text {
  2001. font-size: 22rpx;
  2002. color: #8B6914;
  2003. line-height: 1.5;
  2004. }
  2005. .ki-footer {
  2006. margin-top: 16rpx;
  2007. text-align: center;
  2008. padding: 12rpx;
  2009. font-size: 24rpx;
  2010. color: #8B5CF6;
  2011. font-weight: 500;
  2012. background: #F5F3FF;
  2013. border-radius: 12rpx;
  2014. }
  2015. .ki-footer:active {
  2016. opacity: 0.7;
  2017. }
  2018. /* DAN 报告卡片 */
  2019. .dan-card {
  2020. background: #fff;
  2021. border-radius: 16rpx;
  2022. padding: 24rpx;
  2023. margin-bottom: 16rpx;
  2024. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  2025. }
  2026. .dan-card-header {
  2027. display: flex;
  2028. justify-content: space-between;
  2029. align-items: center;
  2030. margin-bottom: 12rpx;
  2031. }
  2032. .dan-report-date {
  2033. font-size: 26rpx;
  2034. color: #666;
  2035. }
  2036. .dan-status {
  2037. font-size: 22rpx;
  2038. padding: 4rpx 16rpx;
  2039. border-radius: 8rpx;
  2040. }
  2041. .dan-status.confirmed {
  2042. background: #D1FAE5;
  2043. color: #065F46;
  2044. }
  2045. .dan-status.pending {
  2046. background: #FEF3C7;
  2047. color: #92400E;
  2048. }
  2049. .dan-report-desc {
  2050. font-size: 28rpx;
  2051. color: #333;
  2052. font-weight: 500;
  2053. margin-bottom: 12rpx;
  2054. display: block;
  2055. }
  2056. .dan-card-footer {
  2057. text-align: right;
  2058. }
  2059. .dan-view-link {
  2060. font-size: 26rpx;
  2061. color: #6366F1;
  2062. }
  2063. .section-header {
  2064. display: flex;
  2065. justify-content: space-between;
  2066. align-items: center;
  2067. margin-bottom: 20rpx;
  2068. }
  2069. .section-title {
  2070. font-size: 32rpx;
  2071. font-weight: 700;
  2072. color: #333;
  2073. }
  2074. .section-more {
  2075. font-size: 26rpx;
  2076. color: #6366F1;
  2077. padding: 8rpx 16rpx;
  2078. }
  2079. </style>