From 8a20db021a8e3a571621185135ab1015a03ff707 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 21 Jan 2025 09:21:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(xumu):=20=E4=BC=98=E5=8C=96=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=AF=A6=E6=83=85=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8F=8A=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改请求接口地址:将 "/api/breed/death/page" 更改为 "/api/breed/death/getAuditPage" - 优化数据处理逻辑:直接使用 res.data 代替 res.data.records[0] --- project/xumu/AppDeathAudit/add.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project/xumu/AppDeathAudit/add.vue b/project/xumu/AppDeathAudit/add.vue index 885b88e9..31cbd29b 100644 --- a/project/xumu/AppDeathAudit/add.vue +++ b/project/xumu/AppDeathAudit/add.vue @@ -34,9 +34,9 @@ export default { }, getDetail() { const {id} = this.$route.query - return id && this.instance.post("/api/breed/death/page", null, {params: {id}}).then(res => { - if (res?.data?.records) { - const detail = res.data.records[0] || {} + return id && this.instance.post("/api/breed/death/getAuditPage", null, {params: {id}}).then(res => { + if (res?.data) { + const detail = res.data || {} if (detail.picture) { Object.entries(JSON.parse(detail.picture)).forEach(([key, value]) => { detail[key] = value