@@ -5,6 +5,7 @@
|
||||
:show-top-tabs="false"
|
||||
:audio-player-avoid-bottom-nav="false"
|
||||
:audio-player-closable="false"
|
||||
:show-audio-player-host="true"
|
||||
audio-player-mode="expanded"
|
||||
@back="handleBack"
|
||||
>
|
||||
@@ -145,7 +146,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
import GuidePageFrame from '@/components/navigation/GuidePageFrame.vue'
|
||||
import type { AudioItem } from '@/components/audio/AudioPlayer.vue'
|
||||
import { useGlobalAudioPlayer } from '@/composables/useGlobalAudioPlayer'
|
||||
@@ -468,6 +469,10 @@ onLoad(async (options: any = {}) => {
|
||||
}
|
||||
})
|
||||
|
||||
onUnload(() => {
|
||||
globalAudioPlayer.close()
|
||||
})
|
||||
|
||||
const detailTextFor = (lang: AudioLanguage) => {
|
||||
return detailTextByLanguage.value[lang] || fallbackTextForLanguage(lang)
|
||||
}
|
||||
@@ -688,6 +693,8 @@ const fallbackToExplainHome = () => {
|
||||
}
|
||||
|
||||
const handleBack = () => {
|
||||
globalAudioPlayer.close()
|
||||
|
||||
if (typeof window !== 'undefined' && window.history.length > 1) {
|
||||
const currentHref = window.location.href
|
||||
window.history.back()
|
||||
|
||||
Reference in New Issue
Block a user