index.vue 70 KB

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