feat: 访问记录后台分页,支持时间范围/操作/键过滤
build-and-deploy / build-and-deploy (push) Successful in 43s

This commit is contained in:
jif2.zhang
2026-09-21 10:49:55 +08:00
parent ed1457e582
commit dc4c67e386
8 changed files with 304 additions and 42 deletions
+9 -3
View File
@@ -93,9 +93,15 @@ const API = {
return this.request(`/api/projects/${projectId}/configs/${configId}`, { method: "DELETE" });
},
getAudit(projectId, key) {
const qs = key ? `?key=${encodeURIComponent(key)}` : "";
return this.request(`/api/projects/${projectId}/configs/audit${qs}`);
getAudit(projectId, filters = {}) {
const qs = new URLSearchParams();
for (const k of ["key", "action", "start", "end", "page", "pageSize"]) {
if (filters[k] !== undefined && filters[k] !== null && filters[k] !== "") {
qs.append(k, filters[k]);
}
}
const str = qs.toString();
return this.request(`/api/projects/${projectId}/configs/audit${str ? "?" + str : ""}`);
},
// ========== 模式 ==========