report-upload.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. <template>
  2. <view class="page">
  3. <view class="header">
  4. <view class="back-btn" @click="goBack">
  5. <text class="back-icon">&#x2190;</text>
  6. <text class="back-text">返回</text>
  7. </view>
  8. <text class="header-title">DAN 报告上传</text>
  9. </view>
  10. <!-- Step 1: 选择维度 + 选择文件 -->
  11. <view class="section" v-if="step === 1">
  12. <view class="dimension-select">
  13. <text class="dimension-label">报告类型</text>
  14. <view class="dimension-options">
  15. <view
  16. v-for="item in dimensionOptions"
  17. :key="item.code"
  18. :class="['dimension-option', dimension === item.code ? 'active' : '']"
  19. @click="selectDimension(item.code)">
  20. <text class="dimension-name">{{ item.label }}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 购买推荐 -->
  25. <view class="purchase-section" v-if="recommendedProducts.length > 0">
  26. <view class="purchase-header">
  27. <text class="purchase-icon">📦</text>
  28. <text class="purchase-title">为家人购买检测服务</text>
  29. </view>
  30. <scroll-view class="purchase-scroll" scroll-x enable-flex show-scrollbar="false">
  31. <view
  32. class="purchase-card"
  33. v-for="item in recommendedProducts"
  34. :key="item.id"
  35. @click="goToProduct(item.id)"
  36. >
  37. <image class="purchase-cover" :src="getImageUrl(item.coverImage) || '/static/default-product.png'" mode="aspectFill" />
  38. <text class="purchase-name">{{ item.name }}</text>
  39. <text class="purchase-price">{{ formatPriceWithSymbol(item.price) }}</text>
  40. <view class="purchase-btn">
  41. <text class="purchase-btn-text">去购买</text>
  42. </view>
  43. </view>
  44. </scroll-view>
  45. </view>
  46. <view class="upload-area" @click="chooseFile">
  47. <view class="upload-icon" v-if="!selectedFile">&#x1F4C4;</view>
  48. <view class="upload-icon" v-else>&#x2705;</view>
  49. <text class="upload-text" v-if="!selectedFile">点击上传 PDF 文件</text>
  50. <text class="upload-text" v-else>{{ selectedFile.name }}</text>
  51. <text class="upload-hint">支持 PDF 格式的 DAN 测评报告</text>
  52. </view>
  53. <view class="action-bar">
  54. <view class="upload-btn" @click="startUpload" v-if="selectedFile">
  55. <text class="upload-btn-text">上传并解析</text>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- Step 2: 预览解析结果 -->
  60. <view class="section" v-if="step === 2">
  61. <view class="preview-header">
  62. <text class="preview-title">解析预览</text>
  63. <text class="preview-desc">请确认以下数据是否准确</text>
  64. </view>
  65. <view class="preview-card" v-if="previewData">
  66. <view class="preview-row">
  67. <text class="preview-label">维度</text>
  68. <text class="preview-value">{{ dimensionLabel }}</text>
  69. </view>
  70. <view class="preview-row">
  71. <text class="preview-label">解析概要</text>
  72. <text class="preview-value">{{ previewData.summary || '无' }}</text>
  73. </view>
  74. </view>
  75. <!-- 解析项列表 -->
  76. <view class="items-section" v-if="previewData && previewData.items && previewData.items.length > 0">
  77. <text class="items-title">数据项 ({{ previewData.items.length }})</text>
  78. <view class="item-card" v-for="(item, idx) in previewData.items" :key="idx">
  79. <view class="item-header">
  80. <text class="item-name">{{ item.name || item.code }}</text>
  81. <text class="item-category">{{ item.category }}</text>
  82. </view>
  83. <view class="item-value-bar">
  84. <view class="item-value-fill" :style="'width:' + item.value + '%'"></view>
  85. </view>
  86. <text class="item-value-text">{{ item.value }}/100</text>
  87. </view>
  88. </view>
  89. <!-- 建议 -->
  90. <view class="suggestions-card" v-if="previewData && previewData.suggestions">
  91. <text class="suggestions-title">成长建议</text>
  92. <text class="suggestions-text">{{ previewData.suggestions }}</text>
  93. </view>
  94. <view class="action-bar">
  95. <view class="confirm-btn" @click="doConfirm" v-if="!confirming">
  96. <text class="confirm-btn-text">确认并保存</text>
  97. </view>
  98. <view class="confirm-btn disabled" v-else>
  99. <text class="confirm-btn-text">保存中...</text>
  100. </view>
  101. <view class="retry-btn" @click="resetUpload">
  102. <text class="retry-btn-text">重新上传</text>
  103. </view>
  104. </view>
  105. </view>
  106. <!-- Step 3: 完成 -->
  107. <view class="section" v-if="step === 3">
  108. <view class="success-card">
  109. <text class="success-icon">&#x2705;</text>
  110. <text class="success-title">报告已保存</text>
  111. <text class="success-desc">DAN 测评数据已更新至五维能量体系</text>
  112. <text class="success-desc" v-if="planId">成长方案已自动生成,请确认后分解为每日任务</text>
  113. </view>
  114. <view class="action-bar">
  115. <view class="upload-btn" @click="goToPlan" v-if="planId">
  116. <text class="upload-btn-text">查看成长方案</text>
  117. </view>
  118. <view class="retry-btn" @click="goToResult" v-if="linkedResultId">
  119. <text class="retry-btn-text">查看测评结果</text>
  120. </view>
  121. <view class="retry-btn" @click="goBack">
  122. <text class="retry-btn-text">返回</text>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- Loading -->
  127. <view class="loading-overlay" v-if="loading">
  128. <view class="loading-box">
  129. <text class="loading-text">解析中...</text>
  130. </view>
  131. </view>
  132. </view>
  133. </template>
  134. <script>
  135. import { danParsePreview, danConfirmReport, productList } from '../../utils/api.js'
  136. import config from '@/config.js'
  137. var REPORT_DOMAIN_MAP = {
  138. mind: 'mind',
  139. wisdom: 'wisdom',
  140. cognition: 'wisdom',
  141. learning: 'wisdom',
  142. behavior: 'mind',
  143. career: 'wisdom',
  144. campus: 'wisdom',
  145. adolescent: 'mind'
  146. }
  147. var DIMENSION_OPTIONS = [
  148. { code: 'mind', label: '心维度 (A2)' },
  149. { code: 'wisdom', label: '智维度 (B4)' },
  150. { code: 'cognition', label: '认知能力' },
  151. { code: 'learning', label: '学习力' },
  152. { code: 'behavior', label: '行为' },
  153. { code: 'career', label: '生涯' },
  154. { code: 'campus', label: '校园' },
  155. { code: 'adolescent', label: '青春期' }
  156. ]
  157. export default {
  158. data() {
  159. return {
  160. step: 1,
  161. dimension: 'mind',
  162. dimensionOptions: DIMENSION_OPTIONS,
  163. selectedFile: null,
  164. previewData: null,
  165. draftId: null,
  166. planId: null,
  167. linkedResultId: null,
  168. loading: false,
  169. confirming: false,
  170. recommendedProducts: [],
  171. loadingProducts: false
  172. }
  173. },
  174. computed: {
  175. dimensionLabel: function() {
  176. for (var i = 0; i < this.dimensionOptions.length; i++) {
  177. if (this.dimensionOptions[i].code === this.dimension) {
  178. return this.dimensionOptions[i].label
  179. }
  180. }
  181. return this.dimension || 'DAN 测评'
  182. }
  183. },
  184. onLoad: function(options) {
  185. var validCodes = DIMENSION_OPTIONS.map(function(d) { return d.code })
  186. if (options && options.dimension && validCodes.indexOf(options.dimension) >= 0) {
  187. this.dimension = options.dimension
  188. }
  189. if (options && options.resume === '1') {
  190. this.resumeFromUnifiedUpload()
  191. }
  192. this.loadRecommendProducts(this.dimension)
  193. },
  194. methods: {
  195. resumeFromUnifiedUpload: function() {
  196. var cached = null
  197. try {
  198. cached = uni.getStorageSync('danUploadPreview')
  199. uni.removeStorageSync('danUploadPreview')
  200. } catch (e) {}
  201. if (!cached || !cached.draftId) {
  202. uni.showToast({ title: '预览数据失效,请重新上传', icon: 'none' })
  203. return
  204. }
  205. if (cached.dimension) {
  206. this.dimension = cached.dimension
  207. }
  208. this.draftId = cached.draftId
  209. this.previewData = cached.previewData || {}
  210. if (!this.previewData.items && this.previewData.itemsJson) {
  211. try {
  212. this.previewData.items = typeof this.previewData.itemsJson === 'string'
  213. ? JSON.parse(this.previewData.itemsJson)
  214. : this.previewData.itemsJson
  215. } catch (e) {
  216. this.previewData.items = []
  217. }
  218. }
  219. this.step = 2
  220. },
  221. goBack: function() {
  222. uni.navigateBack()
  223. },
  224. chooseFile: function() {
  225. var self = this
  226. uni.chooseMessageFile({
  227. count: 1,
  228. type: 'file',
  229. extension: ['pdf'],
  230. success: function(res) {
  231. if (res.tempFiles && res.tempFiles.length > 0) {
  232. self.selectedFile = res.tempFiles[0]
  233. }
  234. },
  235. fail: function() {
  236. // 降级:使用相册/相机
  237. uni.chooseImage({
  238. count: 1,
  239. success: function(res) {
  240. if (res.tempFiles && res.tempFiles.length > 0) {
  241. self.selectedFile = res.tempFiles[0]
  242. }
  243. }
  244. })
  245. }
  246. })
  247. },
  248. startUpload: function() {
  249. if (this.loading) return
  250. if (!this.selectedFile) return
  251. var self = this
  252. self.loading = true
  253. var memberId = this.$store.state && this.$store.state.currentChildId
  254. ? this.$store.state.currentChildId
  255. : uni.getStorageSync('currentChildId')
  256. danParsePreview(self.selectedFile.path || self.selectedFile.tempFilePath, self.dimension, memberId)
  257. .then(function(res) {
  258. self.loading = false
  259. if (res.code === 200 && res.data) {
  260. self.previewData = res.data
  261. self.draftId = res.data.draftId
  262. self.step = 2
  263. } else {
  264. uni.showToast({ title: res.message || '解析失败', icon: 'none' })
  265. }
  266. })
  267. .catch(function(err) {
  268. self.loading = false
  269. uni.showToast({ title: err && err.message ? err.message : '上传失败', icon: 'none' })
  270. })
  271. },
  272. doConfirm: function() {
  273. if (this.confirming) return
  274. var self = this
  275. self.confirming = true
  276. var memberId = this.$store.state && this.$store.state.currentChildId
  277. ? this.$store.state.currentChildId
  278. : uni.getStorageSync('currentChildId')
  279. danConfirmReport({
  280. draftId: self.draftId,
  281. dimension: self.dimension,
  282. memberId: memberId
  283. })
  284. .then(function(res) {
  285. self.confirming = false
  286. if (res.code === 200) {
  287. var data = res.data || {}
  288. self.planId = data.planId || null
  289. self.linkedResultId = data.linkedResultId || null
  290. self.step = 3
  291. if (self.planId) {
  292. uni.showModal({
  293. title: '报告已入库',
  294. content: '成长方案已自动生成,是否立即查看并确认任务?',
  295. confirmText: '查看方案',
  296. cancelText: '稍后',
  297. success: function(modalRes) {
  298. if (modalRes.confirm) {
  299. self.goToPlan()
  300. }
  301. }
  302. })
  303. }
  304. } else {
  305. uni.showToast({ title: res.message || '保存失败', icon: 'none' })
  306. }
  307. })
  308. .catch(function(err) {
  309. self.confirming = false
  310. uni.showToast({ title: '保存失败', icon: 'none' })
  311. })
  312. },
  313. goToPlan: function() {
  314. if (!this.planId) return
  315. uni.redirectTo({
  316. url: '/pages/health/health-plan-summary?planId=' + this.planId
  317. })
  318. },
  319. goToResult: function() {
  320. if (!this.linkedResultId) return
  321. uni.redirectTo({
  322. url: '/pages/dan-assessment/report-result?reportId=' + this.linkedResultId
  323. })
  324. },
  325. resetUpload: function() {
  326. this.step = 1
  327. this.selectedFile = null
  328. this.previewData = null
  329. this.draftId = null
  330. this.planId = null
  331. this.linkedResultId = null
  332. },
  333. selectDimension: function(dim) {
  334. this.dimension = dim
  335. this.loadRecommendProducts(dim)
  336. },
  337. loadRecommendProducts: function(dimension) {
  338. var domain = REPORT_DOMAIN_MAP[dimension]
  339. if (!domain) {
  340. this.recommendedProducts = []
  341. return
  342. }
  343. var self = this
  344. self.loadingProducts = true
  345. productList({ domain: domain, productType: 'assessment', size: 4 }).then(function(res) {
  346. if (res && res.data && res.data.records) {
  347. self.recommendedProducts = res.data.records
  348. } else {
  349. self.recommendedProducts = []
  350. }
  351. }).catch(function() {
  352. self.recommendedProducts = []
  353. }).finally(function() {
  354. self.loadingProducts = false
  355. })
  356. },
  357. goToProduct: function(productId) {
  358. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + productId })
  359. },
  360. formatPriceWithSymbol: function(cents) {
  361. if (cents === null || cents === undefined) return '¥0'
  362. return '¥' + (cents / 100).toFixed(2)
  363. },
  364. getImageUrl: function(path) {
  365. return config.API_BASE_URL + path
  366. }
  367. }
  368. }
  369. </script>
  370. <style>
  371. .page {
  372. min-height: 100vh;
  373. background: #F5F5F7;
  374. padding-bottom: 40rpx;
  375. }
  376. .header {
  377. display: flex;
  378. align-items: center;
  379. padding: 88rpx 32rpx 24rpx;
  380. background: linear-gradient(135deg, #667EEA, #764BA2);
  381. }
  382. .back-btn {
  383. display: flex;
  384. align-items: center;
  385. margin-right: 24rpx;
  386. padding: 8rpx 16rpx;
  387. }
  388. .back-icon {
  389. font-size: 36rpx;
  390. color: #fff;
  391. margin-right: 8rpx;
  392. }
  393. .header-title {
  394. font-size: 36rpx;
  395. font-weight: 700;
  396. color: #fff;
  397. }
  398. .section {
  399. margin: 24rpx 24rpx 0;
  400. }
  401. .dimension-select {
  402. background: #fff;
  403. border-radius: 16rpx;
  404. padding: 32rpx;
  405. }
  406. .dimension-label {
  407. font-size: 28rpx;
  408. font-weight: 600;
  409. color: #333;
  410. margin-bottom: 20rpx;
  411. display: block;
  412. }
  413. .dimension-options {
  414. display: flex;
  415. flex-direction: row;
  416. flex-wrap: wrap;
  417. }
  418. .dimension-option {
  419. width: 48%;
  420. margin-right: 2%;
  421. margin-bottom: 16rpx;
  422. padding: 20rpx 12rpx;
  423. border-radius: 12rpx;
  424. background: #F5F5F7;
  425. text-align: center;
  426. border: 2rpx solid transparent;
  427. box-sizing: border-box;
  428. }
  429. .dimension-option.active {
  430. background: #EEF2FF;
  431. border-color: #6366F1;
  432. }
  433. .dimension-name {
  434. font-size: 24rpx;
  435. color: #333;
  436. font-weight: 500;
  437. }
  438. .dimension-option.active .dimension-name {
  439. color: #6366F1;
  440. }
  441. .upload-area {
  442. background: #fff;
  443. border-radius: 16rpx;
  444. padding: 60rpx 32rpx;
  445. text-align: center;
  446. margin-top: 24rpx;
  447. border: 2rpx dashed #D1D5DB;
  448. }
  449. .upload-icon {
  450. font-size: 64rpx;
  451. margin-bottom: 16rpx;
  452. }
  453. .upload-text {
  454. font-size: 30rpx;
  455. color: #333;
  456. display: block;
  457. margin-bottom: 8rpx;
  458. }
  459. .upload-hint {
  460. font-size: 24rpx;
  461. color: #999;
  462. }
  463. .action-bar {
  464. margin-top: 32rpx;
  465. display: flex;
  466. gap: 20rpx;
  467. }
  468. .upload-btn {
  469. flex: 1;
  470. background: #6366F1;
  471. border-radius: 12rpx;
  472. padding: 24rpx;
  473. text-align: center;
  474. }
  475. .upload-btn-text {
  476. font-size: 30rpx;
  477. color: #fff;
  478. font-weight: 600;
  479. }
  480. .preview-header {
  481. margin-bottom: 24rpx;
  482. }
  483. .preview-title {
  484. font-size: 32rpx;
  485. font-weight: 700;
  486. color: #333;
  487. display: block;
  488. }
  489. .preview-desc {
  490. font-size: 24rpx;
  491. color: #999;
  492. margin-top: 8rpx;
  493. }
  494. .preview-card {
  495. background: #fff;
  496. border-radius: 16rpx;
  497. padding: 24rpx;
  498. }
  499. .preview-row {
  500. display: flex;
  501. justify-content: space-between;
  502. padding: 12rpx 0;
  503. border-bottom: 1rpx solid #F3F4F6;
  504. }
  505. .preview-row:last-child {
  506. border-bottom: none;
  507. }
  508. .preview-label {
  509. font-size: 26rpx;
  510. color: #666;
  511. }
  512. .preview-value {
  513. font-size: 26rpx;
  514. color: #333;
  515. font-weight: 500;
  516. }
  517. .items-section {
  518. margin-top: 24rpx;
  519. }
  520. .items-title {
  521. font-size: 28rpx;
  522. font-weight: 600;
  523. color: #333;
  524. margin-bottom: 16rpx;
  525. display: block;
  526. }
  527. .item-card {
  528. background: #fff;
  529. border-radius: 12rpx;
  530. padding: 20rpx;
  531. margin-bottom: 12rpx;
  532. }
  533. .item-header {
  534. display: flex;
  535. justify-content: space-between;
  536. margin-bottom: 12rpx;
  537. }
  538. .item-name {
  539. font-size: 26rpx;
  540. color: #333;
  541. font-weight: 500;
  542. }
  543. .item-category {
  544. font-size: 22rpx;
  545. color: #999;
  546. background: #F3F4F6;
  547. padding: 4rpx 12rpx;
  548. border-radius: 8rpx;
  549. }
  550. .item-value-bar {
  551. height: 16rpx;
  552. background: #F3F4F6;
  553. border-radius: 8rpx;
  554. overflow: hidden;
  555. }
  556. .item-value-fill {
  557. height: 100%;
  558. background: linear-gradient(90deg, #667EEA, #764BA2);
  559. border-radius: 8rpx;
  560. }
  561. .item-value-text {
  562. font-size: 24rpx;
  563. color: #666;
  564. margin-top: 8rpx;
  565. display: block;
  566. text-align: right;
  567. }
  568. .suggestions-card {
  569. background: #FFFBEB;
  570. border-radius: 16rpx;
  571. padding: 24rpx;
  572. margin-top: 24rpx;
  573. }
  574. .suggestions-title {
  575. font-size: 28rpx;
  576. font-weight: 600;
  577. color: #92400E;
  578. display: block;
  579. margin-bottom: 12rpx;
  580. }
  581. .suggestions-text {
  582. font-size: 26rpx;
  583. color: #78350F;
  584. line-height: 1.6;
  585. }
  586. .confirm-btn {
  587. flex: 1;
  588. background: #10B981;
  589. border-radius: 12rpx;
  590. padding: 24rpx;
  591. text-align: center;
  592. }
  593. .confirm-btn.disabled {
  594. opacity: 0.6;
  595. }
  596. .confirm-btn-text {
  597. font-size: 30rpx;
  598. color: #fff;
  599. font-weight: 600;
  600. }
  601. .retry-btn {
  602. padding: 24rpx 32rpx;
  603. border-radius: 12rpx;
  604. border: 2rpx solid #D1D5DB;
  605. text-align: center;
  606. }
  607. .retry-btn-text {
  608. font-size: 28rpx;
  609. color: #666;
  610. }
  611. .success-card {
  612. background: #fff;
  613. border-radius: 16rpx;
  614. padding: 60rpx 32rpx;
  615. text-align: center;
  616. margin-top: 120rpx;
  617. }
  618. .success-icon {
  619. font-size: 80rpx;
  620. display: block;
  621. margin-bottom: 24rpx;
  622. }
  623. .success-title {
  624. font-size: 36rpx;
  625. font-weight: 700;
  626. color: #10B981;
  627. display: block;
  628. margin-bottom: 12rpx;
  629. }
  630. .success-desc {
  631. font-size: 28rpx;
  632. color: #666;
  633. }
  634. .loading-overlay {
  635. position: fixed;
  636. top: 0; left: 0; right: 0; bottom: 0;
  637. background: rgba(0,0,0,0.5);
  638. display: flex;
  639. align-items: center;
  640. justify-content: center;
  641. z-index: 999;
  642. }
  643. .loading-box {
  644. background: #fff;
  645. border-radius: 16rpx;
  646. padding: 48rpx 64rpx;
  647. }
  648. .loading-text {
  649. font-size: 30rpx;
  650. color: #333;
  651. }
  652. .purchase-section {
  653. background: #F0F9FF;
  654. border-radius: 16rpx;
  655. padding: 24rpx;
  656. margin-top: 24rpx;
  657. border: 2rpx solid #BAE6FD;
  658. }
  659. .purchase-header {
  660. display: flex;
  661. flex-direction: row;
  662. align-items: center;
  663. margin-bottom: 16rpx;
  664. }
  665. .purchase-icon {
  666. font-size: 28rpx;
  667. margin-right: 8rpx;
  668. }
  669. .purchase-title {
  670. font-size: 26rpx;
  671. font-weight: bold;
  672. color: #0369A1;
  673. }
  674. .purchase-scroll {
  675. display: flex;
  676. flex-direction: row;
  677. white-space: nowrap;
  678. }
  679. .purchase-card {
  680. display: inline-flex;
  681. flex-direction: column;
  682. width: 220rpx;
  683. background: #fff;
  684. border-radius: 12rpx;
  685. padding: 16rpx;
  686. margin-right: 16rpx;
  687. flex-shrink: 0;
  688. }
  689. .purchase-cover {
  690. width: 188rpx;
  691. height: 120rpx;
  692. border-radius: 8rpx;
  693. background: #F1F5F9;
  694. margin-bottom: 8rpx;
  695. }
  696. .purchase-name {
  697. font-size: 22rpx;
  698. color: #333;
  699. line-height: 1.3;
  700. overflow: hidden;
  701. text-overflow: ellipsis;
  702. white-space: nowrap;
  703. margin-bottom: 4rpx;
  704. }
  705. .purchase-price {
  706. font-size: 24rpx;
  707. color: #EF4444;
  708. font-weight: bold;
  709. margin-bottom: 8rpx;
  710. }
  711. .purchase-btn {
  712. background: #3B82F6;
  713. border-radius: 8rpx;
  714. padding: 8rpx 0;
  715. text-align: center;
  716. }
  717. .purchase-btn-text {
  718. font-size: 22rpx;
  719. color: #fff;
  720. font-weight: 500;
  721. }
  722. </style>