@@ -77,8 +77,8 @@
|
||||
<view class="detail-audio-dock-main">
|
||||
<button
|
||||
class="detail-audio-play"
|
||||
:class="{ disabled: audioDockState === 'unavailable' }"
|
||||
:disabled="audioDockState === 'unavailable'"
|
||||
:class="{ disabled: audioDockState === 'unavailable' || audioDockState === 'loading' }"
|
||||
:disabled="audioDockState === 'unavailable' || audioDockState === 'loading'"
|
||||
:aria-label="detailAudioActionLabel"
|
||||
@tap="handlePlayAudio"
|
||||
>
|
||||
@@ -193,6 +193,11 @@ const detailEntryRequest = ref<{
|
||||
exhibitId: string
|
||||
targetType?: AudioPlayTargetType
|
||||
targetId?: string
|
||||
hallId?: string
|
||||
hallName?: string
|
||||
floorId?: string
|
||||
floorLabel?: string
|
||||
poiId?: string
|
||||
} | null>(null)
|
||||
const detailTextByLanguage = ref<Record<AudioLanguage, string>>({
|
||||
'zh-CN': defaultDetail.body,
|
||||
@@ -478,7 +483,11 @@ onLoad(async (options: any = {}) => {
|
||||
detailEntryRequest.value = {
|
||||
exhibitId,
|
||||
targetType,
|
||||
targetId
|
||||
targetId,
|
||||
hallId: Array.isArray(options.hallId) ? options.hallId[0] : options.hallId,
|
||||
hallName: Array.isArray(options.hallName) ? options.hallName[0] : options.hallName,
|
||||
floorId: Array.isArray(options.floorId) ? options.floorId[0] : options.floorId,
|
||||
poiId: Array.isArray(options.poiId) ? options.poiId[0] : options.poiId
|
||||
}
|
||||
await loadExplainDetail(detailEntryRequest.value, lang)
|
||||
} catch (error) {
|
||||
@@ -737,7 +746,7 @@ const playDetailAudio = async (audio: AudioItem) => {
|
||||
}
|
||||
|
||||
const handlePlayAudio = async (options: { forceRefresh?: boolean } = {}) => {
|
||||
if (audioDockState.value === 'unavailable') return
|
||||
if (audioDockState.value === 'unavailable' || audioDockState.value === 'loading') return
|
||||
|
||||
if (isCurrentDetailAudio.value && !options.forceRefresh) {
|
||||
if (globalAudioPlayer.playing.value) {
|
||||
|
||||
Reference in New Issue
Block a user