7 lines
137 B
TypeScript
7 lines
137 B
TypeScript
|
|
// API 请求封装
|
||
|
|
export const fetchData = async (url: string) => {
|
||
|
|
const response = await fetch(url);
|
||
|
|
return response.json();
|
||
|
|
};
|
||
|
|
|