index.vue 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144
  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 token = uni.getStorageSync('token')
  832. uni.request({
  833. url: config.API_BASE_URL + '/api/mind/traditional/family-dashboard',
  834. method: 'POST',
  835. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  836. data: {},
  837. success: function(res) {
  838. if (res.data && res.data.code === 200 && res.data.data) {
  839. self.compatibilityData = res.data.data
  840. }
  841. },
  842. fail: function() {}
  843. })
  844. },
  845. scrollToSection: function(section) {
  846. uni.pageScrollTo({ selector: '#' + section, duration: 300 })
  847. },
  848. onTaskClick: function(task) {
  849. uni.navigateTo({ url: '/pages/tasks/tasks' })
  850. },
  851. goActivityDetail: function(act) {
  852. if (act && act.id) uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id })
  853. },
  854. goMoreActivities: function() {
  855. uni.navigateTo({ url: '/pages/activity/index' })
  856. },
  857. goTasks: function() { uni.navigateTo({ url: '/pages/tasks/tasks' }) },
  858. goFamilyMembers: function() {
  859. uni.navigateTo({ url: '/pages/profile-extra/family-members' })
  860. },
  861. goAssessment: function() { uni.navigateTo({ url: '/pages/assessment/apply' }) },
  862. goLogin: function() { uni.navigateTo({ url: '/pages/login/login' }) },
  863. // ===== 传统文化数据 =====
  864. // ===== 联系人 / 关系健康 =====
  865. loadContacts: function() {
  866. var self = this
  867. getContactList({}).then(function(res) {
  868. if (res.code === 200) {
  869. self.contactList = Array.isArray(res.data) ? res.data : []
  870. } else {
  871. self.contactList = []
  872. }
  873. }).catch(function() {
  874. self.contactList = []
  875. })
  876. },
  877. loadHealthAlerts: function() {
  878. var self = this
  879. getHealthAlerts({}).then(function(res) {
  880. if (res.code === 200) {
  881. self.healthAlerts = Array.isArray(res.data) ? res.data : []
  882. } else {
  883. self.healthAlerts = []
  884. }
  885. }).catch(function() {
  886. self.healthAlerts = []
  887. })
  888. },
  889. loadMilestones: function() {
  890. var self = this
  891. getMilestones({}, 30).then(function(res) {
  892. if (res.code === 200) {
  893. self.milestones = Array.isArray(res.data) ? res.data : []
  894. } else {
  895. self.milestones = []
  896. }
  897. }).catch(function() {
  898. self.milestones = []
  899. })
  900. },
  901. loadTraditionalCultureData: function() {
  902. var self = this
  903. var memberId = this.currentChildId
  904. if (!memberId) {
  905. self.traditionalLoading = false
  906. return
  907. }
  908. self.traditionalLoading = true
  909. uni.request({
  910. url: config.API_BASE_URL + '/api/mind/traditional/mirror',
  911. method: 'POST',
  912. data: { memberId: memberId, memberType: 'child' },
  913. success: function(res) {
  914. self.traditionalLoading = false
  915. if (res.data && res.data.code === 200 && res.data.data) {
  916. var d = res.data.data
  917. if (d.eightCharacters || d.wuxingElements || d.zodiac || d.numSoul) {
  918. self.traditionalData = d
  919. } else {
  920. self.traditionalData = null
  921. }
  922. } else {
  923. self.traditionalData = null
  924. }
  925. },
  926. fail: function() {
  927. self.traditionalLoading = false
  928. self.traditionalData = null
  929. }
  930. })
  931. },
  932. _watchPageReady() {
  933. var self = this
  934. var unwatch = this.$watch(function() {
  935. if (self.isLoggedIn) {
  936. return !!(self.emiData || self.energyOverview || (self.dimensionActivities && self.dimensionActivities.length > 0))
  937. }
  938. return !!(self.dimensionActivities && self.dimensionActivities.length > 0)
  939. }, function(val) {
  940. if (val) {
  941. if (unwatch) unwatch()
  942. if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
  943. }
  944. })
  945. },
  946. // ===== DAN 报告 =====
  947. loadDanReports: function() {
  948. var self = this
  949. var memberId = self.currentChildId
  950. if (!memberId) return
  951. getDanReportByChild(memberId, 'mind').then(function(res) {
  952. if (res.code === 200 && res.data) {
  953. self.danReports = res.data
  954. }
  955. }).catch(function() {})
  956. },
  957. goDanUpload: function(dimension) {
  958. uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
  959. },
  960. viewDanReport: function(report) {
  961. uni.navigateTo({ url: '/pages/dan-assessment/report-upload?draftId=' + report.id })
  962. },
  963. formatDate: function(dateStr) {
  964. if (!dateStr) return ''
  965. var d = new Date(dateStr)
  966. return d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate()
  967. }
  968. }
  969. }
  970. </script>
  971. <style scoped>
  972. .container {
  973. min-height: 100vh;
  974. background: #f5f7fa;
  975. padding-bottom: 120rpx;
  976. }
  977. /* ===== 心·心理 标题栏 ===== */
  978. .section-title-bar {
  979. display: flex;
  980. flex-direction: row;
  981. align-items: center;
  982. margin: 20rpx 30rpx 10rpx;
  983. padding: 16rpx 24rpx;
  984. background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  985. border-radius: 20rpx;
  986. box-shadow: 0 4rpx 16rpx rgba(139,92,246,0.25);
  987. }
  988. .section-title-icon {
  989. font-size: 32rpx;
  990. color: #fff;
  991. margin-right: 12rpx;
  992. }
  993. .section-title-text {
  994. font-size: 32rpx;
  995. font-weight: bold;
  996. color: #fff;
  997. }
  998. /* ===== 心理报告上传卡片 ===== */
  999. .mind-report-section {
  1000. margin: 20rpx 30rpx;
  1001. }
  1002. .mind-report-card {
  1003. display: flex;
  1004. flex-direction: row;
  1005. align-items: center;
  1006. background: linear-gradient(135deg, #F3E8FF, #FCE4EC);
  1007. border-radius: 20rpx;
  1008. padding: 28rpx 24rpx;
  1009. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1010. }
  1011. .mind-report-left {
  1012. width: 100rpx;
  1013. height: 100rpx;
  1014. background: rgba(255,255,255,0.7);
  1015. border-radius: 20rpx;
  1016. display: flex;
  1017. align-items: center;
  1018. justify-content: center;
  1019. margin-right: 20rpx;
  1020. flex-shrink: 0;
  1021. }
  1022. .mind-report-icon {
  1023. font-size: 52rpx;
  1024. }
  1025. .mind-report-right {
  1026. flex: 1;
  1027. }
  1028. .mind-report-title {
  1029. font-size: 30rpx;
  1030. font-weight: bold;
  1031. color: #7C3AED;
  1032. display: block;
  1033. margin-bottom: 6rpx;
  1034. }
  1035. .mind-report-desc {
  1036. font-size: 22rpx;
  1037. color: #A855F7;
  1038. line-height: 1.5;
  1039. display: block;
  1040. margin-bottom: 10rpx;
  1041. }
  1042. .mind-report-tags {
  1043. display: flex;
  1044. flex-direction: row;
  1045. gap: 10rpx;
  1046. }
  1047. .mind-tag {
  1048. font-size: 20rpx;
  1049. color: #7C3AED;
  1050. background: rgba(255,255,255,0.6);
  1051. padding: 4rpx 14rpx;
  1052. border-radius: 20rpx;
  1053. }
  1054. .mind-report-arrow {
  1055. font-size: 36rpx;
  1056. color: #C084FC;
  1057. margin-left: 10rpx;
  1058. flex-shrink: 0;
  1059. }
  1060. .mind-report-card:active {
  1061. opacity: 0.7;
  1062. }
  1063. .mind-report-list {
  1064. margin-top: 12rpx;
  1065. }
  1066. .mind-report-item {
  1067. display: flex;
  1068. flex-direction: row;
  1069. align-items: center;
  1070. background: #fff;
  1071. border-radius: 14rpx;
  1072. padding: 20rpx 20rpx;
  1073. margin-bottom: 8rpx;
  1074. box-shadow: 0 1rpx 6rpx rgba(0,0,0,0.05);
  1075. }
  1076. .mind-report-item:active {
  1077. opacity: 0.7;
  1078. }
  1079. .mind-report-item-icon {
  1080. font-size: 28rpx;
  1081. margin-right: 14rpx;
  1082. }
  1083. .mind-report-item-name {
  1084. font-size: 26rpx;
  1085. color: #333;
  1086. flex: 1;
  1087. }
  1088. .mind-report-item-date {
  1089. font-size: 22rpx;
  1090. color: #999;
  1091. margin-right: 14rpx;
  1092. }
  1093. .mind-report-item-status {
  1094. font-size: 22rpx;
  1095. padding: 2rpx 12rpx;
  1096. border-radius: 20rpx;
  1097. }
  1098. .mind-report-item-status.parsed {
  1099. color: #7C3AED;
  1100. background: #F3E8FF;
  1101. }
  1102. .mind-report-item-status.pending {
  1103. color: #999;
  1104. background: #F5F5F5;
  1105. }
  1106. .mind-report-empty {
  1107. display: flex;
  1108. flex-direction: row;
  1109. align-items: center;
  1110. justify-content: center;
  1111. padding: 24rpx;
  1112. margin-top: 8rpx;
  1113. }
  1114. .mind-report-empty-icon {
  1115. font-size: 32rpx;
  1116. margin-right: 10rpx;
  1117. }
  1118. .mind-report-empty-text {
  1119. font-size: 24rpx;
  1120. color: #bbb;
  1121. }
  1122. /* ===== 心理能量概况 ===== */
  1123. .energy-overview {
  1124. display: flex;
  1125. flex-direction: row;
  1126. margin: 20rpx 30rpx;
  1127. background: #fff;
  1128. border-radius: 20rpx;
  1129. padding: 24rpx 16rpx;
  1130. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1131. justify-content: space-around;
  1132. }
  1133. .energy-badge {
  1134. display: flex;
  1135. flex-direction: column;
  1136. align-items: center;
  1137. flex: 1;
  1138. }
  1139. .badge-icon {
  1140. font-size: 36rpx;
  1141. margin-bottom: 8rpx;
  1142. }
  1143. .badge-value {
  1144. font-size: 36rpx;
  1145. font-weight: bold;
  1146. color: #333;
  1147. }
  1148. .badge-label {
  1149. font-size: 20rpx;
  1150. color: #999;
  1151. margin-top: 4rpx;
  1152. }
  1153. /* ===== EMI 四维条形图 ===== */
  1154. .emi-section {
  1155. margin: 20rpx 30rpx;
  1156. }
  1157. .emi-card {
  1158. background: #fff;
  1159. border-radius: 24rpx;
  1160. padding: 30rpx;
  1161. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1162. }
  1163. .emi-card-title {
  1164. font-size: 30rpx;
  1165. font-weight: bold;
  1166. color: #333;
  1167. display: block;
  1168. }
  1169. .personality-header {
  1170. display: flex;
  1171. flex-direction: row;
  1172. align-items: center;
  1173. justify-content: space-between;
  1174. margin-bottom: 24rpx;
  1175. }
  1176. .test-btn {
  1177. background: #8B5CF6;
  1178. padding: 8rpx 28rpx;
  1179. border-radius: 30rpx;
  1180. }
  1181. .test-btn-text {
  1182. font-size: 24rpx;
  1183. color: #fff;
  1184. font-weight: 500;
  1185. }
  1186. .emi-bar-item {
  1187. display: flex;
  1188. flex-direction: row;
  1189. align-items: center;
  1190. margin-bottom: 20rpx;
  1191. }
  1192. .emi-bar-label {
  1193. font-size: 24rpx;
  1194. color: #666;
  1195. width: 120rpx;
  1196. flex-shrink: 0;
  1197. }
  1198. .emi-bar-track {
  1199. flex: 1;
  1200. height: 20rpx;
  1201. background: #f0f0f0;
  1202. border-radius: 10rpx;
  1203. overflow: hidden;
  1204. margin: 0 16rpx;
  1205. }
  1206. .emi-bar-fill {
  1207. height: 100%;
  1208. border-radius: 10rpx;
  1209. transition: width 0.5s;
  1210. }
  1211. .emi-bar-score {
  1212. font-size: 26rpx;
  1213. font-weight: bold;
  1214. color: #333;
  1215. width: 60rpx;
  1216. text-align: right;
  1217. flex-shrink: 0;
  1218. }
  1219. .emi-bar-level {
  1220. font-size: 20rpx;
  1221. width: 80rpx;
  1222. text-align: right;
  1223. flex-shrink: 0;
  1224. }
  1225. .level-excellent { color: #10B981; }
  1226. .level-good { color: #3B82F6; }
  1227. .level-average { color: #F97316; }
  1228. .level-low { color: #EF4444; }
  1229. .emi-footer {
  1230. display: flex;
  1231. flex-direction: row;
  1232. justify-content: space-between;
  1233. align-items: center;
  1234. margin-top: 20rpx;
  1235. padding-top: 20rpx;
  1236. border-top: 1rpx solid #f0f0f0;
  1237. }
  1238. .emi-overall {
  1239. font-size: 28rpx;
  1240. font-weight: bold;
  1241. color: #FF6B35;
  1242. }
  1243. .emi-link {
  1244. display: flex;
  1245. flex-direction: row;
  1246. align-items: center;
  1247. }
  1248. .emi-link-text {
  1249. font-size: 26rpx;
  1250. color: #FF6B35;
  1251. font-weight: 500;
  1252. }
  1253. .emi-link-arrow {
  1254. font-size: 26rpx;
  1255. color: #FF6B35;
  1256. margin-left: 8rpx;
  1257. }
  1258. /* ===== EMI 心理报告卡片 ===== */
  1259. .emi-card {
  1260. margin: 30rpx;
  1261. background: #fff;
  1262. border-radius: 24rpx;
  1263. padding: 30rpx;
  1264. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1265. }
  1266. .emi-header {
  1267. margin-bottom: 24rpx;
  1268. }
  1269. .emi-title {
  1270. font-size: 30rpx;
  1271. font-weight: bold;
  1272. color: #333;
  1273. display: block;
  1274. }
  1275. .emi-overall-wrap {
  1276. display: flex;
  1277. flex-direction: column;
  1278. align-items: center;
  1279. padding: 32rpx 0;
  1280. background: linear-gradient(135deg, #FF6B35, #FFD700);
  1281. border-radius: 16rpx;
  1282. margin: 20rpx 0;
  1283. color: #fff;
  1284. }
  1285. .emi-overall-label {
  1286. font-size: 26rpx;
  1287. margin-bottom: 6rpx;
  1288. }
  1289. .emi-overall-value {
  1290. font-size: 64rpx;
  1291. font-weight: bold;
  1292. margin-bottom: 6rpx;
  1293. }
  1294. .emi-overall-level {
  1295. font-size: 24rpx;
  1296. padding: 4rpx 16rpx;
  1297. border-radius: 12rpx;
  1298. background: rgba(255,255,255,0.2);
  1299. }
  1300. .emi-dimensions {
  1301. display: flex;
  1302. flex-direction: column;
  1303. gap: 20rpx;
  1304. }
  1305. .emi-dimension {
  1306. display: flex;
  1307. flex-direction: column;
  1308. }
  1309. .emi-dim-header {
  1310. display: flex;
  1311. flex-direction: row;
  1312. justify-content: space-between;
  1313. align-items: center;
  1314. margin-bottom: 8rpx;
  1315. }
  1316. .emi-dim-label {
  1317. font-size: 26rpx;
  1318. color: #666;
  1319. }
  1320. .emi-dim-values {
  1321. display: flex;
  1322. flex-direction: row;
  1323. align-items: center;
  1324. }
  1325. .emi-dim-score {
  1326. font-size: 28rpx;
  1327. font-weight: bold;
  1328. color: #FF6B35;
  1329. margin-right: 12rpx;
  1330. }
  1331. .emi-dim-level {
  1332. font-size: 20rpx;
  1333. padding: 2rpx 12rpx;
  1334. border-radius: 8rpx;
  1335. }
  1336. .emi-dim-bar {
  1337. height: 14rpx;
  1338. background: #f0f0f0;
  1339. border-radius: 7rpx;
  1340. overflow: hidden;
  1341. }
  1342. .emi-dim-bar-fill {
  1343. height: 100%;
  1344. border-radius: 7rpx;
  1345. transition: width 0.5s;
  1346. }
  1347. .emi-footer {
  1348. display: flex;
  1349. justify-content: flex-end;
  1350. align-items: center;
  1351. padding-top: 20rpx;
  1352. border-top: 1rpx solid #f0f0f0;
  1353. margin-top: 20rpx;
  1354. }
  1355. .emi-footer-text {
  1356. font-size: 24rpx;
  1357. color: #F97316;
  1358. font-weight: 500;
  1359. }
  1360. .emi-footer-icon {
  1361. font-size: 24rpx;
  1362. margin-left: 8rpx;
  1363. }
  1364. .level-excellent { color: #10B981; background: #ECFDF5; }
  1365. .level-good { color: #3B82F6; background: #EFF6FF; }
  1366. .level-average { color: #F97316; background: #FFF7ED; }
  1367. .level-low { color: #EF4444; background: #FEF2F2; }
  1368. /* 雷达图内的空状态 */
  1369. .placeholder-content {
  1370. display: flex;
  1371. flex-direction: column;
  1372. align-items: center;
  1373. padding: 40rpx 20rpx;
  1374. }
  1375. /* ===== 占位卡 ===== */
  1376. .placeholder-card {
  1377. margin: 30rpx;
  1378. background: #fff;
  1379. border-radius: 24rpx;
  1380. padding: 60rpx 40rpx;
  1381. display: flex;
  1382. flex-direction: column;
  1383. align-items: center;
  1384. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  1385. }
  1386. .placeholder-icon {
  1387. font-size: 80rpx;
  1388. margin-bottom: 20rpx;
  1389. }
  1390. .placeholder-title {
  1391. font-size: 32rpx;
  1392. font-weight: bold;
  1393. color: #333;
  1394. margin-bottom: 16rpx;
  1395. }
  1396. .placeholder-desc {
  1397. font-size: 26rpx;
  1398. color: #999;
  1399. text-align: center;
  1400. line-height: 1.6;
  1401. margin-bottom: 30rpx;
  1402. }
  1403. .placeholder-btn {
  1404. background: linear-gradient(135deg, #FF6B35, #FFD700);
  1405. color: #fff;
  1406. font-size: 28rpx;
  1407. font-weight: bold;
  1408. padding: 16rpx 64rpx;
  1409. border-radius: 40rpx;
  1410. box-shadow: 0 4rpx 16rpx rgba(255,107,53,0.3);
  1411. }
  1412. /* ===== 传统文化卡片 ===== */
  1413. .culture-section {
  1414. margin: 20rpx 30rpx;
  1415. }
  1416. .culture-card {
  1417. background: #fff;
  1418. border-radius: 20rpx;
  1419. padding: 24rpx;
  1420. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.04);
  1421. margin-bottom: 16rpx;
  1422. }
  1423. .culture-card-header {
  1424. display: flex;
  1425. align-items: center;
  1426. margin-bottom: 16rpx;
  1427. }
  1428. .culture-card-icon {
  1429. font-size: 32rpx;
  1430. margin-right: 10rpx;
  1431. }
  1432. .culture-card-title {
  1433. font-size: 28rpx;
  1434. font-weight: 600;
  1435. color: #333;
  1436. }
  1437. .culture-card-body {
  1438. font-size: 24rpx;
  1439. color: #666;
  1440. line-height: 1.6;
  1441. }
  1442. /* 八字四柱 */
  1443. .bazi-grid {
  1444. display: flex;
  1445. justify-content: space-around;
  1446. padding: 8rpx 0;
  1447. }
  1448. .bazi-column {
  1449. display: flex;
  1450. flex-direction: column;
  1451. align-items: center;
  1452. }
  1453. .bazi-pillar-label {
  1454. font-size: 22rpx;
  1455. color: #999;
  1456. margin-bottom: 6rpx;
  1457. }
  1458. .bazi-pillar-value {
  1459. font-size: 32rpx;
  1460. font-weight: 700;
  1461. color: #8B5CF6;
  1462. background: #F5F0FF;
  1463. padding: 10rpx 14rpx;
  1464. border-radius: 10rpx;
  1465. }
  1466. /* 五行能量 */
  1467. .wuxing-list {
  1468. display: flex;
  1469. flex-direction: column;
  1470. gap: 12rpx;
  1471. }
  1472. .wuxing-item {
  1473. display: flex;
  1474. align-items: center;
  1475. gap: 12rpx;
  1476. }
  1477. .wuxing-label {
  1478. font-size: 26rpx;
  1479. font-weight: 600;
  1480. width: 44rpx;
  1481. text-align: center;
  1482. }
  1483. .wuxing-bar-track {
  1484. flex: 1;
  1485. height: 20rpx;
  1486. background: #F0F0F0;
  1487. border-radius: 10rpx;
  1488. overflow: hidden;
  1489. }
  1490. .wuxing-bar-fill {
  1491. height: 100%;
  1492. border-radius: 10rpx;
  1493. }
  1494. .wuxing-value {
  1495. font-size: 22rpx;
  1496. color: #666;
  1497. width: 56rpx;
  1498. text-align: right;
  1499. }
  1500. .energy-card {
  1501. margin-top: 20rpx;
  1502. padding: 24rpx 20rpx;
  1503. background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  1504. border-radius: 20rpx;
  1505. position: relative;
  1506. overflow: hidden;
  1507. }
  1508. .energy-card::before {
  1509. content: '';
  1510. position: absolute;
  1511. top: -60rpx;
  1512. right: -60rpx;
  1513. width: 200rpx;
  1514. height: 200rpx;
  1515. background: radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%);
  1516. border-radius: 50%;
  1517. }
  1518. .energy-card::after {
  1519. content: '';
  1520. position: absolute;
  1521. bottom: -40rpx;
  1522. left: -40rpx;
  1523. width: 160rpx;
  1524. height: 160rpx;
  1525. background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  1526. border-radius: 50%;
  1527. }
  1528. .energy-header {
  1529. display: flex;
  1530. align-items: center;
  1531. margin-bottom: 14rpx;
  1532. position: relative;
  1533. z-index: 1;
  1534. }
  1535. .energy-icon {
  1536. font-size: 32rpx;
  1537. margin-right: 10rpx;
  1538. }
  1539. .energy-label {
  1540. font-size: 28rpx;
  1541. font-weight: 700;
  1542. background: linear-gradient(135deg, #F59E0B, #FF6B9D);
  1543. -webkit-background-clip: text;
  1544. -webkit-text-fill-color: transparent;
  1545. background-clip: text;
  1546. }
  1547. .energy-divider {
  1548. height: 2rpx;
  1549. background: linear-gradient(90deg, rgba(255,215,0,0.5), rgba(255,107,157,0.3), transparent);
  1550. margin-bottom: 18rpx;
  1551. position: relative;
  1552. z-index: 1;
  1553. }
  1554. .energy-quote {
  1555. font-size: 26rpx;
  1556. color: #E2E8F0;
  1557. line-height: 1.8;
  1558. display: block;
  1559. margin-bottom: 14rpx;
  1560. position: relative;
  1561. z-index: 1;
  1562. padding-left: 20rpx;
  1563. letter-spacing: 1rpx;
  1564. }
  1565. .energy-quote::before {
  1566. content: '';
  1567. position: absolute;
  1568. left: 0;
  1569. top: 4rpx;
  1570. bottom: 4rpx;
  1571. width: 4rpx;
  1572. background: linear-gradient(180deg, #F59E0B, #FF6B9D);
  1573. border-radius: 2rpx;
  1574. }
  1575. .energy-advice {
  1576. font-size: 24rpx;
  1577. color: #94A3B8;
  1578. line-height: 1.7;
  1579. display: block;
  1580. position: relative;
  1581. z-index: 1;
  1582. padding: 14rpx 18rpx;
  1583. background: rgba(255,255,255,0.05);
  1584. border-radius: 12rpx;
  1585. border: 1rpx solid rgba(255,255,255,0.08);
  1586. }
  1587. .energy-footer {
  1588. display: flex;
  1589. justify-content: center;
  1590. gap: 12rpx;
  1591. margin-top: 18rpx;
  1592. position: relative;
  1593. z-index: 1;
  1594. }
  1595. .energy-footer-dot {
  1596. width: 8rpx;
  1597. height: 8rpx;
  1598. border-radius: 50%;
  1599. background: rgba(255,255,255,0.3);
  1600. }
  1601. .energy-footer-dot:nth-child(2) {
  1602. background: rgba(255,215,0,0.6);
  1603. width: 10rpx;
  1604. height: 10rpx;
  1605. }
  1606. /* 星座+灵数双栏 */
  1607. .culture-dual {
  1608. display: flex;
  1609. gap: 16rpx;
  1610. }
  1611. .culture-dual-item {
  1612. flex: 1;
  1613. background: #fff;
  1614. border-radius: 20rpx;
  1615. padding: 20rpx;
  1616. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.04);
  1617. display: flex;
  1618. flex-direction: column;
  1619. align-items: center;
  1620. }
  1621. .culture-dual-icon {
  1622. font-size: 36rpx;
  1623. margin-bottom: 8rpx;
  1624. }
  1625. .culture-dual-label {
  1626. font-size: 22rpx;
  1627. color: #999;
  1628. margin-bottom: 6rpx;
  1629. }
  1630. .culture-dual-value {
  1631. font-size: 28rpx;
  1632. font-weight: 700;
  1633. color: #8B5CF6;
  1634. }
  1635. .culture-empty {
  1636. text-align: center;
  1637. padding: 30rpx 0;
  1638. color: #bbb;
  1639. font-size: 24rpx;
  1640. }
  1641. /* ===== 每日心理 ===== */
  1642. .tip-card {
  1643. background: #fff;
  1644. border-radius: 20rpx;
  1645. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1646. display: flex;
  1647. flex-direction: row;
  1648. overflow: hidden;
  1649. }
  1650. .tip-left-bar {
  1651. width: 6rpx;
  1652. background: linear-gradient(180deg, #5B9BD5, #8FC5E8);
  1653. flex-shrink: 0;
  1654. }
  1655. .tip-body {
  1656. flex: 1;
  1657. padding: 28rpx 24rpx;
  1658. }
  1659. .tip-title {
  1660. font-size: 28rpx;
  1661. font-weight: bold;
  1662. color: #5B9BD5;
  1663. display: block;
  1664. margin-bottom: 12rpx;
  1665. }
  1666. .tip-content {
  1667. font-size: 24rpx;
  1668. color: #666;
  1669. line-height: 1.6;
  1670. display: block;
  1671. margin-bottom: 16rpx;
  1672. }
  1673. .tip-footer {
  1674. display: flex;
  1675. flex-direction: row;
  1676. justify-content: flex-end;
  1677. }
  1678. .tip-source {
  1679. font-size: 22rpx;
  1680. color: #bbb;
  1681. }
  1682. /* ===== 通用区块 ===== */
  1683. .section {
  1684. margin: 20rpx 30rpx;
  1685. }
  1686. .section-header {
  1687. margin-bottom: 20rpx;
  1688. }
  1689. .section-title {
  1690. font-size: 30rpx;
  1691. font-weight: bold;
  1692. color: #333;
  1693. }
  1694. /* ===== 推荐阅读 ===== */
  1695. .article-list {
  1696. display: flex;
  1697. flex-direction: column;
  1698. }
  1699. .article-card {
  1700. background: #fff;
  1701. border-radius: 20rpx;
  1702. padding: 28rpx 24rpx;
  1703. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1704. margin-bottom: 20rpx;
  1705. }
  1706. .article-category {
  1707. display: inline-block;
  1708. padding: 4rpx 18rpx;
  1709. border-radius: 20rpx;
  1710. margin-bottom: 14rpx;
  1711. }
  1712. .article-category-text {
  1713. font-size: 20rpx;
  1714. color: #fff;
  1715. font-weight: 500;
  1716. }
  1717. .article-title {
  1718. font-size: 28rpx;
  1719. font-weight: bold;
  1720. color: #333;
  1721. display: block;
  1722. margin-bottom: 10rpx;
  1723. }
  1724. .article-summary {
  1725. font-size: 24rpx;
  1726. color: #888;
  1727. line-height: 1.5;
  1728. display: block;
  1729. margin-bottom: 20rpx;
  1730. }
  1731. .article-meta {
  1732. display: flex;
  1733. flex-direction: row;
  1734. align-items: center;
  1735. justify-content: space-between;
  1736. }
  1737. .meta-item {
  1738. display: flex;
  1739. flex-direction: row;
  1740. align-items: center;
  1741. margin-right: 20rpx;
  1742. }
  1743. .meta-icon {
  1744. font-size: 22rpx;
  1745. margin-right: 4rpx;
  1746. }
  1747. .meta-text {
  1748. font-size: 22rpx;
  1749. color: #bbb;
  1750. }
  1751. .article-date {
  1752. font-size: 22rpx;
  1753. color: #bbb;
  1754. margin-left: auto;
  1755. }
  1756. /* ===== 功能区入口 ===== */
  1757. .func-section {
  1758. margin: 20rpx 30rpx;
  1759. }
  1760. .func-grid {
  1761. display: flex;
  1762. flex-direction: column;
  1763. gap: 16rpx;
  1764. background: #fff;
  1765. border-radius: 20rpx;
  1766. padding: 24rpx 16rpx;
  1767. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1768. }
  1769. .func-row {
  1770. display: flex;
  1771. flex-direction: row;
  1772. justify-content: space-between;
  1773. }
  1774. .func-item {
  1775. display: flex;
  1776. flex-direction: column;
  1777. align-items: center;
  1778. flex: 1;
  1779. }
  1780. .func-icon-wrap {
  1781. width: 80rpx;
  1782. height: 80rpx;
  1783. border-radius: 40rpx;
  1784. background: linear-gradient(135deg, #D6EAF8, #EBF2FA);
  1785. display: flex;
  1786. align-items: center;
  1787. justify-content: center;
  1788. margin-bottom: 10rpx;
  1789. }
  1790. .func-icon {
  1791. font-size: 40rpx;
  1792. }
  1793. .func-label {
  1794. font-size: 22rpx;
  1795. color: #666;
  1796. font-weight: 500;
  1797. }
  1798. .func-item:active {
  1799. opacity: 0.7;
  1800. }
  1801. /* ===== 底部 ===== */
  1802. .bottom-spacer {
  1803. height: 120rpx;
  1804. }
  1805. /* ===== 肠脑轴 ===== */
  1806. .gut-insight-text {
  1807. font-size: 24rpx;
  1808. color: #666;
  1809. margin-bottom: 16rpx;
  1810. padding: 12rpx 16rpx;
  1811. background: #F0FFF4;
  1812. border-radius: 12rpx;
  1813. line-height: 1.6;
  1814. }
  1815. .gut-indicator-list {
  1816. display: flex;
  1817. flex-direction: column;
  1818. gap: 12rpx;
  1819. }
  1820. .gut-indicator-item {
  1821. display: flex;
  1822. align-items: center;
  1823. gap: 12rpx;
  1824. }
  1825. .gut-indicator-left {
  1826. width: 80rpx;
  1827. flex-shrink: 0;
  1828. }
  1829. .gut-indicator-name {
  1830. font-size: 22rpx;
  1831. color: #666;
  1832. }
  1833. .gut-indicator-bar-track {
  1834. flex: 1;
  1835. height: 16rpx;
  1836. background: #F0F0F0;
  1837. border-radius: 8rpx;
  1838. overflow: hidden;
  1839. }
  1840. .gut-indicator-bar-fill {
  1841. height: 100%;
  1842. border-radius: 8rpx;
  1843. transition: width 0.3s;
  1844. }
  1845. .gut-indicator-value {
  1846. font-size: 22rpx;
  1847. color: #666;
  1848. width: 60rpx;
  1849. text-align: right;
  1850. }
  1851. .gut-indicator-status {
  1852. font-size: 20rpx;
  1853. padding: 2rpx 12rpx;
  1854. border-radius: 10rpx;
  1855. width: 60rpx;
  1856. text-align: center;
  1857. }
  1858. .status-normal {
  1859. background: #D1FAE5;
  1860. color: #059669;
  1861. }
  1862. .status-abnormal {
  1863. background: #FEE2E2;
  1864. color: #DC2626;
  1865. }
  1866. .status-warning {
  1867. background: #FEF3C7;
  1868. color: #D97706;
  1869. }
  1870. /* ===== 关键信息(家庭+个人) ===== */
  1871. .key-info-card {
  1872. background: #fff;
  1873. border-radius: 20rpx;
  1874. padding: 24rpx;
  1875. margin-top: 20rpx;
  1876. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  1877. }
  1878. .key-info-header {
  1879. display: flex;
  1880. align-items: center;
  1881. margin-bottom: 20rpx;
  1882. }
  1883. .key-info-icon {
  1884. font-size: 28rpx;
  1885. margin-right: 8rpx;
  1886. }
  1887. .key-info-title {
  1888. font-size: 28rpx;
  1889. font-weight: 600;
  1890. color: #333;
  1891. }
  1892. .key-info-body {
  1893. display: flex;
  1894. flex-direction: row;
  1895. gap: 20rpx;
  1896. }
  1897. .key-info-col {
  1898. flex: 1;
  1899. background: #F8F9FA;
  1900. border-radius: 14rpx;
  1901. padding: 16rpx;
  1902. min-width: 0;
  1903. }
  1904. .ki-subtitle {
  1905. font-size: 22rpx;
  1906. color: #999;
  1907. margin-bottom: 12rpx;
  1908. font-weight: 500;
  1909. }
  1910. .ki-row {
  1911. display: flex;
  1912. align-items: center;
  1913. margin-bottom: 10rpx;
  1914. flex-wrap: nowrap;
  1915. }
  1916. .ki-row:last-child {
  1917. margin-bottom: 0;
  1918. }
  1919. .ki-label {
  1920. font-size: 22rpx;
  1921. color: #888;
  1922. margin-right: 8rpx;
  1923. white-space: nowrap;
  1924. }
  1925. .ki-dot {
  1926. width: 16rpx;
  1927. height: 16rpx;
  1928. border-radius: 50%;
  1929. margin-right: 6rpx;
  1930. flex-shrink: 0;
  1931. }
  1932. .ki-valuel {
  1933. font-size: 24rpx;
  1934. color: #333;
  1935. font-weight: 500;
  1936. white-space: nowrap;
  1937. }
  1938. .ki-valued {
  1939. font-size: 24rpx;
  1940. color: #333;
  1941. font-weight: 500;
  1942. }
  1943. .ki-swatch {
  1944. width: 28rpx;
  1945. height: 28rpx;
  1946. border-radius: 50%;
  1947. margin-right: 6rpx;
  1948. border: 2rpx solid rgba(0,0,0,0.06);
  1949. flex-shrink: 0;
  1950. }
  1951. .ki-num {
  1952. font-size: 30rpx;
  1953. font-weight: 700;
  1954. color: #FF6B9D;
  1955. }
  1956. .ki-fortune {
  1957. font-size: 24rpx;
  1958. font-weight: 700;
  1959. padding: 2rpx 12rpx;
  1960. border-radius: 10rpx;
  1961. }
  1962. .ki-fortune-0 {
  1963. color: #D32F2F;
  1964. background: #FFEBEE;
  1965. }
  1966. .ki-fortune-1 {
  1967. color: #E65100;
  1968. background: #FFF3E0;
  1969. }
  1970. .ki-fortune-2 {
  1971. color: #F9A825;
  1972. background: #FFFDE7;
  1973. }
  1974. .ki-fortune-3 {
  1975. color: #7B1FA2;
  1976. background: #F3E5F5;
  1977. }
  1978. .ki-fortune-4 {
  1979. color: #B71C1C;
  1980. background: #FFCDD2;
  1981. }
  1982. .ki-insight {
  1983. display: flex;
  1984. align-items: flex-start;
  1985. margin-top: 16rpx;
  1986. padding: 16rpx;
  1987. background: #FFF8F0;
  1988. border-radius: 12rpx;
  1989. }
  1990. .ki-insight-icon {
  1991. font-size: 24rpx;
  1992. margin-right: 8rpx;
  1993. flex-shrink: 0;
  1994. }
  1995. .ki-insight-text {
  1996. font-size: 22rpx;
  1997. color: #8B6914;
  1998. line-height: 1.5;
  1999. }
  2000. .ki-footer {
  2001. margin-top: 16rpx;
  2002. text-align: center;
  2003. padding: 12rpx;
  2004. font-size: 24rpx;
  2005. color: #8B5CF6;
  2006. font-weight: 500;
  2007. background: #F5F3FF;
  2008. border-radius: 12rpx;
  2009. }
  2010. .ki-footer:active {
  2011. opacity: 0.7;
  2012. }
  2013. /* DAN 报告卡片 */
  2014. .dan-card {
  2015. background: #fff;
  2016. border-radius: 16rpx;
  2017. padding: 24rpx;
  2018. margin-bottom: 16rpx;
  2019. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  2020. }
  2021. .dan-card-header {
  2022. display: flex;
  2023. justify-content: space-between;
  2024. align-items: center;
  2025. margin-bottom: 12rpx;
  2026. }
  2027. .dan-report-date {
  2028. font-size: 26rpx;
  2029. color: #666;
  2030. }
  2031. .dan-status {
  2032. font-size: 22rpx;
  2033. padding: 4rpx 16rpx;
  2034. border-radius: 8rpx;
  2035. }
  2036. .dan-status.confirmed {
  2037. background: #D1FAE5;
  2038. color: #065F46;
  2039. }
  2040. .dan-status.pending {
  2041. background: #FEF3C7;
  2042. color: #92400E;
  2043. }
  2044. .dan-report-desc {
  2045. font-size: 28rpx;
  2046. color: #333;
  2047. font-weight: 500;
  2048. margin-bottom: 12rpx;
  2049. display: block;
  2050. }
  2051. .dan-card-footer {
  2052. text-align: right;
  2053. }
  2054. .dan-view-link {
  2055. font-size: 26rpx;
  2056. color: #6366F1;
  2057. }
  2058. .section-header {
  2059. display: flex;
  2060. justify-content: space-between;
  2061. align-items: center;
  2062. margin-bottom: 20rpx;
  2063. }
  2064. .section-title {
  2065. font-size: 32rpx;
  2066. font-weight: 700;
  2067. color: #333;
  2068. }
  2069. .section-more {
  2070. font-size: 26rpx;
  2071. color: #6366F1;
  2072. padding: 8rpx 16rpx;
  2073. }
  2074. </style>