diff --git a/web/src/App.vue b/web/src/App.vue index d275699..e5b936c 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -1,7 +1,12 @@ diff --git a/web/src/api/logs.ts b/web/src/api/logs.ts new file mode 100644 index 0000000..11c12ec --- /dev/null +++ b/web/src/api/logs.ts @@ -0,0 +1,14 @@ +import type { Group, LogFilter, LogsResponse } from "@/types/models"; +import http from "@/utils/http"; + +export const logApi = { + // 获取日志列表 + getLogs: (params: LogFilter): Promise => { + return http.get("/logs", { params }); + }, + + // 获取分组列表(用于筛选) + getGroups: (): Promise => { + return http.get("/groups"); + }, +}; diff --git a/web/src/components/Layout.vue b/web/src/components/Layout.vue index 6b08f53..f92d791 100644 --- a/web/src/components/Layout.vue +++ b/web/src/components/Layout.vue @@ -1,5 +1,5 @@