1.先在高德开发平台申请key,记得选择web服务
2.然后直接在代码里面get请求
示例
//请求高德天气
const gaodeWeather = async () =>{
const res = await axios.get('https://restapi.amap.com/v3/weather/weatherInfo?key=234e06465507fad793f681f3d494df70&city=420100&extensions=all')
console.log(res)
}
3.返回