From 64ad7acfa832c7868a9d943c3fba62ebf3b53dc7 Mon Sep 17 00:00:00 2001
From: lyf <2514544224@qq.com>
Date: Tue, 7 Jul 2026 18:15:45 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=B2=E8=A7=A3=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E6=AD=A3=E6=96=87=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/exhibit/detail.vue | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/pages/exhibit/detail.vue b/src/pages/exhibit/detail.vue
index 8a76462..99e4cef 100644
--- a/src/pages/exhibit/detail.vue
+++ b/src/pages/exhibit/detail.vue
@@ -78,7 +78,7 @@
:class="{ disabled: detailTextLoading }"
@tap="handleLoadDetailText"
>
- {{ detailTextLoading ? '正在加载' : '查看图文讲解' }}
+ {{ detailTextLoading ? '正在加载' : detailTextLoadActionText }}
{{ detailTextUnavailableMessage }}
@@ -239,15 +239,37 @@ const visibleLanguageOptions = computed(() => (
languageOptions.filter((option) => supportedDetailLanguages.value.has(option.value))
))
const isLanguageSwitchVisible = computed(() => visibleLanguageOptions.value.length > 1)
-const isTextLoadActionVisible = computed(() => (
+const hasTextLoadTarget = computed(() => Boolean(
+ exhibit.value.audio.playTargetId || exhibit.value.id
+))
+const normalizedDetailSummary = computed(() => exhibit.value.summary.trim())
+const hasMeaningfulDetailSummary = computed(() => (
+ normalizedDetailSummary.value
+ && normalizedDetailSummary.value !== defaultDetail.summary
+))
+const isDetailSummaryLikelyComplete = computed(() => (
+ hasMeaningfulDetailSummary.value
+ && normalizedDetailSummary.value.length >= 120
+))
+const hasDeferredDetailText = computed(() => (
exhibit.value.audio.hasText === true
&& !detailTextLoaded.value
&& !detailTextUnavailableMessage.value
+ && hasTextLoadTarget.value
+ && !isDetailSummaryLikelyComplete.value
+))
+const isTextLoadActionVisible = computed(() => hasDeferredDetailText.value)
+const detailTextLoadActionText = computed(() => (
+ hasMeaningfulDetailSummary.value
+ ? '查看完整讲解词'
+ : '加载讲解正文'
))
const detailBodyText = computed(() => (
detailTextLoaded.value
? exhibit.value.body || exhibit.value.summary
- : exhibit.value.summary
+ : hasDeferredDetailText.value && !hasMeaningfulDetailSummary.value
+ ? '已找到当前语言讲解词,可加载查看完整正文。'
+ : exhibit.value.summary
))
// 讲解详情页只定位到所属展厅,不再追踪具体展品点位。