|
@ -188,7 +188,7 @@ public class DcBusiDataScreenMainController extends BaseController{ |
|
|
String yikeapiAppsecret; |
|
|
String yikeapiAppsecret; |
|
|
@GetMapping("/weather/{areaCode}") |
|
|
@GetMapping("/weather/{areaCode}") |
|
|
public AjaxResult getWeather(@PathVariable String 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)); |
|
|
JSONObject weather=JSONObject.parseObject(HttpUtil.get(url)); |
|
|
JSONArray weatherInfo=Optional.ofNullable(weather.getJSONArray("data")).orElse(new JSONArray()); |
|
|
JSONArray weatherInfo=Optional.ofNullable(weather.getJSONArray("data")).orElse(new JSONArray()); |
|
|
JSONArray we_date=new JSONArray(); |
|
|
JSONArray we_date=new JSONArray(); |
|
|