This commit is contained in:
@@ -135,7 +135,7 @@
|
||||
<view class="guide-quick-icon-floor top"></view>
|
||||
<view class="guide-quick-icon-floor bottom"></view>
|
||||
</view>
|
||||
<text class="guide-quick-action-text">馆内</text>
|
||||
<text class="guide-quick-action-text">{{ indoorQuickActionLabel }}</text>
|
||||
</view>
|
||||
<view
|
||||
class="guide-quick-action"
|
||||
@@ -416,10 +416,12 @@ const routeReady = ref(false)
|
||||
const activeRoutePreview = ref<GuideRouteResult | null>(null)
|
||||
const isSimulatingRoute = ref(false)
|
||||
const isPoiCardCollapsed = ref(false)
|
||||
const returningToOverview = ref(false)
|
||||
|
||||
// GuideMapShell 组件引用,用于显式调用路线清除方法
|
||||
const guideMapShellRef = ref<{
|
||||
clearRoute?: () => void
|
||||
showOverview?: () => Promise<void> | void
|
||||
} | null>(null)
|
||||
const homeSearchPanelRef = ref<{
|
||||
expandHomePanel?: () => void
|
||||
@@ -696,6 +698,9 @@ const guideQuickActiveAction = computed<'indoor' | 'arrival' | 'explain'>(() =>
|
||||
if (showArrivalPanel.value) return 'arrival'
|
||||
return is3DMode.value ? 'indoor' : 'arrival'
|
||||
})
|
||||
const indoorQuickActionLabel = computed(() => (
|
||||
is3DMode.value && indoorView.value !== 'overview' ? '外观' : '馆内'
|
||||
))
|
||||
|
||||
const toRoutePointOption = (target: GuideRouteTarget): RoutePointOption => ({
|
||||
poiId: target.poiId,
|
||||
@@ -1299,7 +1304,36 @@ const handleSwitchEntrance = () => {
|
||||
guideOutdoorState.value = 'home'
|
||||
}
|
||||
|
||||
const handleMoreRouteGuide = () => {
|
||||
const handleMoreRouteGuide = async () => {
|
||||
if (returningToOverview.value) return
|
||||
|
||||
if (is3DMode.value && indoorView.value !== 'overview') {
|
||||
returningToOverview.value = true
|
||||
showRoutePlanner.value = false
|
||||
selectedGuidePoi.value = null
|
||||
isPoiCardCollapsed.value = false
|
||||
isSimulatingRoute.value = false
|
||||
requestedFloorId.value = ''
|
||||
requestedFloorLabel.value = ''
|
||||
loadingFloorId.value = ''
|
||||
failedFloorId.value = ''
|
||||
clearRoutePreviewState()
|
||||
|
||||
try {
|
||||
await guideMapShellRef.value?.showOverview?.()
|
||||
indoorView.value = 'overview'
|
||||
guideOutdoorState.value = 'home'
|
||||
closeHomeSearchDock()
|
||||
showIndoorHint('已返回建筑外观,可放大再次进入馆内', 3200)
|
||||
} catch (error) {
|
||||
console.error('返回建筑外观失败:', error)
|
||||
showIndoorHint('建筑外观加载失败,请稍后重试', 3200)
|
||||
} finally {
|
||||
returningToOverview.value = false
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
closeArrivalPanel()
|
||||
showRoutePlanner.value = false
|
||||
is3DMode.value = true
|
||||
|
||||
Reference in New Issue
Block a user