diff --git a/apps/miniprogram/src/pages/article/detail/index.scss b/apps/miniprogram/src/pages/article/detail/index.scss index fe7eed5..31027e7 100644 --- a/apps/miniprogram/src/pages/article/detail/index.scss +++ b/apps/miniprogram/src/pages/article/detail/index.scss @@ -1,65 +1,41 @@ @import '../../../styles/variables.scss'; -@import '../../../styles/mixins.scss'; -// PageShell 已接管:min-height, background, padding +// 文章详情页 — 对齐原型 docs/design/mp-04-article-report.html → ArticleDetail -.article-header { - background: $card; - padding: var(--tk-gap-xl); - margin-bottom: 2px; +.article-detail-page { + padding-bottom: 80px; } .article-title { - font-size: var(--tk-font-hero); - font-weight: bold; + font-family: Georgia, 'Times New Roman', serif; + font-size: var(--tk-font-h2); + font-weight: 700; color: $tx; display: block; line-height: 1.4; - margin-bottom: var(--tk-gap-md); + margin-bottom: var(--tk-gap-sm); } .article-meta { display: flex; - align-items: center; gap: var(--tk-gap-md); - flex-wrap: wrap; + font-size: var(--tk-font-cap); + color: $tx3; + margin-bottom: var(--tk-gap-md); } -.article-category { - font-size: var(--tk-font-body); - color: var(--tk-pri); - background: var(--tk-pri-l); - padding: var(--tk-gap-2xs) var(--tk-gap-sm); - border-radius: $r-sm; +.article-divider { + height: 1px; + background: $bd-l; + margin-bottom: var(--tk-section-gap); } -.article-author { - font-size: var(--tk-font-h2); +.article-body { + font-size: 15px; color: $tx2; -} + line-height: 1.8; -.article-date { - font-size: var(--tk-font-h2); - color: var(--tk-text-secondary); -} - -.article-summary { - background: $card; - padding: var(--tk-gap-lg) var(--tk-gap-xl); - margin-bottom: 2px; -} - -.summary-text { - font-size: var(--tk-font-h1); - color: $tx2; - line-height: 1.6; -} - -.article-content { - background: $card; - padding: var(--tk-gap-xl); - - // RichText 内部样式优化 + // RichText 内部样式 h1, h2, h3 { font-weight: bold; color: $tx; @@ -67,10 +43,8 @@ } p { - font-size: var(--tk-font-body-lg); - color: $tx; - line-height: 1.8; margin-bottom: var(--tk-gap-md); + text-indent: 2em; } img { @@ -80,6 +54,44 @@ } } +.article-bottom-bar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 60px; + background: $card; + border-top: 1px solid $bd-l; + display: flex; + align-items: center; + justify-content: center; + gap: 32px; + padding: 0 var(--tk-page-padding); + z-index: 10; +} + +.article-action-btn { + display: flex; + flex-direction: column; + align-items: center; + gap: 2px; + + &:active { + opacity: var(--tk-touch-feedback-opacity); + } +} + +.article-action-icon { + font-size: 20px; + color: $tx3; + line-height: 1; +} + +.article-action-text { + font-size: var(--tk-font-micro); + color: $tx3; +} + .loading-state, .empty-state { display: flex; @@ -90,6 +102,6 @@ .loading-text, .empty-text { - font-size: var(--tk-font-body-lg); - color: var(--tk-text-secondary); + font-size: var(--tk-font-body); + color: $tx3; } diff --git a/apps/miniprogram/src/pages/article/detail/index.tsx b/apps/miniprogram/src/pages/article/detail/index.tsx index 2810475..8d43858 100644 --- a/apps/miniprogram/src/pages/article/detail/index.tsx +++ b/apps/miniprogram/src/pages/article/detail/index.tsx @@ -63,36 +63,38 @@ export default function ArticleDetail() { ); } + const handleCollect = () => { + Taro.showToast({ title: '已收藏', icon: 'success' }); + }; + + const handleShare = () => { + Taro.showShareMenu({ withShareTicket: true }); + }; + return ( - - {/* 文章头部 */} - - {article.title} - - {article.category && ( - {article.category} - )} - {article.author && ( - {article.author} - )} - {article.published_at && ( - {article.published_at.slice(0, 10)} - )} - + + {article.title} + + + {article.author && {article.author}} + {article.published_at && {article.published_at.slice(0, 10)}} - {/* 摘要 */} - {article.summary && ( - - {article.summary} - - )} + - {/* 正文 */} - - + + + + + + + + 收藏 + + + + 分享 + );