index.vue 56 KB

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