From 91ac5497a871b2d6027986a7339795d702f731b6 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Mon, 10 Jan 2022 11:21:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=A4=A9=E6=B0=94=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E5=92=8C=E5=BB=B6=E8=BF=9F=E5=8A=A0=E8=BD=BD=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/mobile_first/ch-weather-forecast.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/application/views/mobile_first/ch-weather-forecast.php b/application/views/mobile_first/ch-weather-forecast.php index 4d4be41a..f186f18f 100644 --- a/application/views/mobile_first/ch-weather-forecast.php +++ b/application/views/mobile_first/ch-weather-forecast.php @@ -116,6 +116,7 @@ fetch(weatherUrl) document.getElementById('todayTemperature').innerText = Math.round(json.main.temp) + '°C'; 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('todayIcon').setAttribute('originalsrc', '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 + '%'; document.getElementById('todayWind').innerText = 'Wind: ' + Math.round(json.wind.speed * 3.6) + 'km/h'; @@ -169,6 +170,7 @@ fetch(forecastUrl) document.getElementById('forecastFahrenheit' + number).innerText = 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('forecastIcon' + number).setAttribute('originalsrc', '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 + '%'; document.getElementById('forecastWind' + number).innerText = 'Wind: ' + Math.round(firstDay.wind.speed * 3.6) + 'km/h';