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 + '%';