This commit is contained in:
2026-07-30 13:37:52 +08:00
parent 5dbcea275e
commit 3a13daed0e
4 changed files with 4 additions and 12 deletions
-3
View File
@@ -102,7 +102,6 @@ const loading = ref(false)
const searched = ref(false)
const error = ref('')
const page = ref(1)
const offset = ref(20)
const maxPage = ref(1)
const activePoi = ref(null)
@@ -299,7 +298,6 @@ async function doSearch() {
kw,
city.value,
page.value,
offset.value,
centerLng.value,
centerLat.value,
radius.value,
@@ -308,7 +306,6 @@ async function doSearch() {
total.value = data.total || 0
maxPage.value = data.maxPage || 1
page.value = data.page || 1
offset.value = data.offset || 20
// 在地图上标注
if (mapRef.value && results.value.length > 0) {
+2 -2
View File
@@ -5,8 +5,8 @@ const api = axios.create({
timeout: 30000,
})
export async function searchPoi(keywords, city = '', page = 1, offset = 20, longitude = 0, latitude = 0, radius = 3000) {
const params = { keywords, page, offset }
export async function searchPoi(keywords, city = '', page = 1, longitude = 0, latitude = 0, radius = 3000) {
const params = { keywords, page }
if (city) params.city = city
if (longitude) params.longitude = longitude
if (latitude) params.latitude = latitude