修复馆内三维点位显示异常
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-04 23:42:05 +08:00
parent f03783201d
commit 39f1fc1198
5 changed files with 629 additions and 47 deletions

View File

@@ -31,8 +31,8 @@ import type {
} from '@/data/providers/sgsSdkApiProvider'
const defaultCategory: MuseumCategory = {
id: 'operation_experience',
label: '导览点位',
id: 'poi',
label: '点位',
iconType: 'poi'
}
@@ -55,9 +55,24 @@ const hallEntranceCategory: MuseumCategory = {
}
const categoryBySgsType: Record<string, MuseumCategory & { accessible?: boolean }> = {
toilet: {
id: 'basic_service_facility',
label: '卫生间',
poi: {
id: 'poi',
label: '点位',
iconType: 'poi'
},
device_terminal: {
id: 'poi',
label: '点位',
iconType: 'poi'
},
operation_experience: {
id: 'operation_experience',
label: '导览点位',
iconType: 'poi'
},
toilet: {
id: 'basic_service_facility',
label: '卫生间',
iconType: 'toilet'
},
accessible_toilet: {
@@ -412,6 +427,10 @@ const categoryFor = (poi: SgsPoiPayload): MuseumCategory & { accessible?: boolea
}
}
if (String(poi.poiGroup || '').toUpperCase() === 'OTHER') {
return categoryBySgsType[normalizedType || ''] || defaultCategory
}
if (normalizedType && categoryBySgsType[normalizedType]) {
return categoryBySgsType[normalizedType]
}