Update index.js

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

View File

@ -55,14 +55,14 @@ export const getHitokoto = async () => {
// 获取高德地理位置信息
export const getAdcode = async (key) => {
const res = await fetch(`https://restapi.amap.com/v3/ip?key=${key}`);
const res = await fetch(`https://restapi.amap.com/v3/ip?key=cbea1902cff38bf4d765c9931017a230`);
return await res.json();
};
// 获取高德地理天气信息
export const getWeather = async (key, city) => {
const res = await fetch(
`https://restapi.amap.com/v3/weather/weatherInfo?key=${key}&city=${city}`,
`https://restapi.amap.com/v3/weather/weatherInfo?key=cbea1902cff38bf4d765c9931017a230&city=440783`,
);
return await res.json();
};
@ -70,6 +70,6 @@ export const getWeather = async (key, city) => {
// 获取教书先生天气 API
// https://api.oioweb.cn/doc/weather/GetWeather
export const getOtherWeather = async () => {
const res = await fetch("https://api.vvhan.com/api/weather");
const res = await fetch("null");
return await res.json();
};