@@ -141,9 +141,6 @@
|
|||||||
<view v-else class="detail-audio-lang">
|
<view v-else class="detail-audio-lang">
|
||||||
<text class="detail-audio-lang-text">{{ audioLanguageShortText }}</text>
|
<text class="detail-audio-lang-text">{{ audioLanguageShortText }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-audio-close" @tap="handleDismissDetailAudioDock">
|
|
||||||
<text class="detail-audio-close-text">×</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="isLocationActionVisible" class="action-bar">
|
<view v-if="isLocationActionVisible" class="action-bar">
|
||||||
@@ -222,7 +219,6 @@ const detailEntryRequest = ref<{
|
|||||||
} | null>(null)
|
} | null>(null)
|
||||||
const scrollTargetId = ref('')
|
const scrollTargetId = ref('')
|
||||||
const activeContentLanguage = ref<AudioLanguage>('zh-CN')
|
const activeContentLanguage = ref<AudioLanguage>('zh-CN')
|
||||||
const detailAudioDockDismissed = ref(false)
|
|
||||||
const detailTextByLanguage = ref<Record<AudioLanguage, string>>({
|
const detailTextByLanguage = ref<Record<AudioLanguage, string>>({
|
||||||
'zh-CN': defaultDetail.body,
|
'zh-CN': defaultDetail.body,
|
||||||
'en-US': 'English narration text is not available yet.'
|
'en-US': 'English narration text is not available yet.'
|
||||||
@@ -303,7 +299,6 @@ const showAudioPlayer = computed(() => (
|
|||||||
const isDetailAudioDockVisible = computed(() => (
|
const isDetailAudioDockVisible = computed(() => (
|
||||||
exhibit.value.audio.status === 'playable'
|
exhibit.value.audio.status === 'playable'
|
||||||
&& !isCurrentDetailAudio.value
|
&& !isCurrentDetailAudio.value
|
||||||
&& !detailAudioDockDismissed.value
|
|
||||||
))
|
))
|
||||||
const audioDockTitle = computed(() => (
|
const audioDockTitle = computed(() => (
|
||||||
selectedAudioLanguage.value === 'en-US' ? 'English audio' : '中文讲解音频'
|
selectedAudioLanguage.value === 'en-US' ? 'English audio' : '中文讲解音频'
|
||||||
@@ -427,7 +422,6 @@ const loadExplainDetail = async (
|
|||||||
|
|
||||||
exhibit.value = toExplainDetailPageViewModel(exhibitData)
|
exhibit.value = toExplainDetailPageViewModel(exhibitData)
|
||||||
selectedAudioLanguage.value = lang
|
selectedAudioLanguage.value = lang
|
||||||
detailAudioDockDismissed.value = false
|
|
||||||
|
|
||||||
if (exhibitData.hallId) {
|
if (exhibitData.hallId) {
|
||||||
resolvedHallId.value = exhibitData.hallId
|
resolvedHallId.value = exhibitData.hallId
|
||||||
@@ -485,33 +479,13 @@ const detailTextFor = (lang: AudioLanguage) => {
|
|||||||
return detailTextByLanguage.value[lang] || fallbackTextForLanguage(lang)
|
return detailTextByLanguage.value[lang] || fallbackTextForLanguage(lang)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDismissDetailAudioDock = () => {
|
|
||||||
detailAudioDockDismissed.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleDetailAudioLanguageChange = (lang: AudioLanguage) => {
|
const handleDetailAudioLanguageChange = (lang: AudioLanguage) => {
|
||||||
if (lang === selectedAudioLanguage.value) return
|
if (lang === selectedAudioLanguage.value) return
|
||||||
if (!supportedDetailAudioLanguages.value.includes(lang)) return
|
if (!supportedDetailAudioLanguages.value.includes(lang)) return
|
||||||
|
|
||||||
selectedAudioLanguage.value = lang
|
selectedAudioLanguage.value = lang
|
||||||
detailAudioDockDismissed.value = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => globalAudioPlayer.closeVersion.value,
|
|
||||||
() => {
|
|
||||||
const closedSource = globalAudioPlayer.lastClosedSource.value
|
|
||||||
if (
|
|
||||||
closedSource?.targetType === currentAudioTarget.value.targetType
|
|
||||||
&& closedSource.targetId === currentAudioTarget.value.targetId
|
|
||||||
&& (!closedSource.lang || closedSource.lang === selectedAudioLanguage.value)
|
|
||||||
) {
|
|
||||||
// 关闭全局播放器后,详情页需要恢复本地播放入口,避免用户无法重新播放。
|
|
||||||
detailAudioDockDismissed.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => globalAudioPlayer.currentSource.value,
|
() => globalAudioPlayer.currentSource.value,
|
||||||
(source) => {
|
(source) => {
|
||||||
@@ -1442,8 +1416,7 @@ const handleBack = () => {
|
|||||||
|
|
||||||
.detail-audio-title,
|
.detail-audio-title,
|
||||||
.detail-audio-subtitle,
|
.detail-audio-subtitle,
|
||||||
.detail-audio-lang-text,
|
.detail-audio-lang-text {
|
||||||
.detail-audio-close-text {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1533,22 +1506,6 @@ const handleBack = () => {
|
|||||||
color: currentColor;
|
color: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-audio-close {
|
|
||||||
flex-shrink: 0;
|
|
||||||
width: 28px;
|
|
||||||
height: 36px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-audio-close-text {
|
|
||||||
font-size: 28px;
|
|
||||||
line-height: 28px;
|
|
||||||
color: currentColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 360px) {
|
@media (max-width: 360px) {
|
||||||
.immersive-hero {
|
.immersive-hero {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user