This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="explain-hall-select" :class="{ 'host-navigation': shouldUseHostNavigation }">
|
||||
<view v-if="!shouldUseHostNavigation" class="explain-page-header">
|
||||
<view v-if="showInternalHeader" class="explain-page-header">
|
||||
<view class="header-back" @tap="handleBack">
|
||||
<text class="header-back-icon">‹</text>
|
||||
<text class="header-back-text">返回</text>
|
||||
@@ -241,6 +241,7 @@ const hallPreviewMap: Record<string, string> = {
|
||||
|
||||
const filteredHalls = computed(() => props.halls)
|
||||
const shouldUseHostNavigation = computed(() => isEmbeddedInWechatMiniProgram())
|
||||
const showInternalHeader = computed(() => !shouldUseHostNavigation.value)
|
||||
const headerTitle = computed(() => {
|
||||
if (props.stage === 'unit') return props.selectedHallName || '选择业务单元'
|
||||
if (props.stage === 'stop') return props.selectedBusinessUnitName || '选择讲解点'
|
||||
|
||||
@@ -5142,9 +5142,30 @@ const handleFloorChange = async (floorId: string) => {
|
||||
}
|
||||
|
||||
const showOverview = async () => {
|
||||
// 建筑外观不再作为手动切换入口;只在初始加载与缩放自动切换时展示。
|
||||
if (activeView.value === 'overview') {
|
||||
resetCamera()
|
||||
return
|
||||
}
|
||||
|
||||
const previousLoadToken = modelLoadVersion
|
||||
try {
|
||||
isLoading.value = true
|
||||
loadError.value = false
|
||||
clearMapSelection(false)
|
||||
clearRoutePreview()
|
||||
await loadOverview()
|
||||
} catch (error) {
|
||||
if (!isStaleModelLoadError(error)) {
|
||||
console.error('建筑外观模型加载失败:', error)
|
||||
loadError.value = true
|
||||
setFriendlyModelLoadError()
|
||||
}
|
||||
throw error
|
||||
} finally {
|
||||
const requestWasSuperseded = modelLoadVersion > previousLoadToken + 1
|
||||
if (!requestWasSuperseded) {
|
||||
isLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -705,6 +705,18 @@ const handleZoomClick = (direction: 'in' | 'out') => {
|
||||
emit('toolClick', direction === 'in' ? '放大' : '缩小')
|
||||
}
|
||||
|
||||
const handleShowOverview = async () => {
|
||||
indoorRendererRef.value?.disableAutoSwitchTemporarily?.(10000)
|
||||
loadingFloorId.value = ''
|
||||
requestedFloorId.value = ''
|
||||
requestedFloorLabel.value = ''
|
||||
failedFloorId.value = ''
|
||||
await indoorRendererRef.value?.showOverview?.()
|
||||
emit('selectionClear')
|
||||
emit('indoorViewChange', 'overview')
|
||||
emit('layerModeChange', 'single')
|
||||
}
|
||||
|
||||
const handleMoreTap = () => {
|
||||
emit('moreClick')
|
||||
}
|
||||
@@ -766,7 +778,8 @@ const handleOutdoorMarkerClick = (markerId: string) => {
|
||||
defineExpose({
|
||||
clearRoute: () => {
|
||||
indoorRendererRef.value?.clearRoute?.()
|
||||
}
|
||||
},
|
||||
showOverview: handleShowOverview
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user