소스 검색

移除无用script

wangxy 2 달 전
부모
커밋
6bc6430173
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      components/customMap/customMap.vue

+ 8 - 2
components/customMap/customMap.vue

@@ -231,16 +231,22 @@ import {
 
 	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}`;
+		// 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/`;
 		// #ifdef H5
-		jsonp(url, {}).then(res => {
+		jsonp(url, {
+			location: `${latitude},${longitude}`,
+			key:Key,
+			output:'jsonp'
+		}, 'ccc').then(res => {
 			console.log('res', res);
 		}).catch(err => {
 			console.log('err', err);
 		}).finally(() => {
 
 		})
+
 		// #endif
 
 		// #ifdef APP