index.vue 58 KB

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