index.vue 58 KB

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