和风天气 => 注册账号 => 控制台 => 应用管理 => 新建应用 => 获取key
js或vue中
发送ajax请求
axios.get( "https://devapi.heweather.net/v7/weather/now?location=经度,纬度&key=应用管理的key" )
.then((d) => {
console.log(d);
});
请求参数location 是经度,纬度 key 是你应用管理项目中的key
和风天气 => 注册账号 => 控制台 => 应用管理 => 新建应用 => 获取key
js或vue中
发送ajax请求
axios.get( "https://devapi.heweather.net/v7/weather/now?location=经度,纬度&key=应用管理的key" )
.then((d) => {
console.log(d);
});
请求参数location 是经度,纬度 key 是你应用管理项目中的key