index.vue 57 KB

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