menu 薛眠羊API 文章列表
desktop_mac
fiber_dvr
location_on
desktop_mac
desktop_mac
brightness_7
border_color
fiber_dvr

城市天气获取

使用教程


请求地址 https://api.xuemy.cn/api/weather

返回数据 { "data":{ "yesterday":{ "date":"13日星期一", "high":"高温 27℃", "fx":"东风", "low":"低温 18℃", "fl":"", "type":"小雨" }, "city":"北京", "forecast":[ { "date":"14日星期二", "high":"高温 26℃", "fengli":"", "low":"低温 18℃", "fengxiang":"东风", "type":"多云" }, { "date":"15日星期三", "high":"高温 27℃", "fengli":"", "low":"低温 18℃", "fengxiang":"东南风", "type":"多云" }, { "date":"16日星期四", "high":"高温 29℃", "fengli":"", "low":"低温 19℃", "fengxiang":"东南风", "type":"多云" }, { "date":"17日星期五", "high":"高温 32℃", "fengli":"", "low":"低温 21℃", "fengxiang":"东风", "type":"阴" }, { "date":"18日星期六", "high":"高温 33℃", "fengli":"", "low":"低温 22℃", "fengxiang":"东南风", "type":"多云" } ], "ganmao":"感冒低发期,天气舒适,请注意多吃蔬菜水果,多喝水哦。", "wendu":"23" }, "status":1000, "desc":"OK" }

Example
						<a href="https://api.xuemy.cn/api/weather/?city=%E5%8C%97%E4%BA%AC">https://api.xuemy.cn/api/weather/?city=北京</a>
					

请求参数

参数名称 类型 参数值 描述
city 必填 city 即需要查询天气的城市名称