feat: wire guide data source and POI focus UI

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lyf
2026-06-12 09:25:22 +08:00
parent a6bfda30e1
commit 2055b13b90
58 changed files with 5768 additions and 1898 deletions

View File

@@ -1,98 +0,0 @@
/**
* Legacy demo data loader.
*
* 当前导览模块不要再从 src/assets/data 取数;室内导览、搜索、位置预览
* 统一使用 src/services/navAssets.ts 读取 clean nav assets。
* 这里保留给尚未重构的历史演示页面,避免删除造成不可控回归。
*/
// 加载楼层数据
export const loadFloors = async () => {
try {
const data = await import('@/assets/data/floors.json')
return data.default || data
} catch (error) {
console.error('加载楼层数据失败:', error)
return []
}
}
// 加载展厅数据
export const loadHalls = async () => {
try {
const data = await import('@/assets/data/halls.json')
return data.default || data
} catch (error) {
console.error('加载展厅数据失败:', error)
return []
}
}
// 加载展品数据
export const loadExhibits = async () => {
try {
const data = await import('@/assets/data/exhibits.json')
return data.default || data
} catch (error) {
console.error('加载展品数据失败:', error)
return []
}
}
// 加载设施数据
export const loadFacilities = async () => {
try {
const data = await import('@/assets/data/facilities.json')
return data.default || data
} catch (error) {
console.error('加载设施数据失败:', error)
return []
}
}
// 加载路线数据
export const loadRoutes = async () => {
try {
const data = await import('@/assets/data/routes.json')
return data.default || data
} catch (error) {
console.error('加载路线数据失败:', error)
return []
}
}
// 根据 ID 查找展品
export const findExhibitById = async (id: string) => {
const exhibits = await loadExhibits()
return exhibits.find((item: any) => item.id === id)
}
// 根据 ID 查找展厅
export const findHallById = async (id: string) => {
const halls = await loadHalls()
return halls.find((item: any) => item.id === id)
}
// 根据 ID 查找设施
export const findFacilityById = async (id: string) => {
const facilities = await loadFacilities()
return facilities.find((item: any) => item.id === id)
}
// 根据 ID 查找路线
export const findRouteById = async (id: string) => {
const routes = await loadRoutes()
return routes.find((item: any) => item.id === id)
}
// 根据楼层筛选展厅
export const filterHallsByFloor = async (floorId: string) => {
const halls = await loadHalls()
return halls.filter((item: any) => item.floor === floorId)
}
// 根据展厅筛选展品
export const filterExhibitsByHall = async (hallId: string) => {
const exhibits = await loadExhibits()
return exhibits.filter((item: any) => item.hallId === hallId)
}