index.vue 57 KB

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