From dd7ff73d285f6c47cd2b68c6980a1f0581b35938 Mon Sep 17 00:00:00 2001 From: qian Date: Fri, 5 Jun 2026 23:34:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AE=A1=E8=AE=A1=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=A6=E6=83=85=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/admin/v1/audit.go | 8 +++++++- web/admin/src/views/monitor/ErrorLogsPage.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api/admin/v1/audit.go b/api/admin/v1/audit.go index 5bf8d08..e91d470 100644 --- a/api/admin/v1/audit.go +++ b/api/admin/v1/audit.go @@ -1,6 +1,8 @@ package v1 import ( + "encoding/json" + "github.com/gogf/gf/v2/frame/g" ) @@ -85,7 +87,11 @@ type RequestAuditLogDetailReq struct { } type RequestAuditLogDetailRes struct { - Data map[string]any `json:"data"` + Data map[string]any `json:"-"` +} + +func (r *RequestAuditLogDetailRes) MarshalJSON() ([]byte, error) { + return json.Marshal(r.Data) } // OperationLogExportReq 导出操作日志请求 diff --git a/web/admin/src/views/monitor/ErrorLogsPage.vue b/web/admin/src/views/monitor/ErrorLogsPage.vue index 7486bad..f62bfea 100644 --- a/web/admin/src/views/monitor/ErrorLogsPage.vue +++ b/web/admin/src/views/monitor/ErrorLogsPage.vue @@ -152,7 +152,7 @@ async function openDetail(id: number) { detailLoading.value = true try { const res = await request.get(`/admin/error-logs/${id}`) - detailData.value = res.data?.data?.data + detailData.value = res.data?.data } catch { // error auto-shown } finally {