bazi.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074
  1. <template>
  2. <view class="bazi-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. <view class="section-card">
  16. <view class="section-title">📅 出生信息</view>
  17. <view class="input-group">
  18. <view class="input-item">
  19. <text class="input-label">出生日期</text>
  20. <picker
  21. mode="date"
  22. :value="birthDate"
  23. @change="onDateChange"
  24. class="date-picker"
  25. >
  26. <view class="picker-display">
  27. {{ birthDateDisplay }}
  28. </view>
  29. </picker>
  30. </view>
  31. <view class="input-item">
  32. <text class="input-label">出生时辰</text>
  33. <picker
  34. :range="timeRanges"
  35. :value="timeIndex"
  36. @change="onTimeChange"
  37. class="time-picker"
  38. >
  39. <view class="picker-display">
  40. {{ timeDisplay }}
  41. </view>
  42. </picker>
  43. </view>
  44. </view>
  45. <button class="calculate-btn" @click="calculateBazi">
  46. 开始测算
  47. </button>
  48. </view>
  49. </view>
  50. <!-- 结果区域 -->
  51. <view class="result-section" v-if="hasResult">
  52. <!-- 八字信息 -->
  53. <view class="bazi-info-card">
  54. <view class="section-title">🔮 您的八字</view>
  55. <view class="bazi-display">
  56. <view class="bazi-pillar" v-for="(pillar, key) in baziResult" :key="key">
  57. <view class="pillar-label">{{ getPillarLabel(key) }}</view>
  58. <view class="pillar-value">
  59. <text class="gan">{{ pillar.gan }}</text>
  60. <text class="zhi">{{ pillar.zhi }}</text>
  61. </view>
  62. <view class="pillar-wuxing">{{ pillar.wuxing }}</view>
  63. </view>
  64. </view>
  65. <view class="birth-info">
  66. <view class="info-item">
  67. <text class="info-icon">🐉</text>
  68. <text class="info-text">生肖:{{ birthInfo.shengxiao }}</text>
  69. </view>
  70. <view class="info-item">
  71. <text class="info-icon">🎵</text>
  72. <text class="info-text">纳音:{{ birthInfo.nayin }}</text>
  73. </view>
  74. <view class="info-item">
  75. <text class="info-icon">⚡</text>
  76. <text class="info-text">日主:{{ baziAnalysis.riganWuxing }}{{ getDayGan() }}</text>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 五行分析 -->
  81. <view class="wuxing-analysis-card">
  82. <view class="section-title">🔥 五行分析</view>
  83. <view class="wuxing-chart">
  84. <view
  85. class="wuxing-item"
  86. v-for="(count, wuxing) in baziAnalysis.analysis.wuxingCount"
  87. :key="wuxing"
  88. >
  89. <view class="wuxing-icon" :class="wuxing === '金' ? 'wuxing-jin' : wuxing === '木' ? 'wuxing-mu' : wuxing === '水' ? 'wuxing-shui' : wuxing === '火' ? 'wuxing-huo' : wuxing === '土' ? 'wuxing-tu' : 'wuxing-default'">{{ getWuxingIcon(wuxing) }}</view>
  90. <view class="wuxing-name">{{ wuxing }}</view>
  91. <view class="wuxing-count">{{ count }}</view>
  92. <view class="wuxing-bar">
  93. <view class="wuxing-progress" :style="{width: (count / 8) * 100 + '%'}"></view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <!-- 命理分析 -->
  99. <view class="analysis-card">
  100. <view class="section-title">📊 命理分析</view>
  101. <view class="analysis-content">
  102. <view class="analysis-item">
  103. <view class="analysis-header">
  104. <text class="analysis-icon">💪</text>
  105. <text class="analysis-title">日主强弱</text>
  106. </view>
  107. <text class="analysis-desc">{{ baziAnalysis.analysis.qiangRuo.type }}</text>
  108. <text class="analysis-detail">{{ baziAnalysis.analysis.qiangRuo.description }}</text>
  109. </view>
  110. <view class="analysis-item">
  111. <view class="analysis-header">
  112. <text class="analysis-icon">🌟</text>
  113. <text class="analysis-title">用神建议</text>
  114. </view>
  115. <text class="analysis-desc">{{ baziAnalysis.analysis.yongshen.primary }}</text>
  116. <text class="analysis-detail">{{ baziAnalysis.analysis.yongshen.description }}</text>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- 性格特征 -->
  121. <view class="personality-card">
  122. <view class="section-title">🎭 性格特征</view>
  123. <view class="personality-tags">
  124. <view
  125. class="personality-tag"
  126. v-for="(trait, index) in baziAnalysis.analysis.personality"
  127. :key="index"
  128. >
  129. {{ trait }}
  130. </view>
  131. </view>
  132. </view>
  133. <!-- 命理总结 -->
  134. <view class="summary-card">
  135. <view class="section-title">📝 命理总结</view>
  136. <text class="summary-text">{{ baziAnalysis.analysis.summary }}</text>
  137. </view>
  138. <!-- 验证信息 -->
  139. <view class="validation-card" v-if="baziAnalysis && baziAnalysis.validation">
  140. <view class="section-title">🔍 测算验证</view>
  141. <view class="validation-content">
  142. <view class="validation-status" :class="validationStatusClass">
  143. <text class="status-icon">{{ validationIcon }}</text>
  144. <text class="status-text">{{ validationText }}</text>
  145. </view>
  146. <view class="validation-details" v-if="baziAnalysis.validation.differences && baziAnalysis.validation.differences.length > 0">
  147. <text class="details-title">算法对比:</text>
  148. <view class="difference-item" v-for="(diff, index) in baziAnalysis.validation.differences" :key="index">
  149. <text class="difference-text">{{ diff }}</text>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. <!-- 专业版信息(极速数据API特有) -->
  155. <view class="professional-card" v-if="baziAnalysis && baziAnalysis.apiProvider === 'jisuapi'">
  156. <view class="section-title">🏆 专业版信息</view>
  157. <view class="professional-content">
  158. <!-- 个人信息 -->
  159. <view class="professional-section">
  160. <view class="section-subtitle">个人信息</view>
  161. <view class="info-grid">
  162. <view class="info-item" v-if="baziAnalysis.animal">
  163. <text class="info-icon">🐉</text>
  164. <text class="info-label">生肖:</text>
  165. <text class="info-value">{{ baziAnalysis.animal }}</text>
  166. </view>
  167. <view class="info-item" v-if="baziAnalysis.taiyuan">
  168. <text class="info-icon">🎭</text>
  169. <text class="info-label">胎元:</text>
  170. <text class="info-value">{{ baziAnalysis.taiyuan }}</text>
  171. </view>
  172. <view class="info-item" v-if="baziAnalysis.minggong">
  173. <text class="info-icon">🏠</text>
  174. <text class="info-label">命宫:</text>
  175. <text class="info-value">{{ baziAnalysis.minggong }}</text>
  176. </view>
  177. </view>
  178. </view>
  179. <!-- 农历信息 -->
  180. <view class="professional-section" v-if="baziAnalysis.lunar">
  181. <view class="section-subtitle">农历对照</view>
  182. <view class="lunar-info">
  183. <text class="lunar-text">
  184. 农历{{ baziAnalysis.lunar.year }}年{{ baziAnalysis.lunar.month }}月{{ baziAnalysis.lunar.day }}日{{ baziAnalysis.lunar.hour }}时
  185. </text>
  186. </view>
  187. </view>
  188. <!-- 节气信息 -->
  189. <view class="professional-section" v-if="baziAnalysis.jieqi">
  190. <view class="section-subtitle">节气信息</view>
  191. <view class="jieqi-info">
  192. <view class="jieqi-item" v-if="baziAnalysis.jieqi.prev">
  193. <text class="jieqi-label">上一节气:</text>
  194. <text class="jieqi-value">{{ baziAnalysis.jieqi.prev.jieqiname }} ({{ baziAnalysis.jieqi.prev.date }})</text>
  195. </view>
  196. <view class="jieqi-item" v-if="baziAnalysis.jieqi.next">
  197. <text class="jieqi-label">下一节气:</text>
  198. <text class="jieqi-value">{{ baziAnalysis.jieqi.next.jieqiname }} ({{ baziAnalysis.jieqi.next.date }})</text>
  199. </view>
  200. </view>
  201. </view>
  202. <!-- 神煞信息 -->
  203. <view class="professional-section" v-if="baziAnalysis.shensha && baziAnalysis.shensha.length > 0">
  204. <view class="section-subtitle">神煞分析</view>
  205. <view class="shensha-grid">
  206. <view class="shensha-group" v-for="(group, index) in baziAnalysis.shensha" :key="index">
  207. <view class="shensha-item" v-for="(shensha, idx) in group" :key="idx">
  208. {{ shensha }}
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. </view>
  214. </view>
  215. <!-- 建议指导 -->
  216. <view class="suggestions-card">
  217. <view class="section-title">💡 人生建议</view>
  218. <view class="suggestions-list">
  219. <view
  220. class="suggestion-item"
  221. v-for="(suggestion, index) in suggestions"
  222. :key="index"
  223. >
  224. <text class="suggestion-icon">✨</text>
  225. <text class="suggestion-text">{{ suggestion }}</text>
  226. </view>
  227. </view>
  228. </view>
  229. <!-- 配对入口 -->
  230. <view class="match-entry-card">
  231. <view class="section-title">💕 八字配对</view>
  232. <view class="match-entry-content">
  233. <view class="match-description">
  234. 想知道什么样的人与您最有缘分吗?点击下方开始八字配对测试!
  235. </view>
  236. <button class="match-btn" @click="goBaziMatch">
  237. 开始八字配对
  238. </button>
  239. </view>
  240. </view>
  241. <!-- 重新测算 -->
  242. <view class="retest-btn" @click="resetTest">
  243. 重新测算
  244. </view>
  245. </view>
  246. </view>
  247. </template>
  248. <script>
  249. import baziUtil from '@/utils/bazi.js'
  250. export default {
  251. data() {
  252. return {
  253. // 输入数据
  254. birthDate: '',
  255. birthDateDisplay: '请选择出生日期',
  256. timeIndex: 0,
  257. timeDisplay: '子时 (23:00-01:00)',
  258. // 时辰选择器数据
  259. timeRanges: [
  260. '子时 (23:00-01:00)',
  261. '丑时 (01:00-03:00)',
  262. '寅时 (03:00-05:00)',
  263. '卯时 (05:00-07:00)',
  264. '辰时 (07:00-09:00)',
  265. '巳时 (09:00-11:00)',
  266. '午时 (11:00-13:00)',
  267. '未时 (13:00-15:00)',
  268. '申时 (15:00-17:00)',
  269. '酉时 (17:00-19:00)',
  270. '戌时 (19:00-21:00)',
  271. '亥时 (21:00-23:00)'
  272. ],
  273. // 结果数据
  274. hasResult: false,
  275. baziResult: null,
  276. baziAnalysis: null,
  277. birthInfo: null,
  278. suggestions: []
  279. }
  280. },
  281. computed: {
  282. // 获取时辰对应的小时数
  283. selectedHour() {
  284. const hourMap = [23, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
  285. return hourMap[this.timeIndex]
  286. },
  287. // 验证状态样式类
  288. validationStatusClass() {
  289. if (!this.baziAnalysis || !this.baziAnalysis.validation) return ''
  290. const status = this.baziAnalysis.validation.status
  291. if (status === 'verified') return 'status-verified'
  292. if (status === 'api_corrected') return 'status-corrected'
  293. return 'status-local'
  294. },
  295. // 验证图标
  296. validationIcon() {
  297. if (!this.baziAnalysis || !this.baziAnalysis.validation) return '🔍'
  298. const status = this.baziAnalysis.validation.status
  299. if (status === 'verified') return '✅'
  300. if (status === 'api_corrected') return '🔧'
  301. return '💡'
  302. },
  303. // 验证文本
  304. validationText() {
  305. if (!this.baziAnalysis || !this.baziAnalysis.validation) return '本地算法'
  306. const validation = this.baziAnalysis.validation
  307. const accuracy = Math.round(validation.accuracy * 100)
  308. if (validation.status === 'verified') {
  309. return `专业API验证通过 (准确度${accuracy}%)`
  310. } else if (validation.status === 'api_corrected') {
  311. return `已使用专业API修正结果`
  312. } else {
  313. return `本地算法 (建议配置专业API)`
  314. }
  315. }
  316. },
  317. methods: {
  318. // 返回上一页
  319. goBack() {
  320. uni.navigateBack()
  321. },
  322. // 日期选择
  323. onDateChange(e) {
  324. this.birthDate = e.detail.value
  325. this.birthDateDisplay = e.detail.value
  326. },
  327. // 时辰选择
  328. onTimeChange(e) {
  329. this.timeIndex = e.detail.value
  330. this.timeDisplay = this.timeRanges[e.detail.value]
  331. },
  332. // 开始测算
  333. async calculateBazi() {
  334. if (!this.birthDate) {
  335. uni.showToast({
  336. title: '请选择出生日期',
  337. icon: 'none'
  338. })
  339. return
  340. }
  341. uni.showLoading({
  342. title: '测算中...',
  343. mask: true
  344. })
  345. try {
  346. console.log('开始八字测算')
  347. console.log('出生日期:', this.birthDate, '时辰:', this.timeDisplay)
  348. // 计算八字(使用增强版API + 本地算法)
  349. const birthDateObj = new Date(this.birthDate + ' 12:00:00')
  350. const baziData = await baziUtil.calculateEnhancedBaZi(birthDateObj, this.selectedHour)
  351. console.log('八字计算结果:', baziData)
  352. // 获取建议
  353. const suggestions = baziUtil.getBaziSuggestions(baziData)
  354. // 保存结果
  355. this.baziResult = {
  356. year: baziData.year,
  357. month: baziData.month,
  358. day: baziData.day,
  359. hour: baziData.hour
  360. }
  361. this.baziAnalysis = baziData
  362. this.birthInfo = baziData.birthInfo
  363. this.suggestions = suggestions
  364. this.hasResult = true
  365. console.log('八字测算完成')
  366. // 保存到本地存储
  367. uni.setStorageSync('baziResult', {
  368. birthDate: this.birthDate,
  369. timeIndex: this.timeIndex,
  370. baziData: baziData,
  371. lastUpdate: new Date().getTime()
  372. })
  373. } catch (error) {
  374. console.error('八字测算异常:', error)
  375. uni.showToast({
  376. title: '测算异常,请重试',
  377. icon: 'none'
  378. })
  379. } finally {
  380. uni.hideLoading()
  381. }
  382. },
  383. // 重新测算
  384. resetTest() {
  385. this.hasResult = false
  386. this.baziResult = null
  387. this.baziAnalysis = null
  388. this.birthInfo = null
  389. this.suggestions = []
  390. },
  391. // 跳转到八字配对
  392. goBaziMatch() {
  393. // 将当前八字数据传递给配对页面
  394. const baziData = {
  395. baziAnalysis: this.baziAnalysis,
  396. birthDate: this.birthDate,
  397. timeIndex: this.timeIndex
  398. }
  399. uni.navigateTo({
  400. url: '/pages/astrology/bazi-match',
  401. success: () => {
  402. // 通过事件或存储传递数据
  403. uni.setStorageSync('currentBazi', baziData)
  404. }
  405. })
  406. },
  407. // 获取柱标签
  408. getPillarLabel(key) {
  409. const labels = {
  410. 'year': '年柱',
  411. 'month': '月柱',
  412. 'day': '日柱',
  413. 'hour': '时柱'
  414. }
  415. return labels[key] || key
  416. },
  417. // 获取日干
  418. getDayGan() {
  419. return this.baziResult ? this.baziResult.day.gan : ''
  420. },
  421. // 获取五行图标
  422. getWuxingIcon(wuxing) {
  423. if (wuxing === '金') return '🔱'
  424. if (wuxing === '木') return '🌳'
  425. if (wuxing === '水') return '💧'
  426. if (wuxing === '火') return '🔥'
  427. if (wuxing === '土') return '🏔️'
  428. return '⚪'
  429. },
  430. },
  431. onLoad() {
  432. // 尝试恢复之前的计算结果
  433. const savedResult = uni.getStorageSync('baziResult')
  434. if (savedResult && savedResult.baziData) {
  435. const timeDiff = new Date().getTime() - savedResult.lastUpdate
  436. // 如果在1小时内,可以恢复结果
  437. if (timeDiff < 60 * 60 * 1000) {
  438. this.birthDate = savedResult.birthDate
  439. this.birthDateDisplay = savedResult.birthDate
  440. this.timeIndex = savedResult.timeIndex
  441. this.timeDisplay = this.timeRanges[savedResult.timeIndex]
  442. const baziData = savedResult.baziData
  443. this.baziResult = {
  444. year: baziData.year,
  445. month: baziData.month,
  446. day: baziData.day,
  447. hour: baziData.hour
  448. }
  449. this.baziAnalysis = baziData
  450. this.birthInfo = baziData.birthInfo
  451. this.suggestions = baziUtil.getBaziSuggestions(baziData)
  452. this.hasResult = true
  453. console.log('恢复之前的八字测算结果')
  454. }
  455. }
  456. }
  457. }
  458. </script>
  459. <style scoped>
  460. .bazi-container {
  461. min-height: 100vh;
  462. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  463. padding-bottom: 40rpx;
  464. }
  465. /* 自定义导航栏 */
  466. .custom-navbar {
  467. background: rgba(255, 255, 255, 0.1);
  468. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  469. position: fixed;
  470. top: 0;
  471. left: 0;
  472. right: 0;
  473. z-index: 100;
  474. }
  475. .navbar-content {
  476. display: flex;
  477. align-items: center;
  478. justify-content: space-between;
  479. height: 88rpx;
  480. padding: 0 30rpx;
  481. padding-top: 40rpx;
  482. }
  483. .navbar-left {
  484. width: 80rpx;
  485. height: 60rpx;
  486. display: flex;
  487. align-items: center;
  488. justify-content: center;
  489. }
  490. .back-icon {
  491. font-size: 36rpx;
  492. color: #ffffff;
  493. font-weight: bold;
  494. }
  495. .navbar-title {
  496. flex: 1;
  497. text-align: center;
  498. font-size: 36rpx;
  499. font-weight: bold;
  500. color: #ffffff;
  501. }
  502. .navbar-right {
  503. width: 80rpx;
  504. }
  505. /* 输入区域 */
  506. .input-section {
  507. padding: 40rpx 30rpx;
  508. padding-top: 168rpx;
  509. }
  510. .section-card {
  511. background: rgba(255, 255, 255, 0.95);
  512. border-radius: 24rpx;
  513. padding: 40rpx 30rpx;
  514. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  515. }
  516. .section-title {
  517. font-size: 36rpx;
  518. font-weight: bold;
  519. color: #333333;
  520. margin-bottom: 40rpx;
  521. text-align: center;
  522. }
  523. .input-group {
  524. margin-bottom: 60rpx;
  525. }
  526. .input-item {
  527. margin-bottom: 40rpx;
  528. }
  529. .input-label {
  530. font-size: 32rpx;
  531. font-weight: bold;
  532. color: #666666;
  533. display: block;
  534. margin-bottom: 20rpx;
  535. }
  536. .date-picker,
  537. .time-picker {
  538. width: 100%;
  539. }
  540. .picker-display {
  541. background: #f8f9fa;
  542. border: 2rpx solid #e9ecef;
  543. border-radius: 16rpx;
  544. padding: 24rpx 30rpx;
  545. font-size: 32rpx;
  546. color: #333333;
  547. text-align: center;
  548. }
  549. .calculate-btn {
  550. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  551. color: #ffffff;
  552. border: none;
  553. border-radius: 50rpx;
  554. height: 100rpx;
  555. font-size: 36rpx;
  556. font-weight: bold;
  557. margin-top: 40rpx;
  558. }
  559. /* 结果区域 */
  560. .result-section {
  561. padding: 40rpx 30rpx;
  562. padding-top: 168rpx;
  563. }
  564. .bazi-info-card,
  565. .wuxing-analysis-card,
  566. .analysis-card,
  567. .personality-card,
  568. .summary-card,
  569. .validation-card,
  570. .professional-card,
  571. .suggestions-card,
  572. .match-entry-card {
  573. background: rgba(255, 255, 255, 0.95);
  574. border-radius: 24rpx;
  575. padding: 40rpx 30rpx;
  576. margin-bottom: 30rpx;
  577. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  578. }
  579. /* 八字显示 */
  580. .bazi-display {
  581. display: flex;
  582. justify-content: space-between;
  583. margin-bottom: 40rpx;
  584. }
  585. .bazi-pillar {
  586. flex: 1;
  587. text-align: center;
  588. }
  589. .pillar-label {
  590. font-size: 24rpx;
  591. color: #999999;
  592. margin-bottom: 10rpx;
  593. }
  594. .pillar-value {
  595. margin-bottom: 10rpx;
  596. }
  597. .gan,
  598. .zhi {
  599. display: inline-block;
  600. width: 60rpx;
  601. height: 60rpx;
  602. line-height: 60rpx;
  603. text-align: center;
  604. font-size: 32rpx;
  605. font-weight: bold;
  606. color: #ffffff;
  607. border-radius: 50%;
  608. margin: 0 5rpx;
  609. }
  610. .gan {
  611. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  612. }
  613. .zhi {
  614. background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  615. }
  616. .pillar-wuxing {
  617. font-size: 24rpx;
  618. color: #666666;
  619. }
  620. .birth-info {
  621. padding-top: 30rpx;
  622. border-top: 1rpx solid #f0f0f0;
  623. }
  624. .info-item {
  625. display: flex;
  626. align-items: center;
  627. margin-bottom: 20rpx;
  628. }
  629. .info-icon {
  630. font-size: 28rpx;
  631. margin-right: 20rpx;
  632. }
  633. .info-text {
  634. font-size: 28rpx;
  635. color: #666666;
  636. }
  637. /* 五行分析 */
  638. .wuxing-chart {
  639. display: flex;
  640. flex-direction: column;
  641. gap: 24rpx;
  642. }
  643. .wuxing-item {
  644. display: flex;
  645. align-items: center;
  646. gap: 20rpx;
  647. }
  648. .wuxing-icon {
  649. width: 60rpx;
  650. height: 60rpx;
  651. line-height: 60rpx;
  652. text-align: center;
  653. font-size: 32rpx;
  654. border-radius: 50%;
  655. color: #ffffff;
  656. }
  657. .wuxing-jin { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); }
  658. .wuxing-mu { background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%); }
  659. .wuxing-shui { background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%); }
  660. .wuxing-huo { background: linear-gradient(135deg, #F44336 0%, #EF5350 100%); }
  661. .wuxing-tu { background: linear-gradient(135deg, #8BC34A 0%, #AED581 100%); }
  662. .wuxing-name {
  663. width: 60rpx;
  664. font-size: 28rpx;
  665. font-weight: bold;
  666. color: #333333;
  667. }
  668. .wuxing-count {
  669. width: 40rpx;
  670. font-size: 28rpx;
  671. color: #666666;
  672. text-align: center;
  673. }
  674. .wuxing-bar {
  675. flex: 1;
  676. height: 16rpx;
  677. background: #f0f0f0;
  678. border-radius: 8rpx;
  679. overflow: hidden;
  680. }
  681. .wuxing-progress {
  682. height: 100%;
  683. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  684. border-radius: 8rpx;
  685. transition: width 0.3s ease;
  686. }
  687. /* 命理分析 */
  688. .analysis-content {
  689. display: flex;
  690. flex-direction: column;
  691. gap: 30rpx;
  692. }
  693. .analysis-item {
  694. padding: 30rpx;
  695. background: #f8f9fa;
  696. border-radius: 16rpx;
  697. }
  698. .analysis-header {
  699. display: flex;
  700. align-items: center;
  701. margin-bottom: 20rpx;
  702. }
  703. .analysis-icon {
  704. font-size: 28rpx;
  705. margin-right: 16rpx;
  706. }
  707. .analysis-title {
  708. font-size: 32rpx;
  709. font-weight: bold;
  710. color: #333333;
  711. }
  712. .analysis-desc {
  713. font-size: 30rpx;
  714. font-weight: bold;
  715. color: #667eea;
  716. margin-bottom: 10rpx;
  717. }
  718. .analysis-detail {
  719. font-size: 28rpx;
  720. color: #666666;
  721. line-height: 1.6;
  722. }
  723. /* 性格特征 */
  724. .personality-tags {
  725. display: flex;
  726. flex-wrap: wrap;
  727. gap: 20rpx;
  728. }
  729. .personality-tag {
  730. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  731. color: #ffffff;
  732. padding: 16rpx 32rpx;
  733. border-radius: 40rpx;
  734. font-size: 28rpx;
  735. font-weight: bold;
  736. }
  737. /* 总结文本 */
  738. .summary-text {
  739. font-size: 30rpx;
  740. color: #333333;
  741. line-height: 1.8;
  742. text-align: justify;
  743. }
  744. /* 建议列表 */
  745. .suggestions-list {
  746. display: flex;
  747. flex-direction: column;
  748. gap: 24rpx;
  749. }
  750. .suggestion-item {
  751. display: flex;
  752. align-items: flex-start;
  753. gap: 20rpx;
  754. }
  755. .suggestion-icon {
  756. font-size: 28rpx;
  757. margin-top: 6rpx;
  758. }
  759. .suggestion-text {
  760. flex: 1;
  761. font-size: 28rpx;
  762. color: #666666;
  763. line-height: 1.6;
  764. }
  765. /* 配对入口 */
  766. .match-entry-content {
  767. text-align: center;
  768. }
  769. .match-description {
  770. font-size: 30rpx;
  771. color: #666666;
  772. line-height: 1.6;
  773. margin-bottom: 40rpx;
  774. }
  775. .match-btn {
  776. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  777. color: #ffffff;
  778. border: none;
  779. border-radius: 50rpx;
  780. height: 88rpx;
  781. font-size: 32rpx;
  782. font-weight: bold;
  783. }
  784. /* 验证信息 */
  785. .validation-content {
  786. text-align: center;
  787. }
  788. .validation-status {
  789. display: flex;
  790. align-items: center;
  791. justify-content: center;
  792. padding: 24rpx 30rpx;
  793. border-radius: 16rpx;
  794. margin-bottom: 20rpx;
  795. }
  796. .status-verified {
  797. background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  798. color: #ffffff;
  799. }
  800. .status-corrected {
  801. background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
  802. color: #ffffff;
  803. }
  804. .status-local {
  805. background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
  806. color: #ffffff;
  807. }
  808. .status-icon {
  809. font-size: 32rpx;
  810. margin-right: 16rpx;
  811. }
  812. .status-text {
  813. font-size: 28rpx;
  814. font-weight: bold;
  815. }
  816. .validation-details {
  817. margin-top: 20rpx;
  818. padding: 20rpx;
  819. background: #f8f9fa;
  820. border-radius: 12rpx;
  821. }
  822. .details-title {
  823. font-size: 26rpx;
  824. color: #666666;
  825. font-weight: bold;
  826. margin-bottom: 16rpx;
  827. display: block;
  828. }
  829. .difference-item {
  830. margin-bottom: 12rpx;
  831. }
  832. .difference-text {
  833. font-size: 24rpx;
  834. color: #999999;
  835. line-height: 1.4;
  836. }
  837. /* 专业版信息 */
  838. .professional-content {
  839. display: flex;
  840. flex-direction: column;
  841. gap: 30rpx;
  842. }
  843. .professional-section {
  844. padding: 25rpx;
  845. background: #f8f9fa;
  846. border-radius: 16rpx;
  847. }
  848. .section-subtitle {
  849. font-size: 30rpx;
  850. font-weight: bold;
  851. color: #667eea;
  852. margin-bottom: 20rpx;
  853. text-align: center;
  854. }
  855. .info-grid {
  856. display: flex;
  857. flex-direction: column;
  858. gap: 15rpx;
  859. }
  860. .info-item {
  861. display: flex;
  862. align-items: center;
  863. gap: 15rpx;
  864. }
  865. .info-icon {
  866. font-size: 24rpx;
  867. width: 30rpx;
  868. }
  869. .info-label {
  870. font-size: 28rpx;
  871. color: #666666;
  872. font-weight: bold;
  873. min-width: 80rpx;
  874. }
  875. .info-value {
  876. font-size: 28rpx;
  877. color: #333333;
  878. font-weight: bold;
  879. }
  880. .lunar-info {
  881. text-align: center;
  882. }
  883. .lunar-text {
  884. font-size: 30rpx;
  885. color: #667eea;
  886. font-weight: bold;
  887. }
  888. .jieqi-info {
  889. display: flex;
  890. flex-direction: column;
  891. gap: 12rpx;
  892. }
  893. .jieqi-item {
  894. display: flex;
  895. justify-content: space-between;
  896. align-items: center;
  897. }
  898. .jieqi-label {
  899. font-size: 26rpx;
  900. color: #666666;
  901. }
  902. .jieqi-value {
  903. font-size: 26rpx;
  904. color: #333333;
  905. font-weight: bold;
  906. }
  907. .shensha-grid {
  908. display: flex;
  909. flex-direction: column;
  910. gap: 15rpx;
  911. }
  912. .shensha-group {
  913. display: flex;
  914. flex-wrap: wrap;
  915. gap: 10rpx;
  916. }
  917. .shensha-item {
  918. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  919. color: #ffffff;
  920. padding: 8rpx 16rpx;
  921. border-radius: 20rpx;
  922. font-size: 24rpx;
  923. font-weight: bold;
  924. }
  925. /* 重新测算按钮 */
  926. .retest-btn {
  927. background: rgba(255, 255, 255, 0.2);
  928. color: #ffffff;
  929. border: 2rpx solid rgba(255, 255, 255, 0.3);
  930. border-radius: 50rpx;
  931. height: 80rpx;
  932. line-height: 76rpx;
  933. text-align: center;
  934. font-size: 32rpx;
  935. font-weight: bold;
  936. margin: 40rpx 30rpx;
  937. }
  938. </style>