index.vue 54 KB

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