项目开发完成

This commit is contained in:
2025-04-17 20:18:20 +08:00
parent 6c36a443f6
commit a404f89f9e
7 changed files with 98 additions and 34 deletions

View File

@@ -130,6 +130,7 @@ function Home() {
id: item.id,
latitude: item.latitude,
longitude: item.longitude,
title: `${item.organization}`,
name: item.organization
})
})
@@ -151,18 +152,27 @@ function Home() {
}
const reload = () => {
setMarkers([])
pageHjmCar({keywords}).then(res => {
setList(res?.list || [])
if (res?.list && res?.list.length > 0) {
// const data = res?.list[0];
// setLongitude(data?.longitude)
// setLatitude(data?.latitude)
setScale(16)
const data = res?.list[0];
setLongitude(data?.longitude)
setLatitude(data?.latitude)
setMarkers([{
id: data.id,
latitude: data.latitude,
longitude: data.longitude,
title: `${data.organization}`,
name: `${data.organization}`
}])
}
})
};
useEffect(() => {
Taro.hideTabBar()
// Taro.hideTabBar()
setScale(14)
getLocation().then()
// 获取站点信息