From 91aa83b79739958adb171ed0740c63a6a7841943 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 13 Dec 2021 16:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=8E=E6=B0=8F=E5=BA=A6?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ch-weather-forecast.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/mobile_first/ch-weather-forecast.php b/application/views/mobile_first/ch-weather-forecast.php index d7cb98c9..8c1cb510 100644 --- a/application/views/mobile_first/ch-weather-forecast.php +++ b/application/views/mobile_first/ch-weather-forecast.php @@ -114,7 +114,7 @@ fetch(weatherUrl) let todayDate = new Date(json.dt * 1000); document.getElementById('todayDate').innerText = formatDate(todayDate); document.getElementById('todayTemperature').innerText = Math.round(json.main.temp) + '°C'; - document.getElementById('todayFahrenheit').innerText = convertToF(Math.round(json.main.temp)) + '℉'; + document.getElementById('todayFahrenheit').innerText = Math.round(convertToF(json.main.temp)) + '℉'; document.getElementById('todayIcon').src = 'https://data.chinahighlights.com/image/weather/icon-weather/' + json.weather[0].icon + '.png'; document.getElementById('todayCondition').innerText = json.weather[0].main; document.getElementById('todayHumidity').innerText = 'Humidity: ' + json.main.humidity + '%'; @@ -167,7 +167,7 @@ fetch(forecastUrl) document.getElementById('forecastTemperature' + number).innerText = Math.round(firstDay.main.temp) + '~' + Math.round(lastDay.main.temp) + '°C'; document.getElementById('forecastFahrenheit' + number).innerText = - convertToF(Math.round(firstDay.main.temp)) + '~' + convertToF(Math.round(lastDay.main.temp)) + '℉'; + Math.round(convertToF(firstDay.main.temp)) + '~' + Math.round(convertToF(lastDay.main.temp)) + '℉'; document.getElementById('forecastIcon' + number).src = 'https://data.chinahighlights.com/image/weather/icon-weather/' + firstDay.weather[0].icon + '.png'; document.getElementById('forecastCondition' + number).innerText = firstDay.weather[0].main; document.getElementById('forecastHumidity' + number).innerText = 'Humidity: ' + firstDay.main.humidity + '%';