修复点位楼层跳转并优化模型加载缓存

This commit is contained in:
lyf
2026-07-02 16:42:38 +08:00
parent 7cda427de9
commit 9b1f855515
8 changed files with 750 additions and 41 deletions

View File

@@ -296,16 +296,25 @@ const handleFloorChange = (floor: string) => {
activeFloor.value = floor
}
const encodeQueryValue = (value: string) => encodeURIComponent(value)
const createPoiLocationQuery = (poi: MuseumPoi) => (
`id=${encodeQueryValue(poi.id)}`
+ `&target=${encodeQueryValue(poi.name)}`
+ `&floorId=${encodeQueryValue(poi.floorId)}`
+ `&floorLabel=${encodeQueryValue(poi.floorLabel)}`
)
const handleResultTap = (poi: MuseumPoi) => {
if (poi.primaryCategory.id === 'operation_experience') {
uni.navigateTo({
url: `/pages/route/detail?facilityId=${poi.id}&target=${encodeURIComponent(poi.name)}&state=preview`
url: `/pages/route/detail?facilityId=${encodeQueryValue(poi.id)}&target=${encodeQueryValue(poi.name)}&floorId=${encodeQueryValue(poi.floorId)}&state=preview`
})
return
}
uni.navigateTo({
url: `/pages/facility/detail?id=${poi.id}&target=${encodeURIComponent(poi.name)}`
url: `/pages/facility/detail?${createPoiLocationQuery(poi)}`
})
}