|
@@ -231,16 +231,22 @@ import {
|
|
|
|
|
|
function getCityName(latitude, longitude) {
|
|
function getCityName(latitude, longitude) {
|
|
const Key = `KBYBZ-FS3KZ-U2FXR-7VPDX-L7J46-23F55`
|
|
const Key = `KBYBZ-FS3KZ-U2FXR-7VPDX-L7J46-23F55`
|
|
- const url = `https://apis.map.qq.com/ws/geocoder/v1/?location=${latitude},${longitude}&key=${Key}`;
|
|
|
|
|
|
+ // const url = `https://apis.map.qq.com/ws/geocoder/v1?location=${latitude},${longitude}&key=${Key}&output=jsonp`;
|
|
|
|
+ const url = `https://apis.map.qq.com/ws/geocoder/v1`;
|
|
//const url = `https://apis.map.qq.com/ws/geocoder/v1/`;
|
|
//const url = `https://apis.map.qq.com/ws/geocoder/v1/`;
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
- jsonp(url, {}).then(res => {
|
|
|
|
|
|
+ jsonp(url, {
|
|
|
|
+ location: `${latitude},${longitude}`,
|
|
|
|
+ key:Key,
|
|
|
|
+ output:'jsonp'
|
|
|
|
+ }, 'ccc').then(res => {
|
|
console.log('res', res);
|
|
console.log('res', res);
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
console.log('err', err);
|
|
console.log('err', err);
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
|
|
|
})
|
|
})
|
|
|
|
+
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
// #ifdef APP
|
|
// #ifdef APP
|