diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 42d4f928..b85b68cf 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -13,6 +13,7 @@ @@ -183,18 +184,15 @@ export default { created() { this.getNowWeather() + this.getForecastWeather() }, methods: { //获取预报天气 getForecastWeather() { - this.loading = true; getForecastWeather().then(res => { this.forecastWeatherData = res.data - this.loading = false; }) - this.getNowWeather() - }, //获取实时天气 diff --git a/ruoyi-ui/src/views/system/user/profile/index.vue b/ruoyi-ui/src/views/system/user/profile/index.vue index aa8d9e61..d0278606 100644 --- a/ruoyi-ui/src/views/system/user/profile/index.vue +++ b/ruoyi-ui/src/views/system/user/profile/index.vue @@ -1,91 +1,95 @@ - - - + + + diff --git a/xjs-business/xjs-business-openapi/src/main/java/com/xjs/weather/service/impl/WeatherServiceImpl.java b/xjs-business/xjs-business-openapi/src/main/java/com/xjs/weather/service/impl/WeatherServiceImpl.java index 20424aee..f5d27579 100644 --- a/xjs-business/xjs-business-openapi/src/main/java/com/xjs/weather/service/impl/WeatherServiceImpl.java +++ b/xjs-business/xjs-business-openapi/src/main/java/com/xjs/weather/service/impl/WeatherServiceImpl.java @@ -104,7 +104,7 @@ public class WeatherServiceImpl implements WeatherService { if (StringUtils.contains(startDate, today) && StringUtils.contains(endDate,today)) { dateTime.add(DateUtil.format(weather.getReporttime(), "HH:mm")); } else { - dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd")); + dateTime.add(DateUtil.format(weather.getReporttime(), "MM-dd HH:mm")); } temperature.add(weather.getTemperature());