From b918132f0e70a28d292d9c0faff85a4acad791c6 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Tue, 22 Feb 2022 15:25:01 -0800 Subject: [PATCH] fix: move language to the end of the API key --- src/App.vue | 2 +- src/views/WeatherView.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index ecd8a72..dca89e5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -73,7 +73,7 @@ export default { const response = await axios.get( `https://api.openweathermap.org/data/2.5/weather?q=${ doc.doc.data().city - }&units=metric&lang='zh_cn'&appid=${this.APIkey}` + }&units=metric&appid=${this.APIkey}&lang=zh_cn` ); const data = response.data; firebaseDB diff --git a/src/views/WeatherView.vue b/src/views/WeatherView.vue index cd3fe94..4f78a10 100644 --- a/src/views/WeatherView.vue +++ b/src/views/WeatherView.vue @@ -62,9 +62,9 @@ export default { doc.data().currentWeather.coord.lat }&lon=${ doc.data().currentWeather.coord.lon - }&exclude=current,minutley,alerts&units=metric&lang='zh_cn'&appid=${ + }&exclude=current,minutley,alerts&units=metric&appid=${ this.APIkey - }` + }&lang=zh_cn` ) .then((res) => { this.forecast = res.data;