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. <DimensionTasks
  95. v-if="isLoggedIn"
  96. :dimensionCode="currentDimensionCode"
  97. :tasks="dimensionTasks"
  98. @taskClick="onTaskClick"
  99. @moreTasks="goTasks" />
  100. <DimensionActivities
  101. :dimensionCode="currentDimensionCode"
  102. :activities="dimensionActivities"
  103. :isLoggedIn="isLoggedIn"
  104. @activityClick="goActivityDetail"
  105. @moreActivities="goMoreActivities" />
  106. <DimensionProducts
  107. dimensionCode="mind"
  108. :familyId="currentChildId"
  109. :products="dimensionProducts"
  110. title="推荐商品"
  111. @productClick="goProductDetail"
  112. @moreProducts="goMoreProducts" />
  113. <!-- 推荐阅读 -->
  114. <ArticleBookshelf
  115. :articles="emotionArticles"
  116. :isLoggedIn="isLoggedIn"
  117. @articleClick="goArticleDetail"
  118. @moreArticles="goArticles" />
  119. <!-- ===== Phase 1.2: 心理告警横幅 ===== -->
  120. <PsychCrisisBanner v-if="isLoggedIn" :childId="currentChildId" source="screening" />
  121. <!-- ===== 底部:功能入口 Grid(通用,两行) ===== -->
  122. <view class="func-section" v-if="sectionVisible('func_entries')">
  123. <view class="func-grid">
  124. <view class="func-row">
  125. <view class="func-item" v-for="item in funcListRow1" :key="item.label" @click="onFuncClick(item)">
  126. <view class="func-icon-wrap">
  127. <text class="func-icon">{{ item.icon }}</text>
  128. </view>
  129. <text class="func-label">{{ item.label }}</text>
  130. </view>
  131. </view>
  132. <view class="func-row">
  133. <view class="func-item" v-for="item in funcListRow2" :key="item.label" @click="onFuncClick(item)">
  134. <view class="func-icon-wrap">
  135. <text class="func-icon">{{ item.icon }}</text>
  136. </view>
  137. <text class="func-label">{{ item.label }}</text>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. <!-- 底部占位 -->
  143. <view class="bottom-spacer"></view>
  144. <AIFloatingAvatar />
  145. </view>
  146. </template>
  147. <script>
  148. import TabTransition from '../../components/tab-transition.vue'
  149. import PageBanner from '../../components/PageBanner.vue'
  150. import LoginGuideCard from '../../components/LoginGuideCard.vue'
  151. import RadarChart from '../../components/RadarChart.vue'
  152. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  153. import DimensionTasks from '../../components/DimensionTasks.vue'
  154. import DimensionActivities from '../../components/DimensionActivities.vue'
  155. import DimensionProducts from '../../components/DimensionProducts.vue'
  156. import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
  157. import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
  158. import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
  159. import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
  160. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  161. import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
  162. import config from '../../config.js'
  163. export default {
  164. components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, ArticleBookshelf, PsychCrisisBanner, AIFloatingAvatar, FamilyTianpanCard, FamilyMemberStrip },
  165. data() {
  166. return {
  167. isLoggedIn: false,
  168. role: null,
  169. showTabTransition: true,
  170. currentChildId: null,
  171. selectedMemberId: null,
  172. visibleSections: [],
  173. familyMembersVisible: [],
  174. // 心理 Tab 数据
  175. emiData: null,
  176. emiLoading: true,
  177. emiDimensions: [
  178. { key: 'emotionScore', label: '情绪商数', color: '#FF6B35' },
  179. { key: 'resilienceScore', label: '心理韧性', color: '#F97316' },
  180. { key: 'stressCopingScore', label: '压力应对', color: '#FB923C' },
  181. { key: 'selfAwarenessScore', label: '自我认知', color: '#FBBF24' }
  182. ],
  183. // 大五维度(用于雷达图)
  184. personalityDimensions: [
  185. { key: 'opennessScore', label: '开放性' },
  186. { key: 'conscientiousnessScore', label: '尽责性' },
  187. { key: 'extraversionScore', label: '外向性' },
  188. { key: 'agreeablenessScore', label: '宜人性' },
  189. { key: 'neuroticismScore', label: '神经质' }
  190. ],
  191. // 功能入口
  192. funcList: [
  193. { icon: '\u{1F4D6}', label: '阅读', needLogin: false, page: '/pages/mind-extra/articles' },
  194. { icon: '\u{1F4CA}', label: '测评报告', needLogin: true, page: '/pages/mind/emotion-report' },
  195. { icon: '\u{1F4DD}', label: '成长档案', needLogin: true, page: '/pages/growth/index' },
  196. { icon: '\u{2728}', label: '情绪打卡', needLogin: true, page: '/pages/mind-detail/emotion-checkin' },
  197. { icon: '\u{1F4C8}', label: '情绪趋势', needLogin: true, page: '/pages/mind-detail/emotion-trend' },
  198. { icon: '\u{1F9E9}', label: '心理自评', needLogin: true, page: '/pages/mind-detail/screening' },
  199. { icon: '\u{1F3E0}', label: '家庭天盘', needLogin: true, page: '/pages/mind-detail/family-dashboard' },
  200. { icon: '\u{1F9D8}', label: '疏导工具', needLogin: true, page: '/pages/mind-detail/soothe-toolbox' }
  201. ],
  202. articles: [],
  203. // 肠脑轴数据
  204. gutIndicators: null,
  205. gutInsight: '',
  206. // 传统文化数据
  207. traditionalData: null,
  208. traditionalLoading: true,
  209. compatibilityData: null,
  210. wuxingConfig: {
  211. wood: { label: '木', color: '#10B981' },
  212. fire: { label: '火', color: '#FF6B9D' },
  213. earth: { label: '土', color: '#FF8C42' },
  214. metal: { label: '金', color: '#6366F1' },
  215. water: { label: '水', color: '#3B82F6' }
  216. },
  217. pillarLabels: { year: '年柱', month: '月柱', day: '日柱', hour: '时柱' },
  218. familyScore: 0,
  219. // 五维组件数据
  220. userName: '',
  221. children: [],
  222. sandboxData: null,
  223. dimensionTasks: [],
  224. dimensionActivities: [],
  225. dimensionProducts: [],
  226. contactList: [],
  227. healthAlerts: [],
  228. milestones: [],
  229. danReports: [],
  230. // 家庭天盘 - 今日心情(占位数据)
  231. todayMood: {
  232. emoji: '\u{1F60A}',
  233. text: '平静',
  234. score: 65
  235. },
  236. // 家庭天盘 - 每日运势数据
  237. dailyFortuneData: null,
  238. // 心理报告上传
  239. uploadedReports: [],
  240. reportUploadLoading: false
  241. }
  242. },
  243. computed: {
  244. personalityScores: function() {
  245. if (!this.emiData) return []
  246. return [
  247. this.emiData.opennessScore || 0,
  248. this.emiData.conscientiousnessScore || 0,
  249. this.emiData.extraversionScore || 0,
  250. this.emiData.agreeablenessScore || 0,
  251. this.emiData.neuroticismScore || 0
  252. ]
  253. },
  254. emotionArticles: function() {
  255. if (!this.articles || this.articles.length === 0) return []
  256. var result = []
  257. for (var i = 0; i < this.articles.length; i++) {
  258. var a = this.articles[i]
  259. if (a.relatedDimensions && a.relatedDimensions.indexOf('mind') !== -1) {
  260. result.push(a)
  261. }
  262. }
  263. if (result.length === 0) return this.articles.slice(0, 5)
  264. return result.slice(0, 5)
  265. },
  266. wuxingData: function() {
  267. if (!this.traditionalData || !this.traditionalData.wuxingElements) return []
  268. var elements = this.traditionalData.wuxingElements
  269. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  270. var result = []
  271. for (var i = 0; i < keys.length; i++) {
  272. var k = keys[i]
  273. if (elements[k] !== undefined) {
  274. result.push({
  275. key: k,
  276. label: this.wuxingConfig[k].label,
  277. color: this.wuxingConfig[k].color,
  278. value: elements[k]
  279. })
  280. }
  281. }
  282. return result.sort(function(a, b) { return b.value - a.value })
  283. },
  284. currentDimensionCode: function() {
  285. return 'mind'
  286. },
  287. funcListRow1: function() {
  288. return this.funcList.slice(0, 4)
  289. },
  290. funcListRow2: function() {
  291. return this.funcList.slice(4)
  292. },
  293. // ===== 关键信息 - 家庭 =====
  294. familyWuxingLabel: function() {
  295. if (!this.compatibilityData || !this.compatibilityData.familyWuxing || !this.compatibilityData.familyWuxing.aggregatePercentages) return null
  296. var pcts = this.compatibilityData.familyWuxing.aggregatePercentages
  297. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  298. var maxKey = null
  299. var maxVal = -1
  300. for (var i = 0; i < keys.length; i++) {
  301. if (pcts[keys[i]] !== undefined && pcts[keys[i]] > maxVal) {
  302. maxVal = pcts[keys[i]]
  303. maxKey = keys[i]
  304. }
  305. }
  306. if (!maxKey) return null
  307. return { key: maxKey, label: this.wuxingConfig[maxKey].label, color: this.wuxingConfig[maxKey].color, value: maxVal }
  308. },
  309. familyMemberCount: function() {
  310. if (!this.compatibilityData || !this.compatibilityData.members) return 0
  311. return this.compatibilityData.members.length
  312. },
  313. familyWeeklyInsight: function() {
  314. if (!this.compatibilityData || !this.compatibilityData.weeklyInsight) return ''
  315. return this.compatibilityData.weeklyInsight
  316. },
  317. // ===== 关键信息 - 个人 =====
  318. dominantElement: function() {
  319. if (!this.traditionalData || !this.traditionalData.wuxingElements) return null
  320. var elements = this.traditionalData.wuxingElements
  321. var keys = ['wood', 'fire', 'earth', 'metal', 'water']
  322. var maxKey = null
  323. var maxVal = -1
  324. for (var i = 0; i < keys.length; i++) {
  325. if (elements[keys[i]] !== undefined && elements[keys[i]] > maxVal) {
  326. maxVal = elements[keys[i]]
  327. maxKey = keys[i]
  328. }
  329. }
  330. return maxKey
  331. },
  332. luckyColorInfo: function() {
  333. var colorMap = {
  334. wood: { name: '绿', hex: '#10B981' },
  335. fire: { name: '红', hex: '#FF6B9D' },
  336. earth: { name: '黄', hex: '#FF8C42' },
  337. metal: { name: '白', hex: '#6366F1' },
  338. water: { name: '蓝', hex: '#3B82F6' }
  339. }
  340. var elem = this.dominantElement
  341. if (!elem) return null
  342. return colorMap[elem] || null
  343. },
  344. luckyNumber: function() {
  345. if (this.traditionalData && this.traditionalData.lifeNumber) {
  346. return this.traditionalData.lifeNumber
  347. }
  348. var numMap = { wood: 3, fire: 9, earth: 5, metal: 7, water: 1 }
  349. var elem = this.dominantElement
  350. return elem ? numMap[elem] : null
  351. },
  352. fortuneSeed: function() {
  353. if (this.traditionalData && this.traditionalData.lifeNumber) {
  354. return String(this.traditionalData.lifeNumber)
  355. }
  356. return '0'
  357. },
  358. // WXML 不支持模板内 || {} 字面量,需在 computed 中预先做 fallback
  359. dailyFortuneSafe: function() {
  360. return this.dailyFortune || {}
  361. },
  362. // WXML 不支持模板内 || '' 字面量,需在 computed 中预先做 fallback
  363. dominantElementSafe: function() {
  364. return this.dominantElement || ''
  365. },
  366. dailyFortune: function() {
  367. // 优先使用后端接口数据
  368. if (this.dailyFortuneData) {
  369. var levels = ['大吉', '吉', '平', '凶', '大凶']
  370. return {
  371. level: this.dailyFortuneData.level,
  372. text: levels[this.dailyFortuneData.level],
  373. description: this.dailyFortuneData.description
  374. }
  375. }
  376. // 兼容模式:没有接口数据时使用原算法
  377. if (!this.dominantElement) return null
  378. var today = new Date()
  379. var dateStr = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate()
  380. var seedStr = dateStr + (this.fortuneSeed || '')
  381. var hash = 0
  382. for (var i = 0; i < seedStr.length; i++) {
  383. hash = ((hash << 5) - hash) + seedStr.charCodeAt(i)
  384. hash = hash & hash
  385. }
  386. var level = Math.abs(hash) % 5
  387. var levels = ['大吉', '吉', '平', '凶', '大凶']
  388. var descMap = {
  389. wood: ['大吉:木气旺盛,宜规划', '吉:行动力强', '平:静心养性', '凶:谨言慎行', '大凶:忌冲动'],
  390. fire: ['大吉:热情高涨', '吉:精力充沛', '平:适当休息', '凶:注意情绪', '大凶:静心冥想'],
  391. earth: ['大吉:稳重踏实', '吉:贵人运佳', '平:按部就班', '凶:注意肠胃', '大凶:不宜投资'],
  392. metal: ['大吉:决策力强', '吉:思维清晰', '平:保持专注', '凶:注意言辞', '大凶:不宜强求'],
  393. water: ['大吉:灵感丰富', '吉:人际和谐', '平:安静内省', '凶:情绪波动', '大凶:宜藏不宜放']
  394. }
  395. var descList = descMap[this.dominantElement] || descMap.wood
  396. return { level: level, text: levels[level], description: descList[level] }
  397. }
  398. },
  399. onShow() {
  400. this.showTabTransition = true
  401. var token = uni.getStorageSync('token')
  402. this.isLoggedIn = !!token
  403. if (this.isLoggedIn) {
  404. this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  405. // FIX: 从 Vuex store 读取 currentChildId,而非仅从 localStorage
  406. this.currentChildId = (this.$store.state && this.$store.state.currentChildId) || uni.getStorageSync('currentChildId') || null
  407. this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
  408. }
  409. this.loadSectionConfig()
  410. this.loadFeaturedArticles()
  411. if (this.isLoggedIn) {
  412. this.loadChildren()
  413. this.loadFamilyMembersVisible()
  414. this.loadSandboxData()
  415. this.loadEmiData()
  416. this.loadGutData()
  417. this.loadEnergyData()
  418. this.loadTraditionalCultureData()
  419. this.loadContacts()
  420. this.loadHealthAlerts()
  421. this.loadMilestones()
  422. this.loadDanReports()
  423. }
  424. // 游客也能浏览活动和商品
  425. this.loadDimensionActivities()
  426. this.loadDimensionProducts()
  427. this.loadFamilyFortune()
  428. this._watchPageReady()
  429. },
  430. methods: {
  431. // ===== 区块可见性 =====
  432. loadSectionConfig: function() {
  433. var self = this
  434. var baseSections = ['func_entries', 'daily_tip', 'recommended_reading']
  435. if (!uni.getStorageSync('token')) {
  436. self.visibleSections = baseSections
  437. return
  438. }
  439. var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  440. getVisibleSections({ pageKey: 'mind', role: role }).then(function(res) {
  441. if (res.code === 200 && res.data) {
  442. var keys = res.data.map(function(s) { return s.sectionKey })
  443. var merged = baseSections.slice()
  444. keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
  445. self.visibleSections = merged
  446. }
  447. }).catch(function() {
  448. self.visibleSections = ['func_entries', 'daily_tip', 'recommended_reading', 'mind_tasks', 'related_activities', 'purchased_courses']
  449. })
  450. },
  451. // 加载家庭天盘数据
  452. loadFamilyFortune: function() {
  453. var self = this
  454. if (!self.isLoggedIn) return
  455. getFamilyFortune().then(function(res) {
  456. if (res.code === 200 && res.data) {
  457. // 更新 todayMood 占位数据为真实接口数据
  458. self.todayMood = {
  459. emoji: res.data.moodEmoji || '\u{1F60A}',
  460. text: res.data.moodText || '平静',
  461. score: res.data.moodScore || 65
  462. }
  463. // 更新 dailyFortune computed 函数依赖的数据
  464. self.dailyFortuneData = {
  465. level: res.data.fortuneLevel,
  466. text: res.data.fortuneLevelText,
  467. description: res.data.fortuneDescription
  468. }
  469. // 更新主导五行
  470. self.traditionalData = self.traditionalData || {}
  471. self.traditionalData.wuxingElements = {}
  472. if (res.data.dominantElement) {
  473. self.traditionalData.wuxingElements[res.data.dominantElement] = 100
  474. }
  475. // 更新周报提示
  476. self.compatibilityData = self.compatibilityData || {}
  477. self.compatibilityData.weeklyInsight = res.data.weeklyTip || self.compatibilityData.weeklyInsight
  478. }
  479. }).catch(function(err) {
  480. console.error('Failed to load family fortune:', err)
  481. })
  482. },
  483. // ===== 心理报告上传 =====
  484. chooseAndUploadReport: function() {
  485. var self = this
  486. uni.chooseImage({
  487. count: 1,
  488. sizeType: ['original', 'compressed'],
  489. sourceType: ['album', 'camera'],
  490. success: function(chooseRes) {
  491. self.reportUploadLoading = true
  492. var tempFilePath = chooseRes.tempFilePaths[0]
  493. var fileName = '心理报告_' + Date.now() + '.jpg'
  494. uni.uploadFile({
  495. url: config.baseUrl + '/api/mind/report/upload',
  496. filePath: tempFilePath,
  497. name: 'report',
  498. formData: {
  499. familyId: self.currentChildId || ''
  500. },
  501. header: {
  502. 'Authorization': 'Bearer ' + uni.getStorageSync('token')
  503. },
  504. success: function(uploadRes) {
  505. self.reportUploadLoading = false
  506. if (uploadRes.statusCode === 200) {
  507. var result = JSON.parse(uploadRes.data)
  508. if (result.code === 200) {
  509. self.uploadedReports.unshift(result.data)
  510. uni.showToast({ title: '上传成功', icon: 'success' })
  511. } else {
  512. uni.showToast({ title: result.message || '上传失败', icon: 'none' })
  513. }
  514. } else {
  515. uni.showToast({ title: '上传失败: ' + uploadRes.statusCode, icon: 'none' })
  516. }
  517. },
  518. fail: function(err) {
  519. self.reportUploadLoading = false
  520. uni.showToast({ title: '上传失败: ' + (err.errMsg || ''), icon: 'none' })
  521. }
  522. })
  523. },
  524. fail: function() {
  525. // 用户取消选择
  526. }
  527. })
  528. },
  529. viewReport: function(report) {
  530. if (report && report.fileUrl) {
  531. uni.downloadFile({
  532. url: report.fileUrl,
  533. success: function(res) {
  534. if (res.statusCode === 200) {
  535. uni.openDocument({
  536. filePath: res.tempFilePath,
  537. success: function() {
  538. console.log('打开报告成功')
  539. }
  540. })
  541. }
  542. }
  543. })
  544. }
  545. },
  546. loadUploadedReports: function() {
  547. var self = this
  548. uni.request({
  549. url: config.baseUrl + '/api/mind/report/list',
  550. method: 'POST',
  551. data: { familyId: self.currentChildId || '' },
  552. header: {
  553. 'Authorization': 'Bearer ' + uni.getStorageSync('token')
  554. },
  555. success: function(res) {
  556. if (res.data && res.data.code === 200 && res.data.data) {
  557. self.uploadedReports = res.data.data
  558. }
  559. }
  560. })
  561. },
  562. formatDate: function(dateStr) {
  563. if (!dateStr) return ''
  564. var d = new Date(dateStr)
  565. var month = d.getMonth() + 1
  566. var day = d.getDate()
  567. return month + '月' + day + '日'
  568. },
  569. sectionVisible: function(key) {
  570. return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
  571. },
  572. // ===== 心理 Tab:EMI 数据 =====
  573. loadEmiData: function() {
  574. var self = this
  575. var childId = self.currentChildId
  576. if (!childId) {
  577. self.emiLoading = false
  578. return
  579. }
  580. self.emiLoading = true
  581. getEmiReport(childId).then(function(res) {
  582. if (res.code === 200 && res.data) {
  583. self.emiData = res.data
  584. }
  585. self.emiLoading = false
  586. }).catch(function() {
  587. self.emiLoading = false
  588. })
  589. },
  590. // ===== 肠脑轴情绪指标 =====
  591. loadGutData: function() {
  592. var self = this
  593. var childId = self.currentChildId
  594. if (!childId) return
  595. var token = uni.getStorageSync('token')
  596. // 获取神经递质指标
  597. uni.request({
  598. url: config.API_BASE_URL + '/api/mind/neurotransmitters',
  599. method: 'POST',
  600. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  601. data: { childId: childId },
  602. success: function(r) {
  603. if (r.statusCode === 200 && r.data && r.data.code === 200) {
  604. var list = r.data.data
  605. if (Array.isArray(list) && list.length > 0) {
  606. self.gutIndicators = list.slice(0, 4)
  607. }
  608. }
  609. }
  610. })
  611. // 获取情绪洞察摘要
  612. uni.request({
  613. url: config.API_BASE_URL + '/api/mind/gut-emotion-insight',
  614. method: 'POST',
  615. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  616. data: { childId: childId },
  617. success: function(r) {
  618. if (r.statusCode === 200 && r.data && r.data.code === 200 && r.data.data) {
  619. self.gutInsight = r.data.data.summary || ''
  620. }
  621. }
  622. })
  623. },
  624. indicatorColor: function(status) {
  625. if (status === 'abnormal' || status === '偏高' || status === '偏低') return '#EF4444'
  626. if (status === 'warning' || status === '偏高' || status === '偏低') return '#F59E0B'
  627. return '#10B981'
  628. },
  629. statusLabel: function(status) {
  630. if (status === 'normal') return '正常'
  631. if (status === 'abnormal') return '异常'
  632. if (status === 'warning') return '警讯'
  633. return status || '正常'
  634. },
  635. // ===== 文章 =====
  636. parseRelatedDimensions: function(val) {
  637. if (!val) return []
  638. if (Array.isArray(val)) return val
  639. if (typeof val === 'string') {
  640. try {
  641. var parsed = JSON.parse(val)
  642. return Array.isArray(parsed) ? parsed : []
  643. } catch (e) {
  644. return val.split(',').map(function(s) { return s.trim() }).filter(function(s) { return s })
  645. }
  646. }
  647. return []
  648. },
  649. loadFeaturedArticles: function() {
  650. var self = this
  651. getFeaturedArticles({ size: 5, dimensionCode: 'mind' }).then(function(res) {
  652. if (res.code === 200 && res.data) {
  653. var gradientColors = [
  654. 'linear-gradient(135deg, #8B5CF6, #A78BFA)',
  655. 'linear-gradient(135deg, #5B9BD5, #8FC5E8)',
  656. 'linear-gradient(135deg, #10B981, #34D399)',
  657. 'linear-gradient(135deg, #8B5CF6, #C084FC)',
  658. 'linear-gradient(135deg, #F97316, #FB923C)'
  659. ]
  660. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  661. self.articles = list.map(function(item, index) {
  662. return {
  663. id: item.id,
  664. category: item.categoryName || '成长心理',
  665. categoryColor: gradientColors[index % gradientColors.length],
  666. title: item.title || '',
  667. summary: item.summary || '',
  668. dimensionWeights: item.dimensionWeights || null,
  669. views: item.viewCount ? String(item.viewCount) : '0',
  670. likes: '0',
  671. date: item.publishedAt ? item.publishedAt.slice(0, 10) : '',
  672. relatedDimensions: self.parseRelatedDimensions(item.relatedDimensions)
  673. }
  674. })
  675. }
  676. }).catch(function() {})
  677. },
  678. // ===== EMI 分数评级 =====
  679. getScoreLevel: function(score) {
  680. if (score >= 85) return 'excellent'
  681. if (score >= 70) return 'good'
  682. if (score >= 55) return 'average'
  683. return 'low'
  684. },
  685. getScoreLevelText: function(score) {
  686. if (score >= 85) return '优秀'
  687. if (score >= 70) return '良好'
  688. if (score >= 55) return '一般'
  689. return '需提升'
  690. },
  691. // ===== 导航 =====
  692. goEmotionReport: function() {
  693. var childId = this.currentChildId || ''
  694. uni.navigateTo({ url: '/pages/mind-detail/emotion-report?childId=' + childId })
  695. },
  696. goArticles: function() {
  697. uni.navigateTo({ url: '/pages/article-center/index?dimension=mind' })
  698. },
  699. onFuncClick: function(item) {
  700. if (item.needLogin && !this.isLoggedIn) {
  701. uni.showModal({
  702. title: '提示',
  703. content: '请先登录后使用此功能',
  704. success: function(res) { if (res.confirm) uni.navigateTo({ url: '/pages/login/login' }) }
  705. })
  706. return
  707. }
  708. if (item.page) uni.navigateTo({ url: item.page })
  709. },
  710. goArticleDetail: function(article) {
  711. var id = article.id || article
  712. uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id })
  713. },
  714. goProductDetail: function(prod) {
  715. if (!prod || !prod.id) return
  716. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  717. },
  718. goMoreProducts: function() {
  719. uni.navigateTo({ url: '/pages/shop/index/index' })
  720. },
  721. // ===== 孩子列表与维度数据 =====
  722. loadChildren: function() {
  723. var self = this
  724. getChildren().then(function(res) {
  725. if (res.code === 200 && res.data) {
  726. self.children = res.data
  727. var savedChildId = uni.getStorageSync('currentChildId')
  728. var found = false
  729. for (var i = 0; i < self.children.length; i++) {
  730. if (self.children[i].childId === savedChildId) {
  731. self.currentChildId = savedChildId
  732. found = true
  733. break
  734. }
  735. }
  736. // FIX: 不再自动选择第一个孩子。仅在用户通过 UserQuickEntry 切换时设置 currentChildId
  737. if (found) {
  738. self.loadDimensionData()
  739. self.loadEmiData()
  740. }
  741. }
  742. }).catch(function(e) {
  743. console.log('获取孩子列表失败', e)
  744. })
  745. },
  746. loadDimensionData: function() {
  747. this.loadDimensionTasks()
  748. this.loadDimensionActivities()
  749. if (this.familyMembersVisible.length > 0) {
  750. this.loadCompatibilityData()
  751. }
  752. },
  753. loadSandboxData: function() {
  754. var self = this
  755. getFamilyEnergySandbox().then(function(res) {
  756. if (res && res.data) {
  757. self.sandboxData = res.data
  758. }
  759. }).catch(function() {})
  760. },
  761. loadEnergyData: function() {
  762. var self = this
  763. if (!this.currentChildId) return
  764. getEnergyOverview(this.currentChildId).then(function(res) {
  765. if (res && res.data) {
  766. var dims = res.data.dimensions
  767. if (dims && dims.length > 0) {
  768. for (var i = 0; i < dims.length; i++) {
  769. if (dims[i] && dims[i].code === 'mind' && res.data.energyScores) {
  770. self.familyScore = res.data.energyScores.mindScore || 0
  771. }
  772. }
  773. }
  774. }
  775. }).catch(function(e) {
  776. console.log('获取能量概览失败', e)
  777. })
  778. },
  779. loadDimensionTasks: function() {
  780. var self = this
  781. if (!this.currentChildId) return
  782. getTodayTasksByCategory(this.currentChildId, 'mind').then(function(res) {
  783. if (res && res.data) {
  784. self.dimensionTasks = Array.isArray(res.data) ? res.data.slice(0, 5) : []
  785. }
  786. }).catch(function() { self.dimensionTasks = [] })
  787. },
  788. loadDimensionActivities: function() {
  789. var self = this
  790. var dimCode = self.currentDimensionCode
  791. getActivityList({ dimensionCode: dimCode, page: 1, size: 3 }).then(function(res) {
  792. if (res && res.data) {
  793. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  794. self.dimensionActivities = list.slice(0, 3)
  795. }
  796. }).catch(function() { self.dimensionActivities = [] })
  797. },
  798. loadDimensionProducts: function() {
  799. var self = this
  800. getProductsByDomain('mind', 1, 4).then(function(res) {
  801. if (res && res.data) {
  802. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  803. self.dimensionProducts = list.slice(0, 4)
  804. }
  805. }).catch(function() { self.dimensionProducts = [] })
  806. },
  807. onFamilyMemberSelect: function(member) {
  808. this.selectedMemberId = member.id
  809. },
  810. onChildChanged: function(child) {
  811. this.currentChildId = child.childId
  812. // FIX: 同步提交到 Vuex store
  813. this.$store.commit('switchToChild', child.childId)
  814. this.loadDimensionData()
  815. this.loadEmiData()
  816. this.loadTraditionalCultureData()
  817. },
  818. loadFamilyMembersVisible: function() {
  819. var self = this
  820. getVisibleFamilyMembers().then(function(res) {
  821. self.familyMembersVisible = res.data || []
  822. }).catch(function(e) {
  823. console.log('获取可见家庭成员失败', e)
  824. self.familyMembersVisible = []
  825. })
  826. },
  827. loadCompatibilityData: function() {
  828. var self = this
  829. var familyId = uni.getStorageSync('currentFamilyId')
  830. if (!familyId) {
  831. var userInfo = uni.getStorageSync('userInfo')
  832. if (userInfo && userInfo.familyId) familyId = userInfo.familyId
  833. }
  834. if (!familyId) return
  835. var token = uni.getStorageSync('token')
  836. uni.request({
  837. url: config.API_BASE_URL + '/api/mind/traditional/family-dashboard',
  838. method: 'POST',
  839. header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
  840. data: { familyId: familyId },
  841. success: function(res) {
  842. if (res.data && res.data.code === 200 && res.data.data) {
  843. self.compatibilityData = res.data.data
  844. }
  845. },
  846. fail: function() {}
  847. })
  848. },
  849. scrollToSection: function(section) {
  850. uni.pageScrollTo({ selector: '#' + section, duration: 300 })
  851. },
  852. onTaskClick: function(task) {
  853. uni.navigateTo({ url: '/pages/tasks/tasks' })
  854. },
  855. goActivityDetail: function(act) {
  856. if (act && act.id) uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id })
  857. },
  858. goMoreActivities: function() {
  859. uni.navigateTo({ url: '/pages/activity/index' })
  860. },
  861. goTasks: function() { uni.navigateTo({ 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>