index.vue 55 KB

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