From 5fe82a68ef982f0fa90c85f18d7499d3959eeaf0 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 9 Jan 2025 15:41:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(xumu):=20=E4=BF=AE=E5=A4=8D=E8=80=B3?= =?UTF-8?q?=E6=A0=87=E5=8F=B7=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 API 请求参数,添加 pageSize 和 pageNum - 修改数据处理逻辑,使用 records[0] 而不是直接使用 data - 优化代码格式,删除多余的空格和换行 --- project/xumu/components/AiEartagRemote.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/xumu/components/AiEartagRemote.vue b/project/xumu/components/AiEartagRemote.vue index 5576b70c..10ad70ed 100644 --- a/project/xumu/components/AiEartagRemote.vue +++ b/project/xumu/components/AiEartagRemote.vue @@ -14,9 +14,9 @@ export default { methods: { getText(biochipEarNumber) { this.info = {} - return this.instance.post("/api/breed/earTag/page", null, { params: { biochipEarNumber } }).then(res => { - if (res?.data) { - this.info = res.data + return this.instance.post("/api/breed/earTag/page", null, {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => { + if (res?.data?.records) { + this.info = res.data.records[0] this.$emit('enter', this.info) } }) @@ -27,7 +27,7 @@ export default {