修复讲解播放器跨页面状态
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-08 22:17:29 +08:00
parent 9cdb2c08b2
commit 180d3e7c96
2 changed files with 13 additions and 3 deletions

View File

@@ -69,15 +69,21 @@ const handleToggle = () => {
}
const applyHostDisplayMode = () => {
if (!hasAudio.value || currentDisplayMode.value === 'expanded') {
if (!hasAudio.value) {
return
}
if (props.displayMode === 'mini' || props.displayMode === 'floating') {
if (currentDisplayMode.value !== props.displayMode) {
player.setDisplayMode(props.displayMode)
}
}
const isCurrentH5Route = (route: string) => {
if (typeof window === 'undefined') return false
return window.location.hash.replace(/^#/, '') === route
}
const handleStop = () => {
player.stop()
}
@@ -109,6 +115,10 @@ const handleExpand = () => {
return
}
if (isCurrentH5Route(route)) {
return
}
uni.navigateTo({
url: route
})

View File

@@ -301,7 +301,7 @@ const showAudioPlayer = computed(() => (
))
const isDetailAudioDockVisible = computed(() => (
exhibit.value.audio.status === 'playable'
&& !showAudioPlayer.value
&& !isCurrentDetailAudio.value
&& !detailAudioDockDismissed.value
))
const audioDockTitle = computed(() => (