mbti.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  1. <template>
  2. <view class="mbti-page">
  3. <view class="status-bar-placeholder" :style="{height: statusBarHeight + 'px', backgroundColor: '#FFFFFF'}"></view>
  4. <!-- 自定义顶部导航栏 -->
  5. <view class="custom-nav">
  6. <view class="nav-left" @click="goBack">
  7. <text class="back-icon">←</text>
  8. </view>
  9. <view class="nav-title">MBTI人格测试</view>
  10. <view class="nav-right"></view>
  11. </view>
  12. <!-- 测试说明页面 -->
  13. <view v-if="currentStep === 'intro'" class="intro-section">
  14. <view class="intro-header">
  15. <view class="mbti-logo">🧩</view>
  16. <view class="intro-title">MBTI人格类型测试</view>
  17. <view class="intro-subtitle">发现真实的自己,了解你的人格类型</view>
  18. </view>
  19. <view class="intro-content">
  20. <view class="feature-list">
  21. <view class="feature-item">
  22. <view class="feature-icon">🎯</view>
  23. <view class="feature-text">
  24. <text class="feature-title">科学准确</text>
  25. <text class="feature-desc">基于心理学理论的专业测评</text>
  26. </view>
  27. </view>
  28. <view class="feature-item">
  29. <view class="feature-icon">⏱️</view>
  30. <view class="feature-text">
  31. <text class="feature-title">快速便捷</text>
  32. <text class="feature-desc">仅需5-10分钟完成测试</text>
  33. </view>
  34. </view>
  35. <view class="feature-item">
  36. <view class="feature-icon">📊</view>
  37. <view class="feature-text">
  38. <text class="feature-title">详细报告</text>
  39. <text class="feature-desc">获得专业的人格分析报告</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="test-info">
  44. <view class="info-item">
  45. <text class="info-label">测试题数:</text>
  46. <text class="info-value">{{ totalQuestions }}道题</text>
  47. </view>
  48. <view class="info-item">
  49. <text class="info-label">测试时间:</text>
  50. <text class="info-value">约5-10分钟</text>
  51. </view>
  52. <view class="info-item">
  53. <text class="info-label">测试人数:</text>
  54. <text class="info-value">已有{{ testCount }}人测试</text>
  55. </view>
  56. </view>
  57. <view class="start-btn" @click="startTest">
  58. <text class="btn-text">开始测试</text>
  59. </view>
  60. <view class="tips">
  61. <text class="tips-text">💡 请根据真实想法作答,无标准答案</text>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 测试进行页面 -->
  66. <view v-if="currentStep === 'testing'" class="testing-section">
  67. <!-- 进度条 -->
  68. <view class="progress-bar">
  69. <view class="progress-bg">
  70. <view class="progress-fill" :style="{width: progressPercent + '%'}"></view>
  71. </view>
  72. <view class="progress-text">{{ currentQuestion }}/{{ totalQuestions }}</view>
  73. </view>
  74. <!-- 题目内容 -->
  75. <view class="question-card">
  76. <view class="question-number">第{{ currentQuestion }}题</view>
  77. <view class="question-text">{{ currentQuestionData.question }}</view>
  78. <!-- 选择题选项 -->
  79. <view v-if="currentQuestionData.type === 'choice'" class="options-list">
  80. <view
  81. v-for="(option, index) in currentQuestionData.options"
  82. :key="index"
  83. class="option-item"
  84. :class="{'selected': selectedAnswer === index}"
  85. @click="selectAnswer(index)"
  86. >
  87. <view class="option-marker">{{ String.fromCharCode(65 + index) }}</view>
  88. <view class="option-text">{{ option.text }}</view>
  89. </view>
  90. </view>
  91. <!-- 量表题选项 -->
  92. <view v-if="currentQuestionData.type === 'scale'" class="scale-options">
  93. <view class="scale-labels">
  94. <text class="scale-label">非常不同意</text>
  95. <text class="scale-label">非常同意</text>
  96. </view>
  97. <view class="scale-buttons">
  98. <view
  99. v-for="(score, index) in [1,2,3,4,5]"
  100. :key="index"
  101. class="scale-btn"
  102. :class="{'selected': selectedAnswer === score}"
  103. @click="selectAnswer(score)"
  104. >
  105. {{ score }}
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 操作按钮 -->
  111. <view class="action-buttons">
  112. <view class="btn-secondary" @click="previousQuestion" v-if="currentQuestion > 1">
  113. 上一题
  114. </view>
  115. <view class="btn-primary" @click="nextQuestion" :class="{'disabled': selectedAnswer === null}">
  116. {{ currentQuestion === totalQuestions ? '完成测试' : '下一题' }}
  117. </view>
  118. </view>
  119. </view>
  120. <!-- 结果页面 -->
  121. <view v-if="currentStep === 'result'" class="result-section">
  122. <view class="result-header">
  123. <view class="result-type">{{ mbtiResult.type }}</view>
  124. <view class="result-name">{{ mbtiResult.name }}</view>
  125. <view class="result-desc">{{ mbtiResult.description }}</view>
  126. </view>
  127. <view class="result-details">
  128. <!-- 四个维度分析 -->
  129. <view class="dimensions">
  130. <view class="dimension-item" v-for="(dim, index) in mbtiResult.dimensions" :key="index">
  131. <view class="dim-header">
  132. <text class="dim-name">{{ dim.name }}</text>
  133. <text class="dim-percent">{{ dim.percent }}%</text>
  134. </view>
  135. <view class="dim-bar">
  136. <view class="dim-fill" :style="{width: dim.percent + '%', background: dim.color}"></view>
  137. </view>
  138. <view class="dim-desc">{{ dim.description }}</view>
  139. </view>
  140. </view>
  141. <!-- 性格特点 -->
  142. <view class="traits-section">
  143. <view class="section-title">💎 性格特点</view>
  144. <view class="traits-list">
  145. <text class="trait-item" v-for="(trait, index) in mbtiResult.traits" :key="index">
  146. {{ trait }}
  147. </text>
  148. </view>
  149. </view>
  150. <!-- 适合职业 -->
  151. <view class="careers-section">
  152. <view class="section-title">💼 适合职业</view>
  153. <view class="careers-list">
  154. <text class="career-item" v-for="(career, index) in mbtiResult.careers" :key="index">
  155. {{ career }}
  156. </text>
  157. </view>
  158. </view>
  159. <!-- 恋爱风格 -->
  160. <view class="love-section">
  161. <view class="section-title">💕 恋爱风格</view>
  162. <view class="love-content">{{ mbtiResult.loveStyle }}</view>
  163. </view>
  164. <!-- 匹配类型 -->
  165. <view class="compatibility-section">
  166. <view class="section-title">🔗 最佳配对</view>
  167. <view class="compatibility-types">
  168. <text class="compat-type" v-for="(type, index) in mbtiResult.compatibility" :key="index">
  169. {{ type }}
  170. </text>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="result-actions">
  175. <view class="btn-secondary" @click="retakeTest">重新测试</view>
  176. <view class="btn-primary" @click="shareResult">分享结果</view>
  177. </view>
  178. </view>
  179. </view>
  180. </template>
  181. <script>
  182. import { MBTI_QUESTIONS, MBTI_TYPES, calculateMBTI } from '@/utils/mbti.js'
  183. export default {
  184. data() {
  185. return {
  186. statusBarHeight: 0,
  187. currentStep: 'intro', // intro, testing, result
  188. currentQuestion: 1,
  189. totalQuestions: 0,
  190. selectedAnswer: null,
  191. answers: [],
  192. testCount: 15678,
  193. mbtiResult: null
  194. }
  195. },
  196. computed: {
  197. progressPercent() {
  198. return Math.round((this.currentQuestion / this.totalQuestions) * 100)
  199. },
  200. currentQuestionData() {
  201. return MBTI_QUESTIONS[this.currentQuestion - 1] || {}
  202. }
  203. },
  204. onLoad() {
  205. this.initData()
  206. const systemInfo = uni.getSystemInfoSync()
  207. this.statusBarHeight = systemInfo.statusBarHeight
  208. },
  209. methods: {
  210. // 初始化数据
  211. initData() {
  212. this.totalQuestions = MBTI_QUESTIONS.length
  213. this.answers = new Array(this.totalQuestions).fill(null)
  214. },
  215. // 返回上一页
  216. goBack() {
  217. if (this.currentStep === 'testing' && this.currentQuestion > 1) {
  218. // 测试中显示确认弹窗
  219. uni.showModal({
  220. title: '提示',
  221. content: '测试还未完成,确定要退出吗?',
  222. success: (res) => {
  223. if (res.confirm) {
  224. uni.navigateBack()
  225. }
  226. }
  227. })
  228. } else {
  229. uni.navigateBack()
  230. }
  231. },
  232. // 开始测试
  233. startTest() {
  234. this.currentStep = 'testing'
  235. this.currentQuestion = 1
  236. this.selectedAnswer = this.answers[0]
  237. },
  238. // 选择答案
  239. selectAnswer(answer) {
  240. this.selectedAnswer = answer
  241. this.answers[this.currentQuestion - 1] = answer
  242. },
  243. // 下一题
  244. nextQuestion() {
  245. if (this.selectedAnswer === null) {
  246. uni.showToast({
  247. title: '请选择一个选项',
  248. icon: 'none'
  249. })
  250. return
  251. }
  252. // 保存当前答案
  253. this.answers[this.currentQuestion - 1] = this.selectedAnswer
  254. if (this.currentQuestion === this.totalQuestions) {
  255. // 完成测试,计算结果
  256. this.calculateResult()
  257. } else {
  258. // 下一题
  259. this.currentQuestion++
  260. this.selectedAnswer = this.answers[this.currentQuestion - 1]
  261. }
  262. },
  263. // 上一题
  264. previousQuestion() {
  265. if (this.currentQuestion > 1) {
  266. this.currentQuestion--
  267. this.selectedAnswer = this.answers[this.currentQuestion - 1]
  268. }
  269. },
  270. // 计算测试结果
  271. calculateResult() {
  272. try {
  273. const mbtiType = calculateMBTI(this.answers)
  274. this.mbtiResult = MBTI_TYPES[mbtiType]
  275. this.currentStep = 'result'
  276. // 统计测试完成
  277. this.testCount++
  278. } catch (error) {
  279. uni.showToast({
  280. title: '计算结果失败',
  281. icon: 'error'
  282. })
  283. }
  284. },
  285. // 重新测试
  286. retakeTest() {
  287. this.currentStep = 'intro'
  288. this.currentQuestion = 1
  289. this.selectedAnswer = null
  290. this.answers = new Array(this.totalQuestions).fill(null)
  291. this.mbtiResult = null
  292. },
  293. // 分享结果
  294. shareResult() {
  295. uni.showActionSheet({
  296. itemList: ['保存图片', '分享给朋友', '复制结果'],
  297. success: (res) => {
  298. switch (res.tapIndex) {
  299. case 0:
  300. this.saveResultImage()
  301. break
  302. case 1:
  303. this.shareToFriend()
  304. break
  305. case 2:
  306. this.copyResult()
  307. break
  308. }
  309. }
  310. })
  311. },
  312. // 保存结果图片
  313. saveResultImage() {
  314. uni.showToast({
  315. title: '功能开发中',
  316. icon: 'none'
  317. })
  318. },
  319. // 分享给朋友
  320. shareToFriend() {
  321. uni.showToast({
  322. title: '功能开发中',
  323. icon: 'none'
  324. })
  325. },
  326. // 复制结果
  327. copyResult() {
  328. const resultText = `我的MBTI人格类型是:${this.mbtiResult.type} - ${this.mbtiResult.name}\n${this.mbtiResult.description}`
  329. uni.setClipboardData({
  330. data: resultText,
  331. success: () => {
  332. uni.showToast({
  333. title: '已复制到剪贴板',
  334. icon: 'success'
  335. })
  336. }
  337. })
  338. }
  339. }
  340. }
  341. </script>
  342. <style lang="scss" scoped>
  343. .mbti-page {
  344. min-height: 100vh;
  345. background: linear-gradient(180deg, #F8F9FA 0%, #FFFFFF 100%);
  346. }
  347. /* 自定义导航栏 */
  348. .custom-nav {
  349. position: relative;
  350. display: flex;
  351. align-items: center;
  352. justify-content: space-between;
  353. height: 88rpx;
  354. padding: 0 30rpx;
  355. background-color: #FFFFFF;
  356. border-bottom: 1rpx solid #F0F0F0;
  357. .nav-left {
  358. width: 80rpx;
  359. .back-icon {
  360. font-size: 40rpx;
  361. color: #333333;
  362. }
  363. }
  364. .nav-title {
  365. position: absolute;
  366. left: 50%;
  367. transform: translateX(-50%);
  368. font-size: 34rpx;
  369. font-weight: 600;
  370. color: #333333;
  371. }
  372. .nav-right {
  373. width: 80rpx;
  374. }
  375. }
  376. /* 介绍页面 */
  377. .intro-section {
  378. padding: 40rpx 30rpx;
  379. }
  380. .intro-header {
  381. text-align: center;
  382. margin-bottom: 60rpx;
  383. .mbti-logo {
  384. font-size: 120rpx;
  385. margin-bottom: 30rpx;
  386. }
  387. .intro-title {
  388. font-size: 48rpx;
  389. font-weight: bold;
  390. color: #333333;
  391. margin-bottom: 15rpx;
  392. }
  393. .intro-subtitle {
  394. font-size: 28rpx;
  395. color: #666666;
  396. line-height: 1.6;
  397. }
  398. }
  399. .intro-content {
  400. .feature-list {
  401. margin-bottom: 50rpx;
  402. .feature-item {
  403. display: flex;
  404. align-items: center;
  405. background-color: #FFFFFF;
  406. border-radius: 20rpx;
  407. padding: 30rpx;
  408. margin-bottom: 20rpx;
  409. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  410. .feature-icon {
  411. font-size: 50rpx;
  412. margin-right: 25rpx;
  413. }
  414. .feature-text {
  415. flex: 1;
  416. .feature-title {
  417. display: block;
  418. font-size: 32rpx;
  419. font-weight: 600;
  420. color: #333333;
  421. margin-bottom: 8rpx;
  422. }
  423. .feature-desc {
  424. font-size: 26rpx;
  425. color: #666666;
  426. }
  427. }
  428. }
  429. }
  430. .test-info {
  431. background-color: #FFFFFF;
  432. border-radius: 20rpx;
  433. padding: 30rpx;
  434. margin-bottom: 40rpx;
  435. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  436. .info-item {
  437. display: flex;
  438. justify-content: space-between;
  439. align-items: center;
  440. margin-bottom: 20rpx;
  441. &:last-child {
  442. margin-bottom: 0;
  443. }
  444. .info-label {
  445. font-size: 28rpx;
  446. color: #666666;
  447. }
  448. .info-value {
  449. font-size: 28rpx;
  450. font-weight: 600;
  451. color: #333333;
  452. }
  453. }
  454. }
  455. .start-btn {
  456. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  457. border-radius: 50rpx;
  458. height: 100rpx;
  459. display: flex;
  460. align-items: center;
  461. justify-content: center;
  462. margin-bottom: 30rpx;
  463. box-shadow: 0 8rpx 20rpx rgba(102, 126, 234, 0.3);
  464. transition: transform 0.2s;
  465. &:active {
  466. transform: scale(0.98);
  467. }
  468. .btn-text {
  469. font-size: 32rpx;
  470. font-weight: 600;
  471. color: #FFFFFF;
  472. }
  473. }
  474. .tips {
  475. text-align: center;
  476. .tips-text {
  477. font-size: 24rpx;
  478. color: #999999;
  479. }
  480. }
  481. }
  482. /* 测试进行页面 */
  483. .testing-section {
  484. padding: 30rpx;
  485. }
  486. .progress-bar {
  487. background-color: #FFFFFF;
  488. border-radius: 15rpx;
  489. padding: 25rpx;
  490. margin-bottom: 30rpx;
  491. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  492. .progress-bg {
  493. height: 12rpx;
  494. background-color: #F0F0F0;
  495. border-radius: 6rpx;
  496. overflow: hidden;
  497. margin-bottom: 15rpx;
  498. .progress-fill {
  499. height: 100%;
  500. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  501. border-radius: 6rpx;
  502. transition: width 0.3s ease;
  503. }
  504. }
  505. .progress-text {
  506. text-align: center;
  507. font-size: 26rpx;
  508. color: #666666;
  509. }
  510. }
  511. .question-card {
  512. background-color: #FFFFFF;
  513. border-radius: 20rpx;
  514. padding: 40rpx;
  515. margin-bottom: 30rpx;
  516. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  517. .question-number {
  518. font-size: 24rpx;
  519. color: #999999;
  520. margin-bottom: 15rpx;
  521. }
  522. .question-text {
  523. font-size: 32rpx;
  524. color: #333333;
  525. line-height: 1.6;
  526. margin-bottom: 40rpx;
  527. font-weight: 500;
  528. }
  529. }
  530. .options-list {
  531. .option-item {
  532. display: flex;
  533. align-items: center;
  534. background-color: #F8F9FA;
  535. border-radius: 15rpx;
  536. padding: 25rpx;
  537. margin-bottom: 15rpx;
  538. transition: all 0.2s;
  539. &.selected {
  540. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  541. color: #FFFFFF;
  542. }
  543. &:last-child {
  544. margin-bottom: 0;
  545. }
  546. .option-marker {
  547. width: 50rpx;
  548. height: 50rpx;
  549. border-radius: 50%;
  550. background-color: rgba(255, 255, 255, 0.2);
  551. display: flex;
  552. align-items: center;
  553. justify-content: center;
  554. margin-right: 20rpx;
  555. font-weight: 600;
  556. }
  557. .option-text {
  558. flex: 1;
  559. font-size: 28rpx;
  560. line-height: 1.5;
  561. }
  562. }
  563. }
  564. .scale-options {
  565. .scale-labels {
  566. display: flex;
  567. justify-content: space-between;
  568. margin-bottom: 30rpx;
  569. .scale-label {
  570. font-size: 24rpx;
  571. color: #666666;
  572. }
  573. }
  574. .scale-buttons {
  575. display: flex;
  576. justify-content: space-between;
  577. .scale-btn {
  578. width: 80rpx;
  579. height: 80rpx;
  580. border-radius: 50%;
  581. background-color: #F0F0F0;
  582. display: flex;
  583. align-items: center;
  584. justify-content: center;
  585. font-size: 28rpx;
  586. font-weight: 600;
  587. color: #666666;
  588. transition: all 0.2s;
  589. &.selected {
  590. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  591. color: #FFFFFF;
  592. }
  593. }
  594. }
  595. }
  596. .action-buttons {
  597. display: flex;
  598. gap: 20rpx;
  599. .btn-secondary,
  600. .btn-primary {
  601. flex: 1;
  602. height: 80rpx;
  603. border-radius: 40rpx;
  604. display: flex;
  605. align-items: center;
  606. justify-content: center;
  607. font-size: 30rpx;
  608. font-weight: 600;
  609. transition: all 0.2s;
  610. &:active {
  611. transform: scale(0.98);
  612. }
  613. }
  614. .btn-secondary {
  615. background-color: #F8F9FA;
  616. color: #666666;
  617. border: 2rpx solid #E9ECEF;
  618. }
  619. .btn-primary {
  620. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  621. color: #FFFFFF;
  622. box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
  623. &.disabled {
  624. background: #CCCCCC;
  625. box-shadow: none;
  626. pointer-events: none;
  627. }
  628. }
  629. }
  630. /* 结果页面 */
  631. .result-section {
  632. padding: 30rpx;
  633. }
  634. .result-header {
  635. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  636. border-radius: 20rpx;
  637. padding: 40rpx;
  638. text-align: center;
  639. color: #FFFFFF;
  640. margin-bottom: 30rpx;
  641. box-shadow: 0 8rpx 20rpx rgba(102, 126, 234, 0.3);
  642. .result-type {
  643. font-size: 60rpx;
  644. font-weight: bold;
  645. margin-bottom: 15rpx;
  646. }
  647. .result-name {
  648. font-size: 36rpx;
  649. font-weight: 600;
  650. margin-bottom: 20rpx;
  651. }
  652. .result-desc {
  653. font-size: 26rpx;
  654. line-height: 1.6;
  655. opacity: 0.9;
  656. }
  657. }
  658. .result-details {
  659. background-color: #FFFFFF;
  660. border-radius: 20rpx;
  661. padding: 30rpx;
  662. margin-bottom: 30rpx;
  663. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  664. .section-title {
  665. font-size: 32rpx;
  666. font-weight: 600;
  667. color: #333333;
  668. margin-bottom: 25rpx;
  669. }
  670. }
  671. .dimensions {
  672. margin-bottom: 40rpx;
  673. .dimension-item {
  674. margin-bottom: 30rpx;
  675. &:last-child {
  676. margin-bottom: 0;
  677. }
  678. .dim-header {
  679. display: flex;
  680. justify-content: space-between;
  681. align-items: center;
  682. margin-bottom: 10rpx;
  683. .dim-name {
  684. font-size: 28rpx;
  685. color: #333333;
  686. }
  687. .dim-percent {
  688. font-size: 28rpx;
  689. font-weight: 600;
  690. color: #667eea;
  691. }
  692. }
  693. .dim-bar {
  694. height: 12rpx;
  695. background-color: #F0F0F0;
  696. border-radius: 6rpx;
  697. overflow: hidden;
  698. margin-bottom: 10rpx;
  699. .dim-fill {
  700. height: 100%;
  701. border-radius: 6rpx;
  702. transition: width 0.6s ease;
  703. }
  704. }
  705. .dim-desc {
  706. font-size: 24rpx;
  707. color: #666666;
  708. line-height: 1.4;
  709. }
  710. }
  711. }
  712. .traits-section,
  713. .careers-section {
  714. margin-bottom: 40rpx;
  715. .traits-list,
  716. .careers-list {
  717. display: flex;
  718. flex-wrap: wrap;
  719. gap: 10rpx;
  720. .trait-item,
  721. .career-item {
  722. padding: 10rpx 20rpx;
  723. background-color: #F8F9FA;
  724. border-radius: 20rpx;
  725. font-size: 24rpx;
  726. color: #333333;
  727. }
  728. }
  729. }
  730. .love-section {
  731. margin-bottom: 40rpx;
  732. .love-content {
  733. font-size: 28rpx;
  734. color: #333333;
  735. line-height: 1.6;
  736. }
  737. }
  738. .compatibility-section {
  739. .compatibility-types {
  740. display: flex;
  741. flex-wrap: wrap;
  742. gap: 15rpx;
  743. .compat-type {
  744. padding: 15rpx 25rpx;
  745. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  746. color: #FFFFFF;
  747. border-radius: 25rpx;
  748. font-size: 26rpx;
  749. font-weight: 600;
  750. }
  751. }
  752. }
  753. .result-actions {
  754. display: flex;
  755. gap: 20rpx;
  756. .btn-secondary,
  757. .btn-primary {
  758. flex: 1;
  759. height: 80rpx;
  760. border-radius: 40rpx;
  761. display: flex;
  762. align-items: center;
  763. justify-content: center;
  764. font-size: 30rpx;
  765. font-weight: 600;
  766. transition: all 0.2s;
  767. &:active {
  768. transform: scale(0.98);
  769. }
  770. }
  771. .btn-secondary {
  772. background-color: #F8F9FA;
  773. color: #666666;
  774. border: 2rpx solid #E9ECEF;
  775. }
  776. .btn-primary {
  777. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  778. color: #FFFFFF;
  779. box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
  780. }
  781. }
  782. </style>