getWeatherInfo ^5.0.0
根据城市对应的气象局ID获取城市天气信息,比如温度,风向等信息
#请求参数
| Prop |
Type |
Required |
Default |
Description |
param |
Object |
Y |
{} 属性: cityNo: |
请求参数 |
#接口调用示例
this.$bridge
.getWeatherInfo(param)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
| Prop |
Type |
Default |
Description |
status |
Number |
0/1 |
0 成功 |
grade |
String |
N/A |
温度 |
weatherStatus |
String |
N/A |
气象 |
windDirection |
String |
N/A |
风向 |
windForce |
String |
N/A |
风速 |
wetness |
String |
N/A |
湿度 |
aqi |
String |
N/A |
空气质量(0-50 优/51-100 良好/100+ 差) |
publicDate |
String |
N/A |
发布时间(15:30) |
| Prop |
Type |
Default |
Description |
errorCode |
Number |
N/A |
-1 请求失败 |
errorMessage |
String |
N/A |
错误消息(如有) |