完成目录级别样式

This commit is contained in:
宇阳
2024-08-25 21:41:00 +08:00
parent 586b811622
commit 8a8aa012d7
9 changed files with 131 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
const url = "http://localhost:9999/api"
export default async <T>(api: string) => {
const res = await fetch(`${url}${api}`)
export default async <T>(api: string, data?: any) => {
const res = await fetch(`${url}${api}`, data)
return res.json() as Promise<Response<T>>;
}