|
@@ -76,14 +76,15 @@
|
|
|
const result = ref(null);
|
|
|
const filterPopup = ref(null);
|
|
|
let currentCity = ref('选择城市');
|
|
|
+
|
|
|
function select(data) {
|
|
|
console.log('data', data);
|
|
|
currentCity.value = data.name; // 更新当前城市
|
|
|
- filterPopup.value.close()
|
|
|
- getCityLocation(data.name);
|
|
|
+ filterPopup.value.close()
|
|
|
+ getCityLocation(data.name);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
function openPopup(data) {
|
|
|
console.log('data', data);
|
|
@@ -98,7 +99,7 @@
|
|
|
|
|
|
function getCityLocation(city) {
|
|
|
console.log('222222');
|
|
|
- console.log('city',city);
|
|
|
+ console.log('city', city);
|
|
|
const Key = `KBYBZ-FS3KZ-U2FXR-7VPDX-L7J46-23F55`
|
|
|
const url = `https://apis.map.qq.com/ws/geocoder/v1/?address=${city}&key=${Key}`;
|
|
|
|
|
@@ -222,6 +223,7 @@
|
|
|
height: 30
|
|
|
}]
|
|
|
})
|
|
|
+
|
|
|
function getCityName(latitude, longitude) {
|
|
|
const Key = `KBYBZ-FS3KZ-U2FXR-7VPDX-L7J46-23F55`
|
|
|
const url = `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=${Key}`;
|