index.vue 58 KB

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