项目开发完成
This commit is contained in:
@@ -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()
|
||||
// 获取站点信息
|
||||
|
||||
Reference in New Issue
Block a user