Update index.js

This commit is contained in:
hwxlikemi 2025-01-25 12:58:20 +08:00 committed by GitHub
parent b8aea70f76
commit 4a49d338e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
};