index.vue 57 KB

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