# getAppWeatherInfo ^7.8
获取天气信息
# 请求参数
| Prop | Type | Default | Comment | 
|---|---|---|---|
| isNeedRefresh | Boolean | N/A | 是否需要 APP 刷新数据,默认是否 | 
# 引入接口模块
import bridge from '@minix-iot/etsbridge-sdk'
1
# 接口调用示例
const params = {
  isNeedRefresh: true,
}
bridge
  .getAppWeatherInfo(params)
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 接口返回示例
{
    "status": 0, //0:表示成功
    "grade" : "29", //温度
    "weatherStatus" : "多云",
    "windDirection" : "风向(比如南风)",
    "aqi" : "24", //空气质量 0-50优 51-100 良好 100- 差
    "publicDate" : "15:40", //发布时间
    "windForce" :"4", //风速
     "wetness": "79" //湿度
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12