index.vue 56 KB

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