diff --git a/client/src/pages/news/news.vue b/client/src/pages/news/news.vue index c370f90..fdf5fa4 100644 --- a/client/src/pages/news/news.vue +++ b/client/src/pages/news/news.vue @@ -55,6 +55,13 @@ + + + 🔗 + 查看原文 · {{ news.source }} + + + 相关话题 @@ -123,7 +130,7 @@ function formatDate(dateStr) { const newsBody = computed(() => { const content = news.value.body || '' if (!content) { - return `

${news.value.summary || ''}

完整内容暂未提供,将持续更新...

` + return `

${news.value.summary || '暂无详细内容'}

` } return content }) @@ -173,6 +180,20 @@ function onShare() { }) } +function openSource() { + if (!news.value.sourceUrl) return + uni.setClipboardData({ + data: news.value.sourceUrl, + success: () => { + uni.showModal({ + title: '打开原文', + content: `链接已复制: ${news.value.sourceUrl}\n请在浏览器中打开`, + showCancel: false + }) + } + }) +} + onMounted(() => { loadDetail() }) @@ -309,6 +330,21 @@ onMounted(() => { color: var(--text-secondary); } +// 查看原文 +.source-link { + margin: 0 20px 20px; + padding: 14px 16px; + background: var(--glass-bg); + border: 1px solid var(--glass-border); + border-radius: 12px; + display: flex; + align-items: center; + gap: 10px; +} +.source-link-icon { font-size: 14px; } +.source-link-text { flex: 1; font-size: 13px; color: var(--dim1-color); font-weight: 500; } +.source-link-arrow { font-size: 14px; color: var(--text-muted); } + // Related tags .related-tags { margin: 0 20px 20px;