From 550545fa3e1ef45dd3e8ebc19dc3d69d4e156c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Libw=C2=B7I?= Date: Sat, 24 Feb 2024 21:18:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=87=E7=94=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=8E=B7=E5=8F=96=E5=A4=A9=E6=B0=94=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Weather.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Weather.vue b/src/components/Weather.vue index 24acea3..7d08743 100644 --- a/src/components/Weather.vue +++ b/src/components/Weather.vue @@ -48,14 +48,14 @@ const getWeatherData = async () => { console.log(result); const data = result.result; weatherData.adCode = { - city: data.city.city_name || "未知地区", + city: data.city.City || "未知地区", // adcode: data.city.cityId, }; weatherData.weather = { - weather: data.condition.condition, - temperature: data.condition.temp, - winddirection: data.condition.windDir, - windpower: data.condition.windLevel, + weather: data.condition.day_weather, + temperature: (+data.condition.max_degree + +data.condition.min_degree) / 2, + winddirection: data.condition.day_wind_direction, + windpower: data.condition.day_wind_power, }; } else { // 获取 Adcode