bazi.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073
  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: uni.getStorageSync("userInfo").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. // 计算八字(使用增强版API + 本地算法)
  347. const birthDateObj = new Date(this.birthDate + ' 12:00:00')
  348. const baziData = await baziUtil.calculateEnhancedBaZi(birthDateObj, this.selectedHour)
  349. // 获取建议
  350. const suggestions = baziUtil.getBaziSuggestions(baziData)
  351. // 保存结果
  352. this.baziResult = {
  353. year: baziData.year,
  354. month: baziData.month,
  355. day: baziData.day,
  356. hour: baziData.hour
  357. }
  358. this.baziAnalysis = baziData
  359. this.birthInfo = baziData.birthInfo
  360. this.suggestions = suggestions
  361. this.hasResult = true
  362. // 保存到本地存储
  363. uni.setStorageSync('baziResult', {
  364. birthDate: this.birthDate,
  365. timeIndex: this.timeIndex,
  366. baziData: baziData,
  367. lastUpdate: new Date().getTime()
  368. })
  369. } catch (error) {
  370. uni.showToast({
  371. title: '测算异常,请重试',
  372. icon: 'none'
  373. })
  374. } finally {
  375. uni.hideLoading()
  376. }
  377. },
  378. // 重新测算
  379. resetTest() {
  380. this.hasResult = false
  381. this.baziResult = null
  382. this.baziAnalysis = null
  383. this.birthInfo = null
  384. this.suggestions = []
  385. },
  386. // 跳转到八字配对
  387. goBaziMatch() {
  388. // 将当前八字数据传递给配对页面
  389. const baziData = {
  390. baziAnalysis: this.baziAnalysis,
  391. birthDate: this.birthDate,
  392. timeIndex: this.timeIndex
  393. }
  394. uni.navigateTo({
  395. url: '/pages/astrology/bazi-match',
  396. success: () => {
  397. // 通过事件或存储传递数据
  398. uni.setStorageSync('currentBazi', baziData)
  399. }
  400. })
  401. },
  402. // 获取柱标签
  403. getPillarLabel(key) {
  404. const labels = {
  405. 'year': '年柱',
  406. 'month': '月柱',
  407. 'day': '日柱',
  408. 'hour': '时柱'
  409. }
  410. return labels[key] || key
  411. },
  412. // 获取日干
  413. getDayGan() {
  414. return this.baziResult ? this.baziResult.day.gan : ''
  415. },
  416. // 获取五行图标
  417. getWuxingIcon(wuxing) {
  418. if (wuxing === '金') return '🔱'
  419. if (wuxing === '木') return '🌳'
  420. if (wuxing === '水') return '💧'
  421. if (wuxing === '火') return '🔥'
  422. if (wuxing === '土') return '🏔️'
  423. return '⚪'
  424. },
  425. },
  426. onLoad() {
  427. // 尝试恢复之前的计算结果
  428. const savedResult = uni.getStorageSync('baziResult')
  429. if (savedResult && savedResult.baziData) {
  430. const timeDiff = new Date().getTime() - savedResult.lastUpdate
  431. // 如果在1小时内,可以恢复结果
  432. if (timeDiff < 60 * 60 * 1000) {
  433. this.birthDate = savedResult.birthDate
  434. this.birthDateDisplay = savedResult.birthDate
  435. this.timeIndex = savedResult.timeIndex
  436. this.timeDisplay = this.timeRanges[savedResult.timeIndex]
  437. const baziData = savedResult.baziData
  438. this.baziResult = {
  439. year: baziData.year,
  440. month: baziData.month,
  441. day: baziData.day,
  442. hour: baziData.hour
  443. }
  444. this.baziAnalysis = baziData
  445. this.birthInfo = baziData.birthInfo
  446. this.suggestions = baziUtil.getBaziSuggestions(baziData)
  447. this.hasResult = true
  448. }
  449. }
  450. }
  451. }
  452. </script>
  453. <style scoped>
  454. .bazi-container {
  455. min-height: 100vh;
  456. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  457. padding-bottom: 40rpx;
  458. }
  459. /* 自定义导航栏 */
  460. .custom-navbar {
  461. background: rgba(255, 255, 255, 0.1);
  462. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  463. position: fixed;
  464. top: 0;
  465. left: 0;
  466. right: 0;
  467. z-index: 100;
  468. }
  469. .navbar-content {
  470. display: flex;
  471. align-items: center;
  472. justify-content: space-between;
  473. height: 88rpx;
  474. padding: 0 30rpx;
  475. padding-top: 40rpx;
  476. }
  477. .navbar-left {
  478. width: 80rpx;
  479. height: 60rpx;
  480. display: flex;
  481. align-items: center;
  482. justify-content: center;
  483. }
  484. .back-icon {
  485. font-size: 36rpx;
  486. color: #ffffff;
  487. font-weight: bold;
  488. }
  489. .navbar-title {
  490. flex: 1;
  491. text-align: center;
  492. font-size: 36rpx;
  493. font-weight: bold;
  494. color: #ffffff;
  495. }
  496. .navbar-right {
  497. width: 80rpx;
  498. }
  499. /* 输入区域 */
  500. .input-section {
  501. padding: 40rpx 30rpx;
  502. padding-top: 168rpx;
  503. }
  504. .section-card {
  505. background: rgba(255, 255, 255, 0.95);
  506. border-radius: 24rpx;
  507. padding: 40rpx 30rpx;
  508. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  509. }
  510. .section-title {
  511. font-size: 36rpx;
  512. font-weight: bold;
  513. color: #333333;
  514. margin-bottom: 40rpx;
  515. text-align: center;
  516. }
  517. .input-group {
  518. margin-bottom: 60rpx;
  519. }
  520. .input-item {
  521. margin-bottom: 40rpx;
  522. }
  523. .input-label {
  524. font-size: 32rpx;
  525. font-weight: bold;
  526. color: #666666;
  527. display: block;
  528. margin-bottom: 20rpx;
  529. }
  530. .date-picker,
  531. .time-picker {
  532. width: 100%;
  533. }
  534. .picker-display {
  535. background: #f8f9fa;
  536. border: 2rpx solid #e9ecef;
  537. border-radius: 16rpx;
  538. padding: 24rpx 30rpx;
  539. font-size: 32rpx;
  540. color: #333333;
  541. text-align: center;
  542. }
  543. .calculate-btn {
  544. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  545. color: #ffffff;
  546. border: none;
  547. border-radius: 50rpx;
  548. height: 100rpx;
  549. font-size: 36rpx;
  550. font-weight: bold;
  551. margin-top: 40rpx;
  552. }
  553. /* 结果区域 */
  554. .result-section {
  555. padding: 40rpx 30rpx;
  556. padding-top: 168rpx;
  557. }
  558. .bazi-info-card,
  559. .wuxing-analysis-card,
  560. .analysis-card,
  561. .personality-card,
  562. .summary-card,
  563. .validation-card,
  564. .professional-card,
  565. .suggestions-card,
  566. .match-entry-card {
  567. background: rgba(255, 255, 255, 0.95);
  568. border-radius: 24rpx;
  569. padding: 40rpx 30rpx;
  570. margin-bottom: 30rpx;
  571. box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.1);
  572. }
  573. /* 八字显示 */
  574. .bazi-display {
  575. display: flex;
  576. justify-content: space-between;
  577. margin-bottom: 40rpx;
  578. }
  579. .bazi-pillar {
  580. flex: 1;
  581. text-align: center;
  582. }
  583. .pillar-label {
  584. font-size: 24rpx;
  585. color: #999999;
  586. margin-bottom: 10rpx;
  587. }
  588. .pillar-value {
  589. margin-bottom: 10rpx;
  590. }
  591. .gan,
  592. .zhi {
  593. display: inline-block;
  594. width: 60rpx;
  595. height: 60rpx;
  596. line-height: 60rpx;
  597. text-align: center;
  598. font-size: 32rpx;
  599. font-weight: bold;
  600. color: #ffffff;
  601. border-radius: 50%;
  602. margin: 0 5rpx;
  603. }
  604. .gan {
  605. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  606. }
  607. .zhi {
  608. background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  609. }
  610. .pillar-wuxing {
  611. font-size: 24rpx;
  612. color: #666666;
  613. }
  614. .birth-info {
  615. padding-top: 30rpx;
  616. border-top: 1rpx solid #f0f0f0;
  617. }
  618. .info-item {
  619. display: flex;
  620. align-items: center;
  621. margin-bottom: 20rpx;
  622. }
  623. .info-icon {
  624. font-size: 28rpx;
  625. margin-right: 20rpx;
  626. }
  627. .info-text {
  628. font-size: 28rpx;
  629. color: #666666;
  630. }
  631. /* 五行分析 */
  632. .wuxing-chart {
  633. display: flex;
  634. flex-direction: column;
  635. gap: 24rpx;
  636. }
  637. .wuxing-item {
  638. display: flex;
  639. align-items: center;
  640. gap: 20rpx;
  641. }
  642. .wuxing-icon {
  643. width: 60rpx;
  644. height: 60rpx;
  645. line-height: 60rpx;
  646. text-align: center;
  647. font-size: 32rpx;
  648. border-radius: 50%;
  649. color: #ffffff;
  650. }
  651. .wuxing-jin { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); }
  652. .wuxing-mu { background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%); }
  653. .wuxing-shui { background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%); }
  654. .wuxing-huo { background: linear-gradient(135deg, #F44336 0%, #EF5350 100%); }
  655. .wuxing-tu { background: linear-gradient(135deg, #8BC34A 0%, #AED581 100%); }
  656. .wuxing-name {
  657. width: 60rpx;
  658. font-size: 28rpx;
  659. font-weight: bold;
  660. color: #333333;
  661. }
  662. .wuxing-count {
  663. width: 40rpx;
  664. font-size: 28rpx;
  665. color: #666666;
  666. text-align: center;
  667. }
  668. .wuxing-bar {
  669. flex: 1;
  670. height: 16rpx;
  671. background: #f0f0f0;
  672. border-radius: 8rpx;
  673. overflow: hidden;
  674. }
  675. .wuxing-progress {
  676. height: 100%;
  677. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  678. border-radius: 8rpx;
  679. transition: width 0.3s ease;
  680. }
  681. /* 命理分析 */
  682. .analysis-content {
  683. display: flex;
  684. flex-direction: column;
  685. gap: 30rpx;
  686. }
  687. .analysis-item {
  688. padding: 30rpx;
  689. background: #f8f9fa;
  690. border-radius: 16rpx;
  691. }
  692. .analysis-header {
  693. display: flex;
  694. align-items: center;
  695. margin-bottom: 20rpx;
  696. }
  697. .analysis-icon {
  698. font-size: 28rpx;
  699. margin-right: 16rpx;
  700. }
  701. .analysis-title {
  702. font-size: 32rpx;
  703. font-weight: bold;
  704. color: #333333;
  705. }
  706. .analysis-desc {
  707. font-size: 30rpx;
  708. font-weight: bold;
  709. color: #667eea;
  710. margin-bottom: 10rpx;
  711. }
  712. .analysis-detail {
  713. font-size: 28rpx;
  714. color: #666666;
  715. line-height: 1.6;
  716. }
  717. /* 性格特征 */
  718. .personality-tags {
  719. display: flex;
  720. flex-wrap: wrap;
  721. gap: 20rpx;
  722. }
  723. .personality-tag {
  724. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  725. color: #ffffff;
  726. padding: 16rpx 32rpx;
  727. border-radius: 40rpx;
  728. font-size: 28rpx;
  729. font-weight: bold;
  730. }
  731. /* 总结文本 */
  732. .summary-text {
  733. font-size: 30rpx;
  734. color: #333333;
  735. line-height: 1.8;
  736. text-align: justify;
  737. }
  738. /* 建议列表 */
  739. .suggestions-list {
  740. display: flex;
  741. flex-direction: column;
  742. gap: 24rpx;
  743. }
  744. .suggestion-item {
  745. display: flex;
  746. align-items: flex-start;
  747. gap: 20rpx;
  748. }
  749. .suggestion-icon {
  750. font-size: 28rpx;
  751. margin-top: 6rpx;
  752. }
  753. .suggestion-text {
  754. flex: 1;
  755. font-size: 28rpx;
  756. color: #666666;
  757. line-height: 1.6;
  758. }
  759. /* 配对入口 */
  760. .match-entry-content {
  761. text-align: center;
  762. }
  763. .match-description {
  764. font-size: 30rpx;
  765. color: #666666;
  766. line-height: 1.6;
  767. margin-bottom: 40rpx;
  768. }
  769. .match-btn {
  770. background: linear-gradient(135deg, #FF6B9D 0%, #FFA5C6 100%);
  771. color: #ffffff;
  772. border: none;
  773. border-radius: 50rpx;
  774. height: 88rpx;
  775. font-size: 32rpx;
  776. font-weight: bold;
  777. }
  778. /* 验证信息 */
  779. .validation-content {
  780. text-align: center;
  781. }
  782. .validation-status {
  783. display: flex;
  784. align-items: center;
  785. justify-content: center;
  786. padding: 24rpx 30rpx;
  787. border-radius: 16rpx;
  788. margin-bottom: 20rpx;
  789. }
  790. .status-verified {
  791. background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
  792. color: #ffffff;
  793. }
  794. .status-corrected {
  795. background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
  796. color: #ffffff;
  797. }
  798. .status-local {
  799. background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
  800. color: #ffffff;
  801. }
  802. .status-icon {
  803. font-size: 32rpx;
  804. margin-right: 16rpx;
  805. }
  806. .status-text {
  807. font-size: 28rpx;
  808. font-weight: bold;
  809. }
  810. .validation-details {
  811. margin-top: 20rpx;
  812. padding: 20rpx;
  813. background: #f8f9fa;
  814. border-radius: 12rpx;
  815. }
  816. .details-title {
  817. font-size: 26rpx;
  818. color: #666666;
  819. font-weight: bold;
  820. margin-bottom: 16rpx;
  821. display: block;
  822. }
  823. .difference-item {
  824. margin-bottom: 12rpx;
  825. }
  826. .difference-text {
  827. font-size: 24rpx;
  828. color: #999999;
  829. line-height: 1.4;
  830. }
  831. /* 专业版信息 */
  832. .professional-content {
  833. display: flex;
  834. flex-direction: column;
  835. gap: 30rpx;
  836. }
  837. .professional-section {
  838. padding: 25rpx;
  839. background: #f8f9fa;
  840. border-radius: 16rpx;
  841. }
  842. .section-subtitle {
  843. font-size: 30rpx;
  844. font-weight: bold;
  845. color: #667eea;
  846. margin-bottom: 20rpx;
  847. text-align: center;
  848. }
  849. .info-grid {
  850. display: flex;
  851. flex-direction: column;
  852. gap: 15rpx;
  853. }
  854. .info-item {
  855. display: flex;
  856. align-items: center;
  857. gap: 15rpx;
  858. }
  859. .info-icon {
  860. font-size: 24rpx;
  861. width: 30rpx;
  862. }
  863. .info-label {
  864. font-size: 28rpx;
  865. color: #666666;
  866. font-weight: bold;
  867. min-width: 80rpx;
  868. }
  869. .info-value {
  870. font-size: 28rpx;
  871. color: #333333;
  872. font-weight: bold;
  873. }
  874. .lunar-info {
  875. text-align: center;
  876. }
  877. .lunar-text {
  878. font-size: 30rpx;
  879. color: #667eea;
  880. font-weight: bold;
  881. }
  882. .jieqi-info {
  883. display: flex;
  884. flex-direction: column;
  885. gap: 12rpx;
  886. }
  887. .jieqi-item {
  888. display: flex;
  889. justify-content: space-between;
  890. align-items: center;
  891. }
  892. .jieqi-label {
  893. font-size: 26rpx;
  894. color: #666666;
  895. }
  896. .jieqi-value {
  897. font-size: 26rpx;
  898. color: #333333;
  899. font-weight: bold;
  900. }
  901. .shensha-grid {
  902. display: flex;
  903. flex-direction: column;
  904. gap: 15rpx;
  905. }
  906. .shensha-group {
  907. display: flex;
  908. flex-wrap: wrap;
  909. gap: 10rpx;
  910. }
  911. .shensha-item {
  912. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  913. color: #ffffff;
  914. padding: 8rpx 16rpx;
  915. border-radius: 20rpx;
  916. font-size: 24rpx;
  917. font-weight: bold;
  918. }
  919. /* 重新测算按钮 */
  920. .retest-btn {
  921. background: rgba(255, 255, 255, 0.2);
  922. color: #ffffff;
  923. border: 2rpx solid rgba(255, 255, 255, 0.3);
  924. border-radius: 50rpx;
  925. height: 80rpx;
  926. line-height: 76rpx;
  927. text-align: center;
  928. font-size: 32rpx;
  929. font-weight: bold;
  930. margin: 40rpx 30rpx;
  931. }
  932. </style>