bazi-match.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. <template>
  2. <view class="bazi-match-container">
  3. <!-- 自定义导航栏 -->
  4. <view class="custom-navbar">
  5. <view class="navbar-content">
  6. <view class="navbar-left" @click="goBack">
  7. <text class="back-icon">←</text>
  8. </view>
  9. <view class="navbar-title">八字配对</view>
  10. <view class="navbar-right"></view>
  11. </view>
  12. </view>
  13. <!-- 输入区域 -->
  14. <view class="input-section" v-if="!hasResult">
  15. <!-- 我的八字 -->
  16. <view class="section-card">
  17. <view class="section-title">👤 我的八字</view>
  18. <view class="my-bazi-info" v-if="myBaziData">
  19. <view class="bazi-display-mini">
  20. <view class="bazi-pillar-mini" v-for="(pillar, key) in myBaziData.baziAnalysis" :key="key" v-if="key !== 'analysis' && key !== 'birthInfo' && key !== 'baziString' && key !== 'rizhu' && key !== 'riganWuxing'">
  21. <view class="pillar-value-mini">
  22. <text class="gan-mini">{{ pillar.gan }}</text>
  23. <text class="zhi-mini">{{ pillar.zhi }}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="bazi-info-text">
  28. {{ myBaziData.baziAnalysis.baziString }}
  29. </view>
  30. </view>
  31. <view class="no-bazi" v-else>
  32. <text class="no-bazi-text">请先完成八字测算</text>
  33. <button class="go-bazi-btn" @click="goBaziTest">去测算八字</button>
  34. </view>
  35. </view>
  36. <!-- 对方八字 -->
  37. <view class="section-card">
  38. <view class="section-title">👥 对方八字</view>
  39. <view class="input-group">
  40. <view class="input-item">
  41. <text class="input-label">对方出生日期</text>
  42. <picker
  43. mode="date"
  44. :value="targetBirthDate"
  45. @change="onTargetDateChange"
  46. class="date-picker"
  47. >
  48. <view class="picker-display">
  49. {{ targetBirthDateDisplay }}
  50. </view>
  51. </picker>
  52. </view>
  53. <view class="input-item">
  54. <text class="input-label">对方出生时辰</text>
  55. <picker
  56. :range="timeRanges"
  57. :value="targetTimeIndex"
  58. @change="onTargetTimeChange"
  59. class="time-picker"
  60. >
  61. <view class="picker-display">
  62. {{ targetTimeDisplay }}
  63. </view>
  64. </picker>
  65. </view>
  66. </view>
  67. <button class="match-btn" @click="startMatch" :disabled="!canMatch">
  68. 开始配对
  69. </button>
  70. </view>
  71. </view>
  72. <!-- 结果区域 -->
  73. <view class="result-section" v-if="hasResult">
  74. <!-- 配对总览 -->
  75. <view class="match-overview-card">
  76. <view class="section-title">💕 配对结果</view>
  77. <view class="match-score-display">
  78. <view class="score-circle" :style="{background: matchResult.levelColor}">
  79. <text class="score-number">{{ matchResult.totalScore }}</text>
  80. <text class="score-unit">分</text>
  81. </view>
  82. <view class="match-level">{{ matchResult.level }}</view>
  83. </view>
  84. <view class="bazi-comparison">
  85. <view class="comparison-item">
  86. <text class="comparison-label">我的八字</text>
  87. <text class="comparison-bazi">{{ myBaziString }}</text>
  88. </view>
  89. <view class="vs-divider">VS</view>
  90. <view class="comparison-item">
  91. <text class="comparison-label">对方八字</text>
  92. <text class="comparison-bazi">{{ targetBaziString }}</text>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 详细配对分析 -->
  97. <view class="detailed-analysis-card">
  98. <view class="section-title">📊 详细分析</view>
  99. <view class="analysis-tabs">
  100. <view
  101. class="tab-item"
  102. :class="{active: activeTab === tab.key}"
  103. v-for="tab in analysisTabs"
  104. :key="tab.key"
  105. @click="switchTab(tab.key)"
  106. >
  107. {{ tab.name }}
  108. </view>
  109. </view>
  110. <view class="tab-content">
  111. <!-- 日干配对 -->
  112. <view class="analysis-content" v-if="activeTab === 'rigan'">
  113. <view class="match-item">
  114. <view class="match-header">
  115. <text class="match-icon">🔮</text>
  116. <text class="match-title">日干配对</text>
  117. <text class="match-score">{{ matchResult.riganMatch.score }}分</text>
  118. </view>
  119. <text class="match-desc">{{ matchResult.riganMatch.description }}</text>
  120. </view>
  121. </view>
  122. <!-- 五行配对 -->
  123. <view class="analysis-content" v-if="activeTab === 'wuxing'">
  124. <view class="match-item">
  125. <view class="match-header">
  126. <text class="match-icon">⚡</text>
  127. <text class="match-title">五行配对</text>
  128. <text class="match-score">{{ matchResult.wuxingMatch.score }}分</text>
  129. </view>
  130. <text class="match-desc">{{ matchResult.wuxingMatch.description }}</text>
  131. </view>
  132. </view>
  133. <!-- 纳音配对 -->
  134. <view class="analysis-content" v-if="activeTab === 'nayin'">
  135. <view class="match-item">
  136. <view class="match-header">
  137. <text class="match-icon">🎵</text>
  138. <text class="match-title">纳音配对</text>
  139. <text class="match-score">{{ matchResult.nayinMatch.score }}分</text>
  140. </view>
  141. <text class="match-desc">{{ matchResult.nayinMatch.description }}</text>
  142. </view>
  143. </view>
  144. <!-- 生肖配对 -->
  145. <view class="analysis-content" v-if="activeTab === 'shengxiao'">
  146. <view class="match-item">
  147. <view class="match-header">
  148. <text class="match-icon">🐉</text>
  149. <text class="match-title">生肖配对</text>
  150. <text class="match-score">{{ matchResult.shengxiaoMatch.score }}分</text>
  151. </view>
  152. <text class="match-desc">{{ matchResult.shengxiaoMatch.description }}</text>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 配对优势 -->
  158. <view class="advantages-card">
  159. <view class="section-title">✨ 配对优势</view>
  160. <view class="advantages-list">
  161. <view
  162. class="advantage-item"
  163. v-for="(advantage, index) in matchResult.advantages"
  164. :key="index"
  165. >
  166. <text class="advantage-icon">💝</text>
  167. <text class="advantage-text">{{ advantage }}</text>
  168. </view>
  169. </view>
  170. </view>
  171. <!-- 挑战与建议 -->
  172. <view class="challenges-card">
  173. <view class="section-title">⚠️ 需要注意</view>
  174. <view class="challenges-list">
  175. <view
  176. class="challenge-item"
  177. v-for="(challenge, index) in matchResult.challenges"
  178. :key="index"
  179. >
  180. <text class="challenge-icon">🔍</text>
  181. <text class="challenge-text">{{ challenge }}</text>
  182. </view>
  183. </view>
  184. </view>
  185. <!-- 相处建议 -->
  186. <view class="suggestions-card">
  187. <view class="section-title">💡 相处建议</view>
  188. <view class="suggestions-list">
  189. <view
  190. class="suggestion-item"
  191. v-for="(suggestion, index) in matchResult.suggestions"
  192. :key="index"
  193. >
  194. <text class="suggestion-icon">🌟</text>
  195. <text class="suggestion-text">{{ suggestion }}</text>
  196. </view>
  197. </view>
  198. </view>
  199. <!-- 配对总结 -->
  200. <view class="summary-card">
  201. <view class="section-title">📝 配对总结</view>
  202. <text class="summary-text">{{ matchResult.summary }}</text>
  203. </view>
  204. <!-- 重新配对 -->
  205. <view class="retest-btn" @click="resetMatch">
  206. 重新配对
  207. </view>
  208. </view>
  209. </view>
  210. </template>
  211. <script>
  212. import baziUtil from '@/utils/bazi.js'
  213. export default {
  214. data() {
  215. return {
  216. // 我的八字数据
  217. myBaziData: null,
  218. // 对方输入数据
  219. targetBirthDate: '',
  220. targetBirthDateDisplay: '请选择对方出生日期',
  221. targetTimeIndex: 0,
  222. targetTimeDisplay: '子时 (23:00-01:00)',
  223. // 时辰选择器数据
  224. timeRanges: [
  225. '子时 (23:00-01:00)', '丑时 (01:00-03:00)', '寅时 (03:00-05:00)',
  226. '卯时 (05:00-07:00)', '辰时 (07:00-09:00)', '巳时 (09:00-11:00)',
  227. '午时 (11:00-13:00)', '未时 (13:00-15:00)', '申时 (15:00-17:00)',
  228. '酉时 (17:00-19:00)', '戌时 (19:00-21:00)', '亥时 (21:00-23:00)'
  229. ],
  230. // 结果数据
  231. hasResult: false,
  232. matchResult: null,
  233. targetBaziData: null,
  234. // UI状态
  235. activeTab: 'rigan',
  236. analysisTabs: [
  237. { key: 'rigan', name: '日干' },
  238. { key: 'wuxing', name: '五行' },
  239. { key: 'nayin', name: '纳音' },
  240. { key: 'shengxiao', name: '生肖' }
  241. ]
  242. }
  243. },
  244. computed: {
  245. // 是否可以开始配对
  246. canMatch() {
  247. return this.myBaziData && this.targetBirthDate
  248. },
  249. // 获取时辰对应的小时数
  250. targetSelectedHour() {
  251. const hourMap = [23, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
  252. return hourMap[this.targetTimeIndex]
  253. },
  254. // 我的八字字符串
  255. myBaziString() {
  256. return this.myBaziData ? this.myBaziData.baziAnalysis.baziString : ''
  257. },
  258. // 对方八字字符串
  259. targetBaziString() {
  260. return this.targetBaziData ? this.targetBaziData.baziString : ''
  261. }
  262. },
  263. methods: {
  264. // 返回上一页
  265. goBack() {
  266. uni.navigateBack()
  267. },
  268. // 跳转到八字测算
  269. goBaziTest() {
  270. uni.navigateTo({
  271. url: '/pages/astrology/bazi'
  272. })
  273. },
  274. // 对方日期选择
  275. onTargetDateChange(e) {
  276. this.targetBirthDate = e.detail.value
  277. this.targetBirthDateDisplay = e.detail.value
  278. },
  279. // 对方时辰选择
  280. onTargetTimeChange(e) {
  281. this.targetTimeIndex = e.detail.value
  282. this.targetTimeDisplay = this.timeRanges[e.detail.value]
  283. },
  284. // 开始配对
  285. async startMatch() {
  286. if (!this.canMatch) {
  287. uni.showToast({
  288. title: '请完善配对信息',
  289. icon: 'none'
  290. })
  291. return
  292. }
  293. uni.showLoading({
  294. title: '配对分析中...',
  295. mask: true
  296. })
  297. try {
  298. console.log('开始八字配对分析')
  299. console.log('我的八字:', this.myBaziString)
  300. console.log('对方出生:', this.targetBirthDate, this.targetTimeDisplay)
  301. // 计算对方八字
  302. const targetBirthDateObj = new Date(this.targetBirthDate + ' 12:00:00')
  303. const targetBaziData = baziUtil.calculateBaZi(targetBirthDateObj, this.targetSelectedHour)
  304. console.log('对方八字:', targetBaziData.baziString)
  305. // 进行配对分析
  306. const matchAnalysis = baziUtil.analyzeBaziMatch(
  307. this.myBaziData.baziAnalysis,
  308. targetBaziData
  309. )
  310. console.log('配对分析结果:', matchAnalysis)
  311. // 保存结果
  312. this.targetBaziData = targetBaziData
  313. this.matchResult = matchAnalysis
  314. this.hasResult = true
  315. console.log('八字配对分析完成')
  316. // 保存到本地存储
  317. uni.setStorageSync('baziMatchResult', {
  318. myBazi: this.myBaziData,
  319. targetBirthDate: this.targetBirthDate,
  320. targetTimeIndex: this.targetTimeIndex,
  321. targetBaziData: targetBaziData,
  322. matchResult: matchAnalysis,
  323. lastUpdate: new Date().getTime()
  324. })
  325. } catch (error) {
  326. console.error('八字配对分析异常:', error)
  327. uni.showToast({
  328. title: '配对分析异常,请重试',
  329. icon: 'none'
  330. })
  331. } finally {
  332. uni.hideLoading()
  333. }
  334. },
  335. // 切换分析标签
  336. switchTab(tabKey) {
  337. this.activeTab = tabKey
  338. },
  339. // 重新配对
  340. resetMatch() {
  341. this.hasResult = false
  342. this.matchResult = null
  343. this.targetBaziData = null
  344. this.targetBirthDate = ''
  345. this.targetBirthDateDisplay = '请选择对方出生日期'
  346. this.targetTimeIndex = 0
  347. this.targetTimeDisplay = '子时 (23:00-01:00)'
  348. }
  349. },
  350. onLoad() {
  351. // 获取我的八字数据
  352. const currentBazi = uni.getStorageSync('currentBazi')
  353. if (currentBazi) {
  354. this.myBaziData = currentBazi
  355. console.log('获取到我的八字数据:', currentBazi.baziAnalysis.baziString)
  356. } else {
  357. // 尝试从八字测算结果获取
  358. const baziResult = uni.getStorageSync('baziResult')
  359. if (baziResult && baziResult.baziData) {
  360. this.myBaziData = {
  361. baziAnalysis: baziResult.baziData,
  362. birthDate: baziResult.birthDate,
  363. timeIndex: baziResult.timeIndex
  364. }
  365. console.log('从八字测算结果获取数据:', baziResult.baziData.baziString)
  366. }
  367. }
  368. // 尝试恢复之前的配对结果
  369. const savedMatchResult = uni.getStorageSync('baziMatchResult')
  370. if (savedMatchResult && savedMatchResult.matchResult) {
  371. const timeDiff = new Date().getTime() - savedMatchResult.lastUpdate
  372. // 如果在1小时内,可以恢复结果
  373. if (timeDiff < 60 * 60 * 1000) {
  374. this.targetBirthDate = savedMatchResult.targetBirthDate
  375. this.targetBirthDateDisplay = savedMatchResult.targetBirthDate
  376. this.targetTimeIndex = savedMatchResult.targetTimeIndex
  377. this.targetTimeDisplay = this.timeRanges[savedMatchResult.targetTimeIndex]
  378. this.targetBaziData = savedMatchResult.targetBaziData
  379. this.matchResult = savedMatchResult.matchResult
  380. this.hasResult = true
  381. console.log('恢复之前的配对结果')
  382. }
  383. }
  384. }
  385. }
  386. </script>
  387. <style scoped>
  388. .bazi-match-container {
  389. min-height: 100vh;
  390. background: linear-gradient(135deg, #ff9a56 0%, #ff6b9d 100%);
  391. padding-bottom: 40rpx;
  392. }
  393. /* 自定义导航栏 */
  394. .custom-navbar {
  395. background: rgba(255, 255, 255, 0.1);
  396. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  397. position: fixed;
  398. top: 0;
  399. left: 0;
  400. right: 0;
  401. z-index: 100;
  402. }
  403. .navbar-content {
  404. display: flex;
  405. align-items: center;
  406. justify-content: space-between;
  407. height: 88rpx;
  408. padding: 0 30rpx;
  409. padding-top: 40rpx;
  410. }
  411. .navbar-left {
  412. width: 80rpx;
  413. height: 60rpx;
  414. display: flex;
  415. align-items: center;
  416. justify-content: center;
  417. }
  418. .back-icon {
  419. font-size: 36rpx;
  420. color: #ffffff;
  421. font-weight: bold;
  422. }
  423. .navbar-title {
  424. flex: 1;
  425. text-align: center;
  426. font-size: 36rpx;
  427. font-weight: bold;
  428. color: #ffffff;
  429. }
  430. .navbar-right {
  431. width: 80rpx;
  432. }
  433. /* 输入区域 */
  434. .input-section {
  435. padding: 40rpx 30rpx;
  436. padding-top: 168rpx;
  437. }
  438. .section-card {
  439. background: rgba(255, 255, 255, 0.95);
  440. border-radius: 24rpx;
  441. padding: 40rpx 30rpx;
  442. margin-bottom: 30rpx;
  443. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  444. }
  445. .section-title {
  446. font-size: 36rpx;
  447. font-weight: bold;
  448. color: #333333;
  449. margin-bottom: 30rpx;
  450. text-align: center;
  451. }
  452. /* 我的八字显示 */
  453. .my-bazi-info {
  454. text-align: center;
  455. }
  456. .bazi-display-mini {
  457. display: flex;
  458. justify-content: center;
  459. gap: 20rpx;
  460. margin-bottom: 20rpx;
  461. }
  462. .bazi-pillar-mini {
  463. text-align: center;
  464. }
  465. .pillar-value-mini {
  466. display: flex;
  467. flex-direction: column;
  468. align-items: center;
  469. gap: 8rpx;
  470. }
  471. .gan-mini,
  472. .zhi-mini {
  473. width: 50rpx;
  474. height: 50rpx;
  475. line-height: 50rpx;
  476. text-align: center;
  477. font-size: 28rpx;
  478. font-weight: bold;
  479. color: #ffffff;
  480. border-radius: 50%;
  481. }
  482. .gan-mini {
  483. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  484. }
  485. .zhi-mini {
  486. background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  487. }
  488. .bazi-info-text {
  489. font-size: 32rpx;
  490. color: #333333;
  491. font-weight: bold;
  492. }
  493. .no-bazi {
  494. text-align: center;
  495. padding: 60rpx 0;
  496. }
  497. .no-bazi-text {
  498. font-size: 32rpx;
  499. color: #999999;
  500. margin-bottom: 40rpx;
  501. display: block;
  502. }
  503. .go-bazi-btn {
  504. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  505. color: #ffffff;
  506. border: none;
  507. border-radius: 50rpx;
  508. height: 80rpx;
  509. padding: 0 60rpx;
  510. font-size: 32rpx;
  511. font-weight: bold;
  512. }
  513. /* 对方信息输入 */
  514. .input-group {
  515. margin-bottom: 40rpx;
  516. }
  517. .input-item {
  518. margin-bottom: 30rpx;
  519. }
  520. .input-label {
  521. font-size: 32rpx;
  522. font-weight: bold;
  523. color: #666666;
  524. display: block;
  525. margin-bottom: 20rpx;
  526. }
  527. .date-picker,
  528. .time-picker {
  529. width: 100%;
  530. }
  531. .picker-display {
  532. background: #f8f9fa;
  533. border: 2rpx solid #e9ecef;
  534. border-radius: 16rpx;
  535. padding: 24rpx 30rpx;
  536. font-size: 32rpx;
  537. color: #333333;
  538. text-align: center;
  539. }
  540. .match-btn {
  541. background: linear-gradient(135deg, #ff9a56 0%, #ff6b9d 100%);
  542. color: #ffffff;
  543. border: none;
  544. border-radius: 50rpx;
  545. height: 100rpx;
  546. font-size: 36rpx;
  547. font-weight: bold;
  548. width: 100%;
  549. }
  550. .match-btn[disabled] {
  551. background: #cccccc;
  552. color: #999999;
  553. }
  554. /* 结果区域 */
  555. .result-section {
  556. padding: 40rpx 30rpx;
  557. padding-top: 168rpx;
  558. }
  559. .match-overview-card,
  560. .detailed-analysis-card,
  561. .advantages-card,
  562. .challenges-card,
  563. .suggestions-card,
  564. .summary-card {
  565. background: rgba(255, 255, 255, 0.95);
  566. border-radius: 24rpx;
  567. padding: 40rpx 30rpx;
  568. margin-bottom: 30rpx;
  569. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  570. }
  571. /* 配对总览 */
  572. .match-score-display {
  573. text-align: center;
  574. margin-bottom: 40rpx;
  575. }
  576. .score-circle {
  577. width: 160rpx;
  578. height: 160rpx;
  579. border-radius: 50%;
  580. display: flex;
  581. flex-direction: column;
  582. align-items: center;
  583. justify-content: center;
  584. margin: 0 auto 20rpx;
  585. color: #ffffff;
  586. }
  587. .score-number {
  588. font-size: 56rpx;
  589. font-weight: bold;
  590. line-height: 1;
  591. }
  592. .score-unit {
  593. font-size: 24rpx;
  594. margin-top: 8rpx;
  595. }
  596. .match-level {
  597. font-size: 36rpx;
  598. font-weight: bold;
  599. color: #333333;
  600. }
  601. /* 八字对比 */
  602. .bazi-comparison {
  603. display: flex;
  604. align-items: center;
  605. padding: 30rpx;
  606. background: #f8f9fa;
  607. border-radius: 16rpx;
  608. }
  609. .comparison-item {
  610. flex: 1;
  611. text-align: center;
  612. }
  613. .comparison-label {
  614. font-size: 24rpx;
  615. color: #999999;
  616. margin-bottom: 10rpx;
  617. display: block;
  618. }
  619. .comparison-bazi {
  620. font-size: 28rpx;
  621. color: #333333;
  622. font-weight: bold;
  623. }
  624. .vs-divider {
  625. width: 80rpx;
  626. text-align: center;
  627. font-size: 32rpx;
  628. font-weight: bold;
  629. color: #ff6b9d;
  630. }
  631. /* 分析标签 */
  632. .analysis-tabs {
  633. display: flex;
  634. margin-bottom: 30rpx;
  635. background: #f0f0f0;
  636. border-radius: 16rpx;
  637. padding: 8rpx;
  638. }
  639. .tab-item {
  640. flex: 1;
  641. text-align: center;
  642. padding: 20rpx;
  643. font-size: 28rpx;
  644. color: #666666;
  645. border-radius: 12rpx;
  646. transition: all 0.3s ease;
  647. }
  648. .tab-item.active {
  649. background: linear-gradient(135deg, #ff9a56 0%, #ff6b9d 100%);
  650. color: #ffffff;
  651. font-weight: bold;
  652. }
  653. /* 分析内容 */
  654. .analysis-content {
  655. opacity: 1;
  656. }
  657. .match-item {
  658. padding: 30rpx;
  659. background: #f8f9fa;
  660. border-radius: 16rpx;
  661. }
  662. .match-header {
  663. display: flex;
  664. align-items: center;
  665. justify-content: space-between;
  666. margin-bottom: 20rpx;
  667. }
  668. .match-icon {
  669. font-size: 28rpx;
  670. margin-right: 16rpx;
  671. }
  672. .match-title {
  673. flex: 1;
  674. font-size: 32rpx;
  675. font-weight: bold;
  676. color: #333333;
  677. }
  678. .match-score {
  679. font-size: 30rpx;
  680. font-weight: bold;
  681. color: #ff6b9d;
  682. }
  683. .match-desc {
  684. font-size: 28rpx;
  685. color: #666666;
  686. line-height: 1.6;
  687. }
  688. /* 配对优势 */
  689. .advantages-list {
  690. display: flex;
  691. flex-direction: column;
  692. gap: 24rpx;
  693. }
  694. .advantage-item {
  695. display: flex;
  696. align-items: flex-start;
  697. gap: 20rpx;
  698. }
  699. .advantage-icon {
  700. font-size: 28rpx;
  701. margin-top: 6rpx;
  702. }
  703. .advantage-text {
  704. flex: 1;
  705. font-size: 28rpx;
  706. color: #333333;
  707. line-height: 1.6;
  708. }
  709. /* 挑战列表 */
  710. .challenges-list {
  711. display: flex;
  712. flex-direction: column;
  713. gap: 24rpx;
  714. }
  715. .challenge-item {
  716. display: flex;
  717. align-items: flex-start;
  718. gap: 20rpx;
  719. }
  720. .challenge-icon {
  721. font-size: 28rpx;
  722. margin-top: 6rpx;
  723. color: #ff6b9d;
  724. }
  725. .challenge-text {
  726. flex: 1;
  727. font-size: 28rpx;
  728. color: #333333;
  729. line-height: 1.6;
  730. }
  731. /* 建议列表 */
  732. .suggestions-list {
  733. display: flex;
  734. flex-direction: column;
  735. gap: 24rpx;
  736. }
  737. .suggestion-item {
  738. display: flex;
  739. align-items: flex-start;
  740. gap: 20rpx;
  741. }
  742. .suggestion-icon {
  743. font-size: 28rpx;
  744. margin-top: 6rpx;
  745. color: #4CAF50;
  746. }
  747. .suggestion-text {
  748. flex: 1;
  749. font-size: 28rpx;
  750. color: #333333;
  751. line-height: 1.6;
  752. }
  753. /* 总结文本 */
  754. .summary-text {
  755. font-size: 30rpx;
  756. color: #333333;
  757. line-height: 1.8;
  758. text-align: justify;
  759. }
  760. /* 重新配对按钮 */
  761. .retest-btn {
  762. background: rgba(255, 255, 255, 0.2);
  763. color: #ffffff;
  764. border: 2rpx solid rgba(255, 255, 255, 0.3);
  765. border-radius: 50rpx;
  766. height: 80rpx;
  767. line-height: 76rpx;
  768. text-align: center;
  769. font-size: 32rpx;
  770. font-weight: bold;
  771. margin: 40rpx 30rpx;
  772. }
  773. </style>