flat: 暂存 添加定位处理70%,key达上限未测

This commit is contained in:
Apcallover
2024-04-22 10:43:23 +08:00
parent 3cb42d7be1
commit c662539768
8 changed files with 96 additions and 38 deletions

View File

@@ -23,15 +23,22 @@ export const getcoder = (location, key, get_poi) => {
reject(err)
})
})
// return request({
// url: 'https://apis.map.qq.com/ws/geocoder/v1',
// method: 'get',
// params: {
// location,
// key,
// get_poi
// }
// })
}
// 地名解析
export const getAddresscoder = (params) => {
return new Promise((resolve, reject) => {
const paramsData = {
...params,
output: 'jsonp'
}
jsonp('https://apis.map.qq.com/ws/geocoder/v1', paramsData, 30000)
.then((response) => {
return response
}).catch(err => {
reject(err)
})
})
}
/*关键词输入提示*/