From 55d132baded2127eb8699f13263938712843c1c7 Mon Sep 17 00:00:00 2001 From: userName Date: Tue, 22 Apr 2025 16:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=BD=8D=E7=BD=AE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AddressDetails/components/map.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/AddressDetails/components/map.vue b/src/components/AddressDetails/components/map.vue index bf253ca..ea32cdc 100644 --- a/src/components/AddressDetails/components/map.vue +++ b/src/components/AddressDetails/components/map.vue @@ -5,9 +5,12 @@
-
{{ item.formatted_address }}
-
{{ item.city }}
-
{{ item.district }}
+ +
{{ item.name }}
+
{{ item.cityname }}
+
{{ item.adname }}
@@ -62,12 +65,15 @@ const optionsData = ref([]) const optionsVisible = ref(false) const searchAddress = ()=>{ + axios({ method: 'get', - url: `https://restapi.amap.com/v3/geocode/geo?key=ed310f0b1f6cfd93edfba42f1a09d4d9&&city=临沂&address=`+address.value, + url: 'https://restapi.amap.com/v5/place/text?&key=ee7f561fae9249aeb971bcc661083438&keywords=' + + address.value + + '®ion=371300&citylimit=true&page_num=1&page_size=10', }).then((res) => { console.log('aaa111', res.data) - optionsData.value = res.data.geocodes + optionsData.value = res.data.pois optionsVisible.value = true }); }