From f6d56d9b3fd22af0b275770e0addcc01b4bbdd8f Mon Sep 17 00:00:00 2001 From: xjs <1294405880@qq.com> Date: Wed, 2 Feb 2022 23:35:42 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=89=8D=E7=AB=AF=E5=8F=B3=E4=B8=8A?= =?UTF-8?q?=E8=A7=92=E5=A4=A9=E6=B0=94=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=A2=84=E6=8A=A5=E5=A4=A9=E6=B0=94=202?= =?UTF-8?q?=E3=80=81=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=AC=A1=E6=95=B0=203=E3=80=81=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=A4=A9=E6=B0=94=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/Navbar.vue | 6 +- .../src/views/system/user/profile/index.vue | 186 +++++++++--------- .../service/impl/WeatherServiceImpl.java | 2 +- 3 files changed, 98 insertions(+), 96 deletions(-) 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());