如何调用免费的天气接口获取当地天气状况?

如何调用免费的天气接口获取当地天气状况?

注册完开发账号即可调用,我们来试一下

1.请求

1
2
3
4
5
6
7
tianqiapi(data){
return request({
url:'https://tianqiapi.com/api?version=v6&appid=你的APPID&appsecret=你的秘钥',
method: 'post',
data
})
}

2.调用拿到返回结果

地址:https://www.tianqiapi.com/index/doc?version=v6

# VUE
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×