public class CWeather
{
public static string GetAllWetherInfo()
{
string info = "";
info += GetCityWetherIfo("天津") + " " + GetCityWetherIfo("唐山") + " " + GetCityWetherIfo("承德");
return info;
}
public static string GetCityWetherIfo(string cityName)
{
string strWether;
string CenterName;
string url;
//城市的中文名称
string CityCName;
string rootName;
if (cityName == "天津" || cityName == "天津市" || cityName == "tianjin")
{
url = "http://flash.weather.com.cn/wmaps/xml/" + "tianjin.xml";
CenterName = "市中心";
CityCName = "天津";
rootName = "tianjin";
}
else if (cityName == "承德" || cityName == "承德市" || cityName == "chengde")
获取天气预报接口
最新推荐文章于 2025-10-10 16:45:27 发布

最低0.47元/天 解锁文章

1万+

被折叠的 条评论
为什么被折叠?



