Browse Source

天气

develop
bobol 11 months ago
parent
commit
deb63c17a5
  1. 2
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

2
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

@ -188,7 +188,7 @@ public class DcBusiDataScreenMainController extends BaseController{
String yikeapiAppsecret;
@GetMapping("/weather/{areaCode}")
public AjaxResult getWeather(@PathVariable String areaCode){
String url=StrUtil.format("https://v0.yiketianqi.com/free/week?city=沈阳&unescape=1&appid={}&appsecret={}",yikeapiAppid,yikeapiAppsecret);
String url=StrUtil.format("https://v1.yiketianqi.com/free/week?city=沈阳&unescape=1&appid={}&appsecret={}",yikeapiAppid,yikeapiAppsecret);
JSONObject weather=JSONObject.parseObject(HttpUtil.get(url));
JSONArray weatherInfo=Optional.ofNullable(weather.getJSONArray("data")).orElse(new JSONArray());
JSONArray we_date=new JSONArray();

Loading…
Cancel
Save