diff --git a/src/api/index.js b/src/api/index.js index 04de016..5e2e15c 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -62,7 +62,7 @@ export const getAdcode = async (key) => { // 获取高德地理天气信息 export const getWeather = async (key, city) => { const res = await fetch( - `https://restapi.amap.com/v3/weather/weatherInfo?key=cbea1902cff38bf4d765c9931017a230&city=440783`, + `https://restapi.amap.com/v3/weather/weatherInfo?key=cbea1902cff38bf4d765c9931017a230&city=${city}`, ); return await res.json(); };