From 269dd5ced2572e881932e4d34b4ff3f7b7c98893 Mon Sep 17 00:00:00 2001 From: Snowykami <79104275+snowykami@users.noreply.github.com> Date: Mon, 29 Apr 2024 07:29:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=BD=BB=E9=9B=AA=E5=A4=A9=E6=B0=94?= =?UTF-8?q?=E6=98=9F=E6=9C=9F=E5=87=A0=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/liteyuki_weather/templates/js/weather_now.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js b/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js index aafdd91c..0c41c51a 100644 --- a/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js +++ b/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js @@ -80,11 +80,11 @@ weatherHourly['hourly'].forEach( let maxDailyItem = 7 // 第一和第二天用today和tomorrow,后面用星期X英文小写 -let daysStandard = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] +let daysStandard = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] let todayDay = new Date().getDay() let days = [localData['today'], localData['tomorrow']] for (let i = 0; i < 5; i++) { - days.push(localData[daysStandard[(todayDay + i) % 7]]) + days.push(localData[daysStandard[(todayDay) % 7]]) } weatherDaily['daily'].forEach( (item, index) => { From 8f906f2d124c824d243f573b0fda200feee7341b Mon Sep 17 00:00:00 2001 From: Snowykami <79104275+snowykami@users.noreply.github.com> Date: Mon, 29 Apr 2024 07:35:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=A4=A9=E6=B0=94=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/resources/liteyuki_weather/templates/js/weather_now.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js b/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js index 0c41c51a..ceacc093 100644 --- a/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js +++ b/liteyuki/resources/liteyuki_weather/templates/js/weather_now.js @@ -84,7 +84,7 @@ let daysStandard = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'fri let todayDay = new Date().getDay() let days = [localData['today'], localData['tomorrow']] for (let i = 0; i < 5; i++) { - days.push(localData[daysStandard[(todayDay) % 7]]) + days.push(localData[daysStandard[(todayDay+2+i) % 7]]) } weatherDaily['daily'].forEach( (item, index) => {