天气数据获取

使用说明:
请求示例:https://www.cnuseful.com/api/index/weather?code=57494
接口地址:https://www.cnuseful.com/api/index/weather
返回格式:Json
请求方式:GET

请求参数说明:

字段类型描述
codeString地区代码(必填)
返回参数说明:
字段类型描述
codeString地区代码
provinceString省份
cityString市/县/地区
dateString日期
dayString白天
nightString夜间
weatherString气温
infoString天气情况
temperatureString日间最高气温/夜间最低气温
windString风力
directString方向
powerString风力大小
JSON返回示例:
{
	"code": 1,
	"msg": "获取数据成功",
	"time": "1615452748",
	"data": {
		"code": "57494",
		"province": "湖北省",
		"city": "武汉",
		"weather": [
		{
			"date": "2021-03-11",
			"pt": "2021-03-11 20:00",
			"day": {
				"weather": {
					"info": "9999",
					"img": "9999",
					"temperature": "9999"
				},
				"wind": {
					"direct": "9999",
					"power": "9999"
				}
			},
			"night": {
				"weather": {
				"info": "多云",
				"img": "1",
				"temperature": "6"
				},
				"wind": {
				"direct": "东北风",
				"power": "微风"
				}
			}
		},
		{
			"date": "2021-03-12",
			"pt": "2021-03-11 20:00",
			"day": {
				"weather": {
					"info": "多云",
					"img": "1",
					"temperature": "19"
				},
				"wind": {
					"direct": "东风",
					"power": "微风"
				}
			},
			"night": {
				"weather": {
					"info": "小雨",
					"img": "7",
					"temperature": "9"
				},
				"wind": {
					"direct": "东风",
					"power": "微风"
				}
			}
		}
		]
	}
}