mirror of
https://github.com/imsyy/home.git
synced 2025-05-20 13:10:14 +09:00
Update index.js
This commit is contained in:
parent
bb1cd7a012
commit
b8aea70f76
@ -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();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user