城市天气获取

1.功能介绍

城市天气获取api用于获取国内城市的天气信息。

2.请求地址

https://api.szfx.top/weather

3.请求参数

参数 类型 参数值 描述
city 必填 中文 需要获取天气信息的城市名

4.请求示例

https://api.szfx.top/weather/?city=北京

5.返回数据

{
    data: {
        yesterday: {
        date: "6日星期六",
        high: "高温 16℃",
        fx: "北风",
        low: "低温 -3℃",
        fl: "<![CDATA[2级]]>",
        type: "晴"
    },
    city: "北京",
    forecast: [
    {
        date: "7日星期天",
        high: "高温 6℃",
        fengli: "<![CDATA[2级]]>",
        low: "低温 -5℃",
        fengxiang: "北风",
        type: "晴"
    },
    {
        date: "8日星期一",
        high: "高温 7℃",
        fengli: "<![CDATA[1级]]>",
        low: "低温 -5℃",
        fengxiang: "东北风",
        type: "多云"
    },
    {
        date: "9日星期二",
        high: "高温 9℃",
        fengli: "<![CDATA[1级]]>",
        low: "低温 -3℃",
        fengxiang: "北风",
        type: "多云"
    },
    {
        date: "10日星期三",
        high: "高温 12℃",
        fengli: "<![CDATA[1级]]>",
        low: "低温 -3℃",
        fengxiang: "北风",
        type: "多云"
    },
    {
        date: "11日星期四",
        high: "高温 9℃",
        fengli: "<![CDATA[1级]]>",
        low: "低温 -1℃",
        fengxiang: "北风",
        type: "多云"
    }
    ],
    ganmao: "感冒高发期,尽量避免外出,外出戴口罩防护。",
    wendu: "5"
    },
    status: 1000,
    desc: "OK"
}

6.调用效果

暂无

Copyright © szfx.top 2021            updated: 2021-02-07 19:24:55

results matching ""

    No results matching ""