refactor: 更新API接口与数据结构,统一分页返回格式
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import request from "@/utils/request";
|
||||
import type { LogPageQuery, LogPageVo } from "@/types/api";
|
||||
import type { LogQueryParams, LogItem } from "@/types/api";
|
||||
|
||||
const LOG_BASE_URL = "/api/v1/logs";
|
||||
|
||||
const LogAPI = {
|
||||
/** 获取日志分页列表 */
|
||||
getPage(queryParams: LogPageQuery) {
|
||||
return request<any, PageResult<LogPageVo[]>>({
|
||||
url: `${LOG_BASE_URL}/page`,
|
||||
getPage(queryParams: LogQueryParams) {
|
||||
return request<any, PageResult<LogItem>>({
|
||||
url: `${LOG_BASE_URL}`,
|
||||
method: "get",
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user