index.vue 57 KB

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