index.vue 58 KB

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