self-check-result.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  1. <template>
  2. <view class="scr-page">
  3. <!-- Loading -->
  4. <view class="scr-loading" v-if="loading">
  5. <text class="scr-loading-text">加载中...</text>
  6. </view>
  7. <template v-else>
  8. <!-- 总分横幅 -->
  9. <view class="scr-hero">
  10. <view class="scr-hero-badge">
  11. <text class="scr-hero-title">五维幸福总分</text>
  12. <view class="scr-hero-score-row">
  13. <text class="scr-hero-score">{{ result.totalScore }}</text>
  14. <text class="scr-hero-total">/45</text>
  15. </view>
  16. <view class="scr-hero-level" :class="'level-' + overallLevel">
  17. <text>{{ overallLevelName }}</text>
  18. </view>
  19. </view>
  20. <text class="scr-hero-date" v-if="result.createdAt">自检时间:{{ formatDate(result.createdAt) }}</text>
  21. </view>
  22. <!-- 结果解读引导卡(告诉用户结果代表什么、接下来怎么做) -->
  23. <view class="scr-guide">
  24. <view class="scr-guide-head">
  25. <text class="scr-guide-title">📖 怎么看这个结果</text>
  26. </view>
  27. <text class="scr-guide-desc">这份自检测的是「身·智·富·行·心」五个维度的家庭幸福状态,每个维度 9 分,反映你近期在该方面的实际情况。</text>
  28. <!-- 总分解读 -->
  29. <view class="scr-guide-total">
  30. <text class="scr-guide-total-label">你的总分 {{ result.totalScore }}/45:</text>
  31. <text class="scr-guide-total-text">{{ overallExplain }}</text>
  32. </view>
  33. <!-- 维度等级图例 -->
  34. <view class="scr-guide-legend">
  35. <view class="scr-guide-legend-item">
  36. <view class="scr-guide-legend-dot lg-healthy"></view>
  37. <text class="scr-guide-legend-text">健康(7-9 分):保持就好,不用刻意加码</text>
  38. </view>
  39. <view class="scr-guide-legend-item">
  40. <view class="scr-guide-legend-dot lg-attention"></view>
  41. <text class="scr-guide-legend-text">留意(4-6 分):看看下方解读,找到能下手的一步</text>
  42. </view>
  43. <view class="scr-guide-legend-item">
  44. <view class="scr-guide-legend-dot lg-tense"></view>
  45. <text class="scr-guide-legend-text">紧绷(0-3 分):先别想着补短板,从最小行动开始</text>
  46. </view>
  47. </view>
  48. <!-- 行动指引 -->
  49. <view class="scr-guide-steps">
  50. <text class="scr-guide-steps-title">接下来怎么做:</text>
  51. <view class="scr-guide-step">
  52. <text class="scr-guide-step-num">①</text>
  53. <text class="scr-guide-step-text">往下看「AI 解读」,了解每个低分维度代表什么</text>
  54. </view>
  55. <view class="scr-guide-step">
  56. <text class="scr-guide-step-num">②</text>
  57. <text class="scr-guide-step-text">点底部「生成健康计划」,把建议变成可执行的任务</text>
  58. </view>
  59. <view class="scr-guide-step">
  60. <text class="scr-guide-step-num">③</text>
  61. <text class="scr-guide-step-text">15 天后再测一次,看看哪里进步了</text>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 维度得分 -->
  66. <view class="scr-card">
  67. <view class="scr-card-title">
  68. <text class="scr-card-title-text">维度得分</text>
  69. <text class="scr-card-sub">满分9分/维</text>
  70. </view>
  71. <view class="scr-dim-list">
  72. <view class="scr-dim-item" v-for="dim in result.dimensions" :key="dim.dimension">
  73. <view class="scr-dim-head">
  74. <view class="scr-dim-label">
  75. <view class="scr-dim-dot" :style="{ background: dim.color }"></view>
  76. <text class="scr-dim-name">{{ dim.name }}</text>
  77. <text class="scr-dim-element">{{ dim.element }}</text>
  78. </view>
  79. <view class="scr-dim-score-wrap">
  80. <text class="scr-dim-score" :style="{ color: dim.color }">{{ dim.score }}</text>
  81. <text class="scr-dim-score-max">/9</text>
  82. </view>
  83. </view>
  84. <view class="scr-dim-bar">
  85. <view class="scr-dim-bar-fill" :style="{ width: (dim.score / 9 * 100) + '%', background: dim.color }"></view>
  86. </view>
  87. <view class="scr-dim-foot">
  88. <text class="scr-dim-level" :class="'lvl-' + dim.level">{{ dim.levelName }}</text>
  89. <text class="scr-dim-summary">{{ dim.summary }}</text>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <!-- AI 健康解读(P0-1) -->
  95. <view class="scr-card" v-if="result.advices && result.advices.length > 0">
  96. <view class="scr-card-title">
  97. <text class="scr-card-title-text">AI 健康解读</text>
  98. <text class="scr-card-sub">基于你的五维自检结果</text>
  99. </view>
  100. <view v-for="adv in result.advices" :key="adv.dimension" class="scr-advice-item">
  101. <view class="scr-advice-dim-row">
  102. <view class="scr-advice-dim-badge" :style="{ background: adv.color }">
  103. <text class="scr-advice-dim-name">{{ adv.dimensionName }}</text>
  104. <text class="scr-advice-dim-elem">{{ adv.score }}分</text>
  105. </view>
  106. </view>
  107. <text class="scr-advice-interpretation" v-if="adv.interpretation">{{ adv.interpretation }}</text>
  108. <view class="scr-advice-actions" v-if="adv.microActions && adv.microActions.length > 0">
  109. <text class="scr-advice-action-label">本周行动:</text>
  110. <text v-for="(action, i) in adv.microActions" :key="i" class="scr-advice-action">{{ i+1 }}. {{ action }}</text>
  111. </view>
  112. </view>
  113. <view class="scr-family-insight" v-if="result.advices[0] && result.advices[0].familyInsight">
  114. <text class="scr-family-insight-label">【家庭整体洞察】</text>
  115. <text class="scr-family-insight-text">{{ result.advices[0].familyInsight }}</text>
  116. </view>
  117. </view>
  118. <!-- 全部健康提示 -->
  119. <view class="scr-card" v-else-if="result.totalScore >= 35">
  120. <view class="scr-all-healthy">
  121. <text class="scr-all-healthy-icon">🌿</text>
  122. <text class="scr-all-healthy-text">五维状态均健康,请继续保持这份平衡!</text>
  123. </view>
  124. </view>
  125. <!-- AI 分析暂不可用提示 -->
  126. <view class="scr-card" v-else>
  127. <view class="scr-all-healthy">
  128. <text class="scr-all-healthy-icon">⏳</text>
  129. <text class="scr-all-healthy-text">AI 分析暂时不可用,请稍后再试</text>
  130. </view>
  131. </view>
  132. <!-- 历史与操作 -->
  133. <view class="scr-footer">
  134. <button class="scr-btn scr-btn-primary" @click="goHistory">历史记录</button>
  135. <button class="scr-btn scr-btn-outline" @click="retake">重新自检</button>
  136. <button class="scr-btn scr-btn-secondary" v-if="hasLowScore" :loading="planGenerating" @click="generatePlan">
  137. 生成健康计划
  138. </button>
  139. <!-- 聊天功能已隐藏(临时): <button class="scr-btn scr-btn-ghost" @click="askAI">问问 AI</button> -->
  140. </view>
  141. </template>
  142. </view>
  143. </template>
  144. <script>
  145. import { getSelfCheckLatest, getSelfCheckHistory, generateSelfCheckPlan } from '@/utils/api'
  146. import { microActionToday, microActionComplete } from '@/utils/api'
  147. import { parseDate } from '@/utils/format.js'
  148. export default {
  149. data() {
  150. return {
  151. loading: true,
  152. result: null,
  153. selfCheckId: '',
  154. levelMap: {
  155. healthy: '健康',
  156. attention: '留意',
  157. tense: '紧绷'
  158. },
  159. // 今日微行动联动状态
  160. joiningDim: '',
  161. joinedDims: {},
  162. planGenerating: false
  163. }
  164. },
  165. computed: {
  166. overallLevel: function() {
  167. var total = this.result ? (this.result.totalScore || 0) : 0
  168. if (total >= 35) return 'healthy'
  169. if (total >= 20) return 'attention'
  170. return 'tense'
  171. },
  172. overallLevelName: function() {
  173. return this.levelMap[this.overallLevel] || '留意'
  174. },
  175. hasLowScore: function() {
  176. return this.result && this.result.advices && this.result.advices.some(function(a) {
  177. return a.score != null && a.score <= 6
  178. })
  179. },
  180. overallExplain: function() {
  181. var total = this.result ? (this.result.totalScore || 0) : 0
  182. if (total >= 35) {
  183. return '五维整体状态健康,继续保持平衡就好'
  184. }
  185. if (total >= 20) {
  186. return '部分维度需要留意,看看下方 AI 解读找到第一步'
  187. }
  188. return '有几个维度比较紧绷,建议从下周微行动开始调整'
  189. }
  190. },
  191. onLoad: function(options) {
  192. this.selfCheckId = options && options.id ? options.id : ''
  193. this.loadResult()
  194. },
  195. methods: {
  196. loadResult: function() {
  197. var self = this
  198. // 优先使用刚提交时缓存的结果,避免多一次请求
  199. var cached = uni.getStorageSync('lastSelfCheckResult')
  200. if (cached && cached.id) {
  201. this.result = cached
  202. this.loading = false
  203. return
  204. }
  205. getSelfCheckLatest().then(function(res) {
  206. self.loading = false
  207. if (res.code === 200 && res.data) {
  208. self.result = res.data
  209. } else {
  210. uni.showToast({ title: (res && res.message) || '暂无自检记录', icon: 'none' })
  211. }
  212. }).catch(function() {
  213. self.loading = false
  214. uni.showToast({ title: '加载失败', icon: 'none' })
  215. })
  216. },
  217. formatDate: function(dateStr) {
  218. if (!dateStr) {
  219. return ''
  220. }
  221. var d = parseDate(dateStr)
  222. if (!d) return ''
  223. var pad = function(n) { return n < 10 ? '0' + n : '' + n }
  224. return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) + ' ' + pad(d.getHours()) + ':' + pad(d.getMinutes())
  225. },
  226. goHistory: function() {
  227. getSelfCheckHistory().then(function(res) {
  228. if (res.code === 200 && res.data && res.data.length > 0) {
  229. uni.showToast({ title: '已生成 ' + res.data.length + ' 条记录', icon: 'none' })
  230. } else {
  231. uni.showToast({ title: '暂无历史记录', icon: 'none' })
  232. }
  233. }).catch(function() {
  234. uni.showToast({ title: '暂无历史记录', icon: 'none' })
  235. })
  236. },
  237. joinMicroAction: function(adv) {
  238. var self = this
  239. if (!adv || !adv.dimension || this.joiningDim) return
  240. var memberId = this.result && this.result.familyMemberId
  241. if (!memberId) {
  242. uni.showToast({ title: '未找到家庭成员信息', icon: 'none' })
  243. return
  244. }
  245. this.joiningDim = adv.dimension
  246. microActionToday({ memberId: memberId, dimensionCode: adv.dimension }).then(function(res) {
  247. if (res.code !== 200) {
  248. self.joiningDim = ''
  249. uni.showToast({ title: (res && res.message) || '获取微行动失败', icon: 'none' })
  250. return
  251. }
  252. var data = res.data || {}
  253. if (data.completed) {
  254. self.joiningDim = ''
  255. self.$set(self.joinedDims, adv.dimension, true)
  256. uni.showToast({ title: '今日微行动已完成', icon: 'none' })
  257. return
  258. }
  259. var action = data.action
  260. if (!action || !action.id) {
  261. self.joiningDim = ''
  262. uni.showToast({ title: '今日暂无该维度微行动', icon: 'none' })
  263. return
  264. }
  265. microActionComplete({ memberId: memberId, actionId: action.id }).then(function(res2) {
  266. self.joiningDim = ''
  267. if (res2.code === 200) {
  268. self.$set(self.joinedDims, adv.dimension, true)
  269. uni.showToast({ title: '已加入今日微行动,能量+1', icon: 'success' })
  270. } else {
  271. uni.showToast({ title: (res2 && res2.message) || '加入失败', icon: 'none' })
  272. }
  273. }).catch(function() {
  274. self.joiningDim = ''
  275. uni.showToast({ title: '加入失败', icon: 'none' })
  276. })
  277. }).catch(function() {
  278. self.joiningDim = ''
  279. uni.showToast({ title: '获取微行动失败', icon: 'none' })
  280. })
  281. },
  282. retake: function() {
  283. uni.navigateTo({ url: '/pages/family/self-check-entry' })
  284. },
  285. generatePlan: function() {
  286. var self = this
  287. if (this.planGenerating) return
  288. this.planGenerating = true
  289. generateSelfCheckPlan({ checkId: this.result && this.result.id }).then(function(res) {
  290. self.planGenerating = false
  291. if (res.code === 200 && res.data && res.data.planId) {
  292. uni.showToast({ title: '计划已生成,可在健康计划页查看', icon: 'success' })
  293. setTimeout(function() {
  294. uni.navigateTo({ url: '/pages/health-main/index?planId=' + res.data.planId })
  295. }, 1000)
  296. } else {
  297. uni.showToast({ title: (res && res.message) || '计划生成失败', icon: 'none' })
  298. }
  299. }).catch(function() {
  300. self.planGenerating = false
  301. uni.showToast({ title: '计划生成失败', icon: 'none' })
  302. })
  303. },
  304. askAI: function() {
  305. var selfCheckId = this.result && this.result.id
  306. if (!selfCheckId) {
  307. uni.showToast({ title: '暂无自检记录', icon: 'none' })
  308. return
  309. }
  310. uni.navigateTo({ url: '/pages/ai/chat?selfCheckId=' + selfCheckId })
  311. }
  312. }
  313. }
  314. </script>
  315. <style scoped>
  316. .scr-page {
  317. min-height: 100vh;
  318. background: #F5FAFE;
  319. padding: 24rpx 30rpx 120rpx;
  320. box-sizing: border-box;
  321. }
  322. .scr-loading {
  323. display: flex;
  324. justify-content: center;
  325. align-items: center;
  326. height: 60vh;
  327. }
  328. .scr-loading-text {
  329. font-size: 28rpx;
  330. color: #999;
  331. }
  332. /* 总分横幅 */
  333. .scr-hero {
  334. background: linear-gradient(135deg, #F97316, #FF8C42);
  335. border-radius: 24rpx;
  336. padding: 40rpx 30rpx;
  337. margin-bottom: 24rpx;
  338. box-shadow: 0 6rpx 20rpx rgba(249, 114, 22, 0.25);
  339. }
  340. .scr-hero-badge {
  341. display: flex;
  342. flex-direction: column;
  343. align-items: center;
  344. }
  345. .scr-hero-title {
  346. font-size: 26rpx;
  347. color: rgba(255, 255, 255, 0.9);
  348. }
  349. .scr-hero-score-row {
  350. display: flex;
  351. align-items: baseline;
  352. margin-top: 10rpx;
  353. }
  354. .scr-hero-score {
  355. font-size: 88rpx;
  356. font-weight: 700;
  357. color: #fff;
  358. }
  359. .scr-hero-total {
  360. font-size: 30rpx;
  361. color: rgba(255, 255, 255, 0.7);
  362. margin-left: 6rpx;
  363. }
  364. .scr-hero-level {
  365. margin-top: 14rpx;
  366. padding: 8rpx 28rpx;
  367. border-radius: 24rpx;
  368. font-size: 26rpx;
  369. font-weight: 600;
  370. background: rgba(255, 255, 255, 0.92);
  371. }
  372. .scr-hero-level.level-healthy { color: #2E7D32; }
  373. .scr-hero-level.level-attention { color: #E65100; }
  374. .scr-hero-level.level-tense { color: #C62828; }
  375. .scr-hero-date {
  376. display: block;
  377. text-align: center;
  378. font-size: 22rpx;
  379. color: rgba(255, 255, 255, 0.8);
  380. margin-top: 16rpx;
  381. }
  382. /* 通用卡片 */
  383. .scr-card {
  384. background: #fff;
  385. border-radius: 24rpx;
  386. padding: 30rpx 26rpx;
  387. margin-bottom: 24rpx;
  388. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  389. }
  390. .scr-card-title {
  391. display: flex;
  392. align-items: baseline;
  393. justify-content: space-between;
  394. margin-bottom: 24rpx;
  395. }
  396. .scr-card-title-text {
  397. font-size: 32rpx;
  398. font-weight: 600;
  399. color: #333;
  400. }
  401. .scr-card-sub {
  402. font-size: 22rpx;
  403. color: #999;
  404. }
  405. /* 维度得分 */
  406. .scr-dim-list {
  407. display: flex;
  408. flex-direction: column;
  409. }
  410. .scr-dim-item {
  411. margin-bottom: 28rpx;
  412. }
  413. .scr-dim-item:last-child {
  414. margin-bottom: 0;
  415. }
  416. .scr-dim-head {
  417. display: flex;
  418. align-items: center;
  419. justify-content: space-between;
  420. }
  421. .scr-dim-label {
  422. display: flex;
  423. align-items: center;
  424. }
  425. .scr-dim-dot {
  426. width: 28rpx;
  427. height: 28rpx;
  428. border-radius: 50%;
  429. margin-right: 12rpx;
  430. }
  431. .scr-dim-name {
  432. font-size: 30rpx;
  433. font-weight: 600;
  434. color: #333;
  435. }
  436. .scr-dim-element {
  437. font-size: 22rpx;
  438. color: #999;
  439. margin-left: 10rpx;
  440. }
  441. .scr-dim-score-wrap {
  442. display: flex;
  443. align-items: baseline;
  444. }
  445. .scr-dim-score {
  446. font-size: 40rpx;
  447. font-weight: 700;
  448. }
  449. .scr-dim-score-max {
  450. font-size: 22rpx;
  451. color: #BBB;
  452. }
  453. .scr-dim-bar {
  454. height: 12rpx;
  455. background: #F0F0F0;
  456. border-radius: 6rpx;
  457. margin-top: 14rpx;
  458. overflow: hidden;
  459. }
  460. .scr-dim-bar-fill {
  461. height: 100%;
  462. border-radius: 6rpx;
  463. transition: width 0.5s ease;
  464. }
  465. .scr-dim-foot {
  466. display: flex;
  467. align-items: center;
  468. margin-top: 12rpx;
  469. }
  470. .scr-dim-level {
  471. font-size: 22rpx;
  472. padding: 4rpx 16rpx;
  473. border-radius: 16rpx;
  474. margin-right: 14rpx;
  475. flex-shrink: 0;
  476. }
  477. .scr-dim-level.lvl-healthy { background: #E8F5E9; color: #2E7D32; }
  478. .scr-dim-level.lvl-attention { background: #FFF8E1; color: #F57F17; }
  479. .scr-dim-level.lvl-tense { background: #FFEBEE; color: #C62828; }
  480. .scr-guide {
  481. background: #FFF7ED;
  482. border-radius: 24rpx;
  483. padding: 30rpx 26rpx;
  484. margin-bottom: 24rpx;
  485. box-shadow: 0 2rpx 12rpx rgba(249, 114, 22, 0.08);
  486. }
  487. .scr-guide-head {
  488. display: flex;
  489. align-items: center;
  490. margin-bottom: 20rpx;
  491. }
  492. .scr-guide-title {
  493. font-size: 30rpx;
  494. font-weight: 700;
  495. color: #F97316;
  496. }
  497. .scr-guide-desc {
  498. font-size: 24rpx;
  499. color: #888;
  500. line-height: 1.6;
  501. margin-bottom: 24rpx;
  502. }
  503. .scr-guide-total {
  504. display: flex;
  505. align-items: baseline;
  506. margin-bottom: 24rpx;
  507. }
  508. .scr-guide-total-label {
  509. font-size: 28rpx;
  510. font-weight: 600;
  511. color: #333;
  512. margin-right: 12rpx;
  513. }
  514. .scr-guide-total-text {
  515. font-size: 48rpx;
  516. font-weight: 700;
  517. color: #F97316;
  518. }
  519. .scr-guide-legend {
  520. display: flex;
  521. flex-wrap: wrap;
  522. gap: 16rpx 24rpx;
  523. margin-bottom: 24rpx;
  524. }
  525. .scr-guide-legend-item {
  526. display: flex;
  527. align-items: center;
  528. flex: 1 1 120rpx;
  529. }
  530. .scr-guide-legend-dot {
  531. width: 24rpx;
  532. height: 24rpx;
  533. border-radius: 50%;
  534. flex-shrink: 0;
  535. }
  536. .lg-healthy { background: #2E7D32; }
  537. .lg-attention { background: #F57F17; }
  538. .lg-tense { background: #C62828; }
  539. .scr-guide-legend-text {
  540. font-size: 22rpx;
  541. color: #555;
  542. margin-left: 10rpx;
  543. }
  544. .scr-guide-steps {
  545. margin-top: 16rpx;
  546. }
  547. .scr-guide-steps-title {
  548. font-size: 24rpx;
  549. color: #F97316;
  550. margin-bottom: 12rpx;
  551. display: block;
  552. }
  553. .scr-guide-step {
  554. display: flex;
  555. align-items: center;
  556. margin-bottom: 8rpx;
  557. }
  558. .scr-guide-step-num {
  559. font-size: 28rpx;
  560. color: #F97316;
  561. margin-right: 12rpx;
  562. min-width: 20rpx;
  563. }
  564. .scr-guide-step-text {
  565. font-size: 24rpx;
  566. color: #333;
  567. flex: 1;
  568. }
  569. .scr-guide-step:last-child {
  570. margin-bottom: 0;
  571. }
  572. .scr-dim-summary {
  573. flex: 1;
  574. font-size: 24rpx;
  575. color: #888;
  576. line-height: 1.4;
  577. }
  578. /* 寻源建议 */
  579. .scr-advice-intro {
  580. font-size: 24rpx;
  581. color: #666;
  582. line-height: 1.6;
  583. background: #FFF7ED;
  584. border-radius: 12rpx;
  585. padding: 16rpx 20rpx;
  586. margin-bottom: 24rpx;
  587. }
  588. .scr-advice-item {
  589. border: 2rpx solid #F0E6DC;
  590. border-radius: 16rpx;
  591. padding: 24rpx;
  592. margin-bottom: 20rpx;
  593. }
  594. .scr-advice-item:last-child {
  595. margin-bottom: 0;
  596. }
  597. .scr-advice-dim-row {
  598. display: flex;
  599. align-items: center;
  600. justify-content: space-between;
  601. margin-bottom: 18rpx;
  602. }
  603. .scr-advice-dim-badge {
  604. display: flex;
  605. align-items: center;
  606. padding: 8rpx 20rpx;
  607. border-radius: 20rpx;
  608. }
  609. .scr-advice-dim-name {
  610. font-size: 28rpx;
  611. font-weight: 700;
  612. color: #fff;
  613. margin-right: 8rpx;
  614. }
  615. .scr-advice-dim-elem {
  616. font-size: 22rpx;
  617. color: rgba(255, 255, 255, 0.9);
  618. }
  619. .scr-advice-dim-score {
  620. font-size: 26rpx;
  621. font-weight: 600;
  622. color: #C62828;
  623. }
  624. .scr-advice-flow {
  625. display: flex;
  626. align-items: flex-start;
  627. margin-bottom: 12rpx;
  628. }
  629. .scr-flow-node {
  630. display: flex;
  631. align-items: center;
  632. flex-shrink: 0;
  633. width: 200rpx;
  634. }
  635. .scr-flow-dot {
  636. width: 20rpx;
  637. height: 20rpx;
  638. border-radius: 50%;
  639. margin-right: 8rpx;
  640. flex-shrink: 0;
  641. }
  642. .scr-flow-label {
  643. font-size: 24rpx;
  644. font-weight: 600;
  645. color: #333;
  646. }
  647. .scr-flow-arrow {
  648. flex-shrink: 0;
  649. font-size: 24rpx;
  650. color: #F97316;
  651. margin: 0 10rpx;
  652. }
  653. .scr-flow-action {
  654. flex: 1;
  655. font-size: 24rpx;
  656. color: #666;
  657. line-height: 1.5;
  658. }
  659. .scr-advice-action {
  660. display: flex;
  661. align-items: flex-start;
  662. background: #F5FAFE;
  663. border-radius: 12rpx;
  664. padding: 16rpx 20rpx;
  665. margin-top: 10rpx;
  666. }
  667. .scr-advice-action-label {
  668. flex-shrink: 0;
  669. font-size: 22rpx;
  670. font-weight: 600;
  671. color: #F97316;
  672. margin-right: 12rpx;
  673. padding: 2rpx 0;
  674. }
  675. .scr-advice-action-text {
  676. flex: 1;
  677. font-size: 24rpx;
  678. color: #333;
  679. line-height: 1.5;
  680. }
  681. /* 一键加入今日微行动 */
  682. .scr-micro-row {
  683. display: flex;
  684. margin-top: 14rpx;
  685. }
  686. .scr-micro-btn {
  687. flex: 1;
  688. height: 72rpx;
  689. line-height: 72rpx;
  690. font-size: 26rpx;
  691. font-weight: 600;
  692. color: #fff;
  693. background: linear-gradient(135deg, #10B981, #34D399);
  694. border-radius: 36rpx;
  695. border: none;
  696. }
  697. .scr-micro-btn::after {
  698. border: none;
  699. }
  700. .scr-micro-done {
  701. flex: 1;
  702. text-align: center;
  703. font-size: 24rpx;
  704. color: #10B981;
  705. background: #E8F8F1;
  706. border-radius: 12rpx;
  707. padding: 16rpx 0;
  708. }
  709. /* 全部健康 */
  710. .scr-all-healthy {
  711. display: flex;
  712. flex-direction: column;
  713. align-items: center;
  714. padding: 30rpx 0;
  715. }
  716. .scr-all-healthy-icon {
  717. font-size: 72rpx;
  718. margin-bottom: 16rpx;
  719. }
  720. .scr-all-healthy-text {
  721. font-size: 28rpx;
  722. color: #666;
  723. }
  724. /* 底部按钮 */
  725. .scr-footer {
  726. display: flex;
  727. gap: 20rpx;
  728. margin-top: 20rpx;
  729. }
  730. .scr-btn {
  731. flex: 1;
  732. height: 88rpx;
  733. line-height: 88rpx;
  734. font-size: 30rpx;
  735. border-radius: 44rpx;
  736. text-align: center;
  737. border: none;
  738. }
  739. .scr-btn-primary {
  740. background: linear-gradient(135deg, #F97316, #FF8C42);
  741. color: #fff;
  742. font-weight: 600;
  743. }
  744. .scr-btn-outline {
  745. background: #fff;
  746. color: #F97316;
  747. border: 2rpx solid #F97316;
  748. }
  749. .scr-btn-secondary {
  750. background: linear-gradient(135deg, #10B981, #34D399);
  751. color: #fff;
  752. font-weight: 600;
  753. }
  754. .scr-btn-ghost {
  755. background: #fff;
  756. color: #666;
  757. border: 2rpx solid #D1D5DB;
  758. }
  759. .scr-advice-interpretation {
  760. display: block;
  761. font-size: 26rpx;
  762. color: #555;
  763. line-height: 1.6;
  764. margin: 16rpx 0;
  765. }
  766. .scr-advice-actions {
  767. display: flex;
  768. flex-direction: column;
  769. margin-top: 12rpx;
  770. }
  771. .scr-advice-action-label {
  772. font-size: 24rpx;
  773. font-weight: 600;
  774. color: #F97316;
  775. }
  776. .scr-advice-action {
  777. font-size: 24rpx;
  778. color: #555;
  779. line-height: 1.5;
  780. }
  781. .scr-family-insight {
  782. background: #F5FAFE;
  783. border-radius: 16rpx;
  784. padding: 20rpx 24rpx;
  785. margin-top: 24rpx;
  786. }
  787. .scr-family-insight-label {
  788. display: block;
  789. font-size: 24rpx;
  790. font-weight: 600;
  791. color: #F97316;
  792. margin-bottom: 8rpx;
  793. }
  794. .scr-family-insight-text {
  795. display: block;
  796. font-size: 26rpx;
  797. color: #555;
  798. line-height: 1.6;
  799. }
  800. .scr-fallback {
  801. background: #FFF7ED;
  802. border-radius: 12rpx;
  803. padding: 16rpx 20rpx;
  804. margin-top: 16rpx;
  805. text-align: center;
  806. }
  807. .scr-fallback text {
  808. font-size: 24rpx;
  809. color: #999;
  810. }
  811. </style>