index.vue 57 KB

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