修复点位楼层跳转并优化模型加载缓存
This commit is contained in:
@@ -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)}`
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user