chore: freeze guide and explain update

This commit is contained in:
lyf
2026-06-24 18:00:25 +08:00
parent feb7310a46
commit 67c6609ae6
104 changed files with 3203572 additions and 40713 deletions

View File

@@ -106,7 +106,7 @@
<view v-else-if="routeViewState === 'outdoor-preview'" class="outdoor-preview-card">
<text class="outdoor-preview-title">室外地图预览{{ route.target }}</text>
<text class="outdoor-preview-desc">
当前仅展示室外地图参考真实馆内路线需等待 route_graph/nav_data 接入
室外地图仅作入口参考馆内当前支持三维位置预览
</text>
<view class="outdoor-preview-actions">
<view class="outdoor-preview-btn secondary" @tap="handleReturnToPreview">
@@ -142,6 +142,7 @@ import type {
} from '@/domain/museum'
import {
navigateToGuideTopTab,
saveLastGuideLocationPreviewUrl,
type GuideTopTab
} from '@/utils/guideTopTabs'
@@ -269,7 +270,7 @@ const shellConfig = computed(() => {
}
return {
searchText: `${route.value.target}`,
searchText: `位置预览:${route.value.target}`,
searchTop: '60px',
activeMode: '3d' as GuideMode,
activeFloor: activeFloor.value,
@@ -297,6 +298,40 @@ const normalizeStringOption = (value: unknown) => {
return typeof normalizedValue === 'string' ? safeDecode(normalizedValue).trim() : ''
}
const setLocationPreviewTitle = () => {
if (typeof uni !== 'undefined') {
uni.setNavigationBarTitle({
title: '位置预览'
})
}
if (typeof document !== 'undefined') {
document.title = '位置预览'
}
}
const saveCurrentLocationPreviewUrl = () => {
if (!route.value.facilityId) return
const params = new URLSearchParams({
facilityId: route.value.facilityId,
target: route.value.target,
state: routeViewState.value
})
if (route.value.startLocation?.label) {
params.set('startLabel', route.value.startLocation.label)
}
if (route.value.startLocation?.floor) {
params.set('startFloor', route.value.startLocation.floor)
}
if (route.value.startLocation?.source) {
params.set('startSource', route.value.startLocation.source)
}
saveLastGuideLocationPreviewUrl(`/pages/route/detail?${params.toString()}`)
}
const createStartLocationFromOptions = (options: Record<string, unknown>) => {
const label = normalizeStringOption(options.startLabel)
@@ -385,10 +420,14 @@ const applyRouteOptions = async (options: Record<string, unknown> = {}) => {
activeFloor.value = matchedPoi.floorLabel || guideFloorLabel(matchedPoi.floorId)
}
setLocationPreviewTitle()
saveCurrentLocationPreviewUrl()
return true
}
onLoad((options: any) => {
setLocationPreviewTitle()
void applyRouteOptions(options)
})
@@ -441,6 +480,7 @@ const handleSearchTap = () => {
const handleViewOutdoorMap = () => {
isManualLocationPanelOpen.value = false
routeViewState.value = 'outdoor-preview'
saveCurrentLocationPreviewUrl()
}
const handleShowTargetLocation = (target: Partial<RouteTargetLocation> | null) => {
@@ -451,7 +491,13 @@ const handleShowTargetLocation = (target: Partial<RouteTargetLocation> | null) =
title: '目标暂无三维位置数据',
icon: 'none'
})
return
}
uni.showToast({
title: '已显示三维位置',
icon: 'none'
})
}
const handleTargetFocus = (result: TargetPoiFocusResult) => {
@@ -467,6 +513,7 @@ const handleReturnToPreview = () => {
isManualLocationPanelOpen.value = false
routeViewState.value = 'preview'
requestTargetFocus(route.value.targetLocation)
saveCurrentLocationPreviewUrl()
}
const handleRelocate = () => {
@@ -508,17 +555,20 @@ const handleConfirmLocation = async () => {
isManualLocationPanelOpen.value = false
routeViewState.value = 'preview'
requestTargetFocus(route.value.targetLocation)
saveCurrentLocationPreviewUrl()
}
const handleModeChange = (mode: GuideMode) => {
if (routeViewState.value === 'outdoor-preview' && mode === '3d') {
routeViewState.value = 'preview'
requestTargetFocus(route.value.targetLocation)
saveCurrentLocationPreviewUrl()
return
}
if (routeViewState.value !== 'outdoor-preview' && mode === '2d') {
routeViewState.value = 'outdoor-preview'
saveCurrentLocationPreviewUrl()
return
}
@@ -537,7 +587,7 @@ const handleToolClick = (tool: string) => {
}
uni.showToast({
title: tool === '回正' ? '已回到三维总览' : guideUseCase.getRouteReadiness().message,
title: tool === '回正' ? '已回到三维总览' : guideUseCase.getRouteReadinessSnapshot().message,
icon: 'none'
})
}