index.vue 57 KB

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