article-detail.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. <template>
  2. <view class="detail-container">
  3. <!-- 加载状态 -->
  4. <view v-if="loading" class="loading-wrap">
  5. <view class="loading-spinner"></view>
  6. <text class="loading-text">加载中...</text>
  7. </view>
  8. <!-- 错误状态 -->
  9. <view v-else-if="error" class="error-wrap">
  10. <text class="error-icon">📄</text>
  11. <text class="error-text">{{ errorMsg }}</text>
  12. <button class="retry-btn" @click="loadDetail(articleId)">重新加载</button>
  13. </view>
  14. <!-- 文章内容 -->
  15. <view v-else-if="article" class="detail-content">
  16. <!-- 封面图 -->
  17. <image
  18. v-if="article.coverImage"
  19. class="detail-cover"
  20. :src="article.coverImage"
  21. mode="widthFix"
  22. />
  23. <!-- 文章标题 -->
  24. <text class="detail-title">{{ article.title }}</text>
  25. <!-- 元信息 -->
  26. <view class="detail-meta">
  27. <text class="meta-author">{{ article.author || '浠艾福' }}</text>
  28. <text class="meta-separator">|</text>
  29. <text class="meta-date">{{ getFormattedDate() }}</text>
  30. <text class="meta-separator">|</text>
  31. <text class="meta-read">{{ article.readTime || 3 }} 分钟阅读</text>
  32. </view>
  33. <!-- 分类标签 + 内容类型/难度 -->
  34. <view class="detail-category-row">
  35. <text class="detail-category">{{ article.categoryName || '' }}</text>
  36. <text v-if="article.contentType" class="detail-type-badge" :class="'type-' + article.contentType">{{ contentTypeLabel(article.contentType) }}</text>
  37. <text v-if="article.difficultyLevel && article.difficultyLevel > 0" class="detail-difficulty">{{ '★'.repeat(article.difficultyLevel) }}{{ '☆'.repeat(5 - article.difficultyLevel) }}</text>
  38. </view>
  39. <!-- 维度标签 -->
  40. <view v-if="dimensionList.length" class="detail-dimensions">
  41. <text v-for="(dim, idx) in dimensionList" :key="idx" class="dimension-tag" :style="{ color: dim.color, background: dim.bgColor }">{{ dim.label }}</text>
  42. </view>
  43. <!-- 知识标签 -->
  44. <view v-if="tagList.length" class="detail-tags">
  45. <text v-for="(tag, idx) in tagList" :key="idx" class="tag-item">{{ tag }}</text>
  46. </view>
  47. <!-- 分割线 -->
  48. <view class="divider"></view>
  49. <!-- 文章正文(富文本) -->
  50. <view class="detail-body">
  51. <mp-html :content="article.content" />
  52. </view>
  53. <!-- 收藏按钮 -->
  54. <view class="action-bar">
  55. <view class="action-btn" @click="toggleFavorite">
  56. <text class="action-icon">{{ isFavorited ? '❤️' : '🤍' }}</text>
  57. <text class="action-text">{{ isFavorited ? '已收藏' : '收藏' }}</text>
  58. </view>
  59. <view class="action-btn" @click="handleShare">
  60. <text class="action-icon">📤</text>
  61. <text class="action-text">分享</text>
  62. </view>
  63. <view class="action-btn">
  64. <text class="action-icon">👁</text>
  65. <text class="action-text">{{ article.viewCount || 0 }}</text>
  66. </view>
  67. </view>
  68. <!-- 相关文章 -->
  69. <view class="related-section" v-if="relatedArticles.length > 0">
  70. <view class="related-header">
  71. <text class="related-title">📖 相关推荐</text>
  72. </view>
  73. <view class="related-list">
  74. <view
  75. v-for="item in relatedArticles"
  76. :key="item.id"
  77. class="related-card"
  78. @click="goRelatedArticle(item.id)"
  79. >
  80. <image
  81. class="related-cover"
  82. :src="item.coverImage || '/static/default-article.png'"
  83. mode="aspectFill"
  84. />
  85. <view class="related-info">
  86. <text class="related-name">{{ item.title }}</text>
  87. <text class="related-summary">{{ item.summary || '' }}</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 底部完成按钮 -->
  93. <view class="detail-footer">
  94. <!-- 定时器显示 -->
  95. <view class="reading-timer" v-if="readingSeconds >= 0">
  96. <text class="timer-icon">⏱</text>
  97. <text class="timer-text">{{ formatTime(readingSeconds) }}</text>
  98. <text class="timer-hint" v-if="readingSeconds < 60">阅读{{ 60 - readingSeconds }}秒可获取积分</text>
  99. <text class="timer-hint timer-ready" v-else>已达标,可领取积分</text>
  100. </view>
  101. <!-- 完成按钮 -->
  102. <button
  103. class="read-btn"
  104. :class="{ 'read-btn-active': readingSeconds >= 60 }"
  105. @click="onReadComplete"
  106. >阅读完成</button>
  107. </view>
  108. </view>
  109. <!-- 空状态 -->
  110. <view v-else class="error-wrap">
  111. <text class="error-icon">📄</text>
  112. <text class="error-text">文章不存在</text>
  113. </view>
  114. <!-- 分享弹窗 -->
  115. <view class="modal-mask" v-if="showShareModal" @click="showShareModal = false">
  116. <view class="share-modal" @click.stop="">
  117. <text class="share-modal-title">分享到</text>
  118. <view class="share-modal-items">
  119. <view class="share-modal-item" @click="shareToWechat">
  120. <text class="share-modal-icon">💬</text>
  121. <text class="share-modal-label">微信好友</text>
  122. </view>
  123. <view class="share-modal-item" @click="shareToTimeline">
  124. <text class="share-modal-icon">📱</text>
  125. <text class="share-modal-label">朋友圈</text>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. </view>
  131. </template>
  132. <script>
  133. import { getArticleDetail, getFeaturedArticles, recordArticleRead } from '../../utils/api.js'
  134. import MpHtml from '@/components/mp-html/mp-html.vue'
  135. var DIMENSION_MAP = {
  136. body: { label: '身', color: '#FF8C42', bgColor: 'rgba(255,140,66,0.1)' },
  137. mind: { label: '心', color: '#FF6B9D', bgColor: 'rgba(255,107,157,0.1)' },
  138. wisdom: { label: '智', color: '#6366F1', bgColor: 'rgba(99,102,241,0.1)' },
  139. action: { label: '行', color: '#10B981', bgColor: 'rgba(16,185,129,0.1)' },
  140. wealth: { label: '富', color: '#F59E0B', bgColor: 'rgba(245,158,11,0.1)' }
  141. }
  142. export default {
  143. components: { MpHtml },
  144. data() {
  145. return {
  146. articleId: '',
  147. article: null,
  148. loading: true,
  149. error: false,
  150. errorMsg: '',
  151. tagList: [],
  152. dimensionList: [],
  153. relatedArticles: [],
  154. readingSeconds: 0,
  155. readingTimer: null,
  156. readRecorded: false,
  157. showShareModal: false,
  158. isFavorited: false
  159. }
  160. },
  161. onLoad(options) {
  162. if (options && options.id) {
  163. this.articleId = options.id
  164. this.token = uni.getStorageSync('token')
  165. this.baseUrl = this.token ? '' : ''
  166. this.loadDetail(options.id)
  167. this.startReadingTimer()
  168. } else {
  169. this.error = true
  170. this.errorMsg = '参数错误'
  171. this.loading = false
  172. }
  173. },
  174. onHide() {
  175. this.stopReadingTimer()
  176. },
  177. onUnload() {
  178. this.stopReadingTimer()
  179. },
  180. methods: {
  181. contentTypeLabel: function(type) {
  182. var labels = { article: '文章', knowledge: '知识点', course: '课程', tip: '贴士' }
  183. return labels[type] || type || ''
  184. },
  185. async loadDetail(id) {
  186. this.loading = true
  187. this.error = false
  188. try {
  189. const res = await getArticleDetail({ id: id })
  190. if (res.code === 200 && res.data) {
  191. this.article = res.data
  192. // 解析标签 JSON 字符串
  193. if (res.data.tags) {
  194. try {
  195. let parsed = JSON.parse(res.data.tags)
  196. this.tagList = Array.isArray(parsed) ? parsed : []
  197. } catch (e) {
  198. this.tagList = []
  199. }
  200. }
  201. // 解析维度 ID JSON
  202. if (res.data.dimensionIds) {
  203. try {
  204. var dimIds = JSON.parse(res.data.dimensionIds)
  205. if (Array.isArray(dimIds)) {
  206. this.dimensionList = dimIds.map(function(d) {
  207. return DIMENSION_MAP[d] || { label: d, color: '#64748B', bgColor: 'rgba(100,116,139,0.1)' }
  208. })
  209. }
  210. } catch (e) {
  211. this.dimensionList = []
  212. }
  213. }
  214. // 加载相关文章
  215. this.loadRelatedArticles()
  216. } else {
  217. this.error = true
  218. this.errorMsg = '文章不存在或无权限查看'
  219. }
  220. } catch (e) {
  221. this.error = true
  222. this.errorMsg = '加载失败,请稍后重试'
  223. } finally {
  224. this.loading = false
  225. }
  226. },
  227. async loadRelatedArticles() {
  228. try {
  229. var dimensionCode = null
  230. if (this.article && this.article.dimensionIds) {
  231. try {
  232. var dimIds = JSON.parse(this.article.dimensionIds)
  233. if (Array.isArray(dimIds) && dimIds.length > 0) {
  234. dimensionCode = dimIds[0]
  235. }
  236. } catch (e) {}
  237. }
  238. var params = { size: 3 }
  239. if (dimensionCode) {
  240. params.dimensionCode = dimensionCode
  241. }
  242. const res = await getFeaturedArticles(params)
  243. if (res.code === 200 && res.data) {
  244. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  245. // 排除当前文章
  246. this.relatedArticles = list.filter(function(item) {
  247. return item.id !== (this.article && this.article.id)
  248. }.bind(this)).slice(0, 3)
  249. }
  250. } catch (e) {
  251. // 静默处理
  252. }
  253. },
  254. getFormattedDate() {
  255. if (this.article && this.article.publishedAt) {
  256. return this.article.publishedAt.slice(0, 10)
  257. }
  258. return ''
  259. },
  260. startReadingTimer() {
  261. var self = this
  262. this.readingTimer = setInterval(function() {
  263. self.readingSeconds = self.readingSeconds + 1
  264. }, 1000)
  265. },
  266. stopReadingTimer() {
  267. if (this.readingTimer) {
  268. clearInterval(this.readingTimer)
  269. this.readingTimer = null
  270. }
  271. },
  272. formatTime(seconds) {
  273. var m = Math.floor(seconds / 60)
  274. var s = seconds % 60
  275. return (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s)
  276. },
  277. toggleFavorite: function() {
  278. this.isFavorited = !this.isFavorited
  279. uni.showToast({ title: this.isFavorited ? '已收藏' : '已取消收藏', icon: 'none' })
  280. },
  281. handleShare: function() {
  282. var self = this
  283. uni.showActionSheet({
  284. itemList: ['微信好友', '朋友圈', '保存图片'],
  285. success: function(res) {
  286. var channel = 'wechat'
  287. if (res.tapIndex === 1) channel = 'friend'
  288. uni.request({
  289. url: self.baseUrl + '/api/share/create',
  290. method: 'POST',
  291. header: { 'Authorization': 'Bearer ' + self.token },
  292. data: {
  293. targetType: 'article',
  294. targetId: self.articleId,
  295. shareChannel: channel,
  296. title: self.article && self.article.title ? self.article.title : ''
  297. },
  298. success: function(createRes) {
  299. if (createRes.data && createRes.data.code === 200) {
  300. var shareEvent = createRes.data.data
  301. uni.showToast({ title: '分享成功', icon: 'success' })
  302. uni.request({
  303. url: self.baseUrl + '/api/share/click',
  304. method: 'POST',
  305. header: { 'Authorization': 'Bearer ' + self.token },
  306. data: { shareEventId: shareEvent.id }
  307. })
  308. self.showShareModal = true
  309. }
  310. }
  311. })
  312. }
  313. })
  314. },
  315. shareToWechat: function() {
  316. this.showShareModal = false
  317. uni.showToast({ title: '请使用微信分享', icon: 'none' })
  318. },
  319. shareToTimeline: function() {
  320. this.showShareModal = false
  321. uni.showToast({ title: '请使用微信朋友圈', icon: 'none' })
  322. },
  323. async onReadComplete() {
  324. if (this.readRecorded) {
  325. uni.navigateBack()
  326. return
  327. }
  328. this.stopReadingTimer()
  329. try {
  330. var childId = uni.getStorageSync('currentChildId')
  331. var res = await recordArticleRead({
  332. id: this.article.id,
  333. durationSeconds: this.readingSeconds,
  334. childId: childId || undefined
  335. })
  336. this.readRecorded = true
  337. if (res.data && res.data.pointsEarned > 0) {
  338. uni.showToast({ title: '获得' + res.data.pointsEarned + '积分!', icon: 'success' })
  339. } else if (res.data && res.data.belowThreshold) {
  340. uni.showToast({ title: '阅读时间未达标', icon: 'none' })
  341. } else if (res.data && res.data.alreadyCompleted) {
  342. uni.showToast({ title: '已读过此文', icon: 'none' })
  343. } else {
  344. uni.showToast({ title: '阅读记录已保存', icon: 'success' })
  345. }
  346. } catch (e) {
  347. uni.showToast({ title: '记录保存失败', icon: 'none' })
  348. }
  349. var self = this
  350. setTimeout(function() {
  351. uni.navigateBack()
  352. }, 1500)
  353. },
  354. goRelatedArticle: function(id) {
  355. uni.redirectTo({ url: '/pages/mind/article-detail?id=' + id })
  356. }
  357. }
  358. }
  359. </script>
  360. <style scoped>
  361. .detail-container {
  362. min-height: 100vh;
  363. background: #fff;
  364. padding-bottom: 120rpx;
  365. }
  366. /* ===== 加载状态 ===== */
  367. .loading-wrap {
  368. display: flex;
  369. flex-direction: column;
  370. align-items: center;
  371. justify-content: center;
  372. padding-top: 300rpx;
  373. }
  374. .loading-spinner {
  375. width: 60rpx;
  376. height: 60rpx;
  377. border: 4rpx solid #e0e0e0;
  378. border-top-color: #5B9BD5;
  379. border-radius: 50%;
  380. animation: spin 0.8s linear infinite;
  381. margin-bottom: 20rpx;
  382. }
  383. @keyframes spin {
  384. 0% { transform: rotate(0deg); }
  385. 100% { transform: rotate(360deg); }
  386. }
  387. .loading-text {
  388. font-size: 26rpx;
  389. color: #999;
  390. }
  391. /* ===== 错误状态 ===== */
  392. .error-wrap {
  393. display: flex;
  394. flex-direction: column;
  395. align-items: center;
  396. padding-top: 300rpx;
  397. }
  398. .error-icon {
  399. font-size: 100rpx;
  400. margin-bottom: 24rpx;
  401. }
  402. .error-text {
  403. font-size: 28rpx;
  404. color: #999;
  405. margin-bottom: 30rpx;
  406. }
  407. .retry-btn {
  408. width: 240rpx;
  409. height: 72rpx;
  410. line-height: 72rpx;
  411. background: #5B9BD5;
  412. color: #fff;
  413. font-size: 28rpx;
  414. border-radius: 36rpx;
  415. text-align: center;
  416. border: none;
  417. }
  418. .retry-btn::after {
  419. border: none;
  420. }
  421. /* ===== 内容区 ===== */
  422. .detail-cover {
  423. width: 100%;
  424. max-height: 500rpx;
  425. display: block;
  426. }
  427. .detail-title {
  428. display: block;
  429. font-size: 36rpx;
  430. font-weight: bold;
  431. color: #333;
  432. line-height: 1.4;
  433. padding: 30rpx 30rpx 0;
  434. }
  435. /* ===== 元信息 ===== */
  436. .detail-meta {
  437. display: flex;
  438. flex-direction: row;
  439. align-items: center;
  440. padding: 16rpx 30rpx 0;
  441. font-size: 22rpx;
  442. color: #999;
  443. }
  444. .meta-author {
  445. color: #5B9BD5;
  446. }
  447. .meta-separator {
  448. margin: 0 12rpx;
  449. color: #ddd;
  450. }
  451. .meta-date,
  452. .meta-read {
  453. color: #999;
  454. }
  455. /* ===== 分类标签 ===== */
  456. .detail-category-row {
  457. padding: 16rpx 30rpx 0;
  458. display: flex;
  459. align-items: center;
  460. gap: 12rpx;
  461. flex-wrap: wrap;
  462. }
  463. .detail-category {
  464. display: inline-block;
  465. font-size: 20rpx;
  466. color: #5B9BD5;
  467. background: rgba(91, 155, 213, 0.1);
  468. padding: 4rpx 16rpx;
  469. border-radius: 8rpx;
  470. }
  471. .detail-type-badge {
  472. display: inline-block;
  473. font-size: 18rpx;
  474. padding: 2rpx 12rpx;
  475. border-radius: 6rpx;
  476. background: #f0f0f0;
  477. color: #666;
  478. }
  479. .detail-type-badge.type-article {
  480. background: #e8f4fd;
  481. color: #2b7fc4;
  482. }
  483. .detail-type-badge.type-knowledge {
  484. background: #e8f8ee;
  485. color: #2a9055;
  486. }
  487. .detail-type-badge.type-course {
  488. background: #fef3e2;
  489. color: #c47a2b;
  490. }
  491. .detail-type-badge.type-tip {
  492. background: #f3e8fd;
  493. color: #7b2bc4;
  494. }
  495. .detail-difficulty {
  496. font-size: 18rpx;
  497. color: #f59e0b;
  498. margin-left: 4rpx;
  499. }
  500. /* ===== 维度标签 ===== */
  501. .detail-dimensions {
  502. display: flex;
  503. flex-direction: row;
  504. padding: 8rpx 30rpx 0;
  505. gap: 10rpx;
  506. }
  507. .dimension-tag {
  508. font-size: 18rpx;
  509. padding: 2rpx 14rpx;
  510. border-radius: 6rpx;
  511. }
  512. /* ===== 标签 ===== */
  513. .detail-tags {
  514. display: flex;
  515. flex-direction: row;
  516. flex-wrap: wrap;
  517. padding: 12rpx 30rpx 0;
  518. gap: 12rpx;
  519. }
  520. .tag-item {
  521. font-size: 20rpx;
  522. color: #8B5CF6;
  523. background: rgba(139, 92, 246, 0.08);
  524. padding: 4rpx 14rpx;
  525. border-radius: 8rpx;
  526. }
  527. /* ===== 分割线 ===== */
  528. .divider {
  529. height: 1rpx;
  530. background: #eee;
  531. margin: 24rpx 30rpx;
  532. }
  533. /* ===== 正文 ===== */
  534. .detail-body {
  535. padding: 0 30rpx;
  536. font-size: 28rpx;
  537. color: #444;
  538. line-height: 1.8;
  539. }
  540. .detail-body rich-text {
  541. word-break: break-word;
  542. }
  543. /* ===== 定时器 ===== */
  544. .reading-timer {
  545. display: flex;
  546. flex-direction: row;
  547. align-items: center;
  548. justify-content: center;
  549. padding: 16rpx 0 20rpx;
  550. }
  551. .timer-icon {
  552. font-size: 32rpx;
  553. margin-right: 8rpx;
  554. }
  555. .timer-text {
  556. font-size: 32rpx;
  557. font-weight: bold;
  558. color: #333;
  559. margin-right: 16rpx;
  560. }
  561. .timer-hint {
  562. font-size: 22rpx;
  563. color: #999;
  564. }
  565. .timer-ready {
  566. color: #22c55e;
  567. font-weight: bold;
  568. }
  569. /* ===== 底部按钮 ===== */
  570. .detail-footer {
  571. padding: 40rpx 60rpx;
  572. }
  573. .read-btn {
  574. width: 100%;
  575. height: 88rpx;
  576. line-height: 88rpx;
  577. background: #ddd;
  578. color: #fff;
  579. font-size: 32rpx;
  580. font-weight: bold;
  581. border-radius: 44rpx;
  582. text-align: center;
  583. border: none;
  584. transition: background 0.3s;
  585. }
  586. .read-btn-active {
  587. background: linear-gradient(135deg, #5B9BD5, #3A7CC4);
  588. }
  589. .read-btn::after {
  590. border: none;
  591. }
  592. /* ===== 操作栏 ===== */
  593. .action-bar {
  594. display: flex;
  595. flex-direction: row;
  596. justify-content: space-around;
  597. padding: 24rpx 30rpx;
  598. border-bottom: 1rpx solid #eee;
  599. }
  600. .action-btn {
  601. display: flex;
  602. flex-direction: column;
  603. align-items: center;
  604. padding: 8rpx 24rpx;
  605. }
  606. .action-icon {
  607. font-size: 36rpx;
  608. margin-bottom: 6rpx;
  609. }
  610. .action-text {
  611. font-size: 22rpx;
  612. color: #666;
  613. }
  614. /* ===== 相关推荐 ===== */
  615. .related-section {
  616. padding: 30rpx;
  617. }
  618. .related-header {
  619. margin-bottom: 20rpx;
  620. }
  621. .related-title {
  622. font-size: 30rpx;
  623. font-weight: bold;
  624. color: #333;
  625. }
  626. .related-list {
  627. display: flex;
  628. flex-direction: column;
  629. gap: 20rpx;
  630. }
  631. .related-card {
  632. display: flex;
  633. flex-direction: row;
  634. background: #fff;
  635. border-radius: 16rpx;
  636. overflow: hidden;
  637. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  638. }
  639. .related-cover {
  640. width: 180rpx;
  641. height: 140rpx;
  642. flex-shrink: 0;
  643. background: linear-gradient(135deg, #667eea, #764ba2);
  644. }
  645. .related-info {
  646. flex: 1;
  647. padding: 16rpx;
  648. display: flex;
  649. flex-direction: column;
  650. justify-content: center;
  651. }
  652. .related-name {
  653. font-size: 26rpx;
  654. font-weight: bold;
  655. color: #333;
  656. display: -webkit-box;
  657. -webkit-line-clamp: 2;
  658. -webkit-box-orient: vertical;
  659. overflow: hidden;
  660. margin-bottom: 8rpx;
  661. }
  662. .related-summary {
  663. font-size: 22rpx;
  664. color: #999;
  665. display: -webkit-box;
  666. -webkit-line-clamp: 1;
  667. -webkit-box-orient: vertical;
  668. overflow: hidden;
  669. }
  670. }
  671. .share-btn::after {
  672. border: none;
  673. }
  674. /* ===== 分享弹窗 ===== */
  675. .modal-mask {
  676. position: fixed;
  677. top: 0;
  678. left: 0;
  679. right: 0;
  680. bottom: 0;
  681. background: rgba(0, 0, 0, 0.5);
  682. display: flex;
  683. flex-direction: column;
  684. justify-content: flex-end;
  685. z-index: 1000;
  686. }
  687. .share-modal {
  688. background: #fff;
  689. border-radius: 24rpx 24rpx 0 0;
  690. padding: 40rpx;
  691. }
  692. .share-modal-title {
  693. display: block;
  694. text-align: center;
  695. font-size: 32rpx;
  696. font-weight: bold;
  697. margin-bottom: 32rpx;
  698. }
  699. .share-modal-items {
  700. display: flex;
  701. justify-content: space-around;
  702. }
  703. .share-modal-item {
  704. display: flex;
  705. flex-direction: column;
  706. align-items: center;
  707. }
  708. .share-modal-icon {
  709. font-size: 48rpx;
  710. margin-bottom: 12rpx;
  711. }
  712. .share-modal-label {
  713. font-size: 24rpx;
  714. color: #64748B;
  715. }
  716. </style>