更新华氏度格式

hotfix/paypal-note
LiaoYijun 4 years ago
parent 1a601a5862
commit 91aa83b797

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

Loading…
Cancel
Save