fix(xumu): 修复耳标号查询功能
- 更新 API 请求参数,添加 pageSize 和 pageNum - 修改数据处理逻辑,使用 records[0] 而不是直接使用 data - 优化代码格式,删除多余的空格和换行
This commit is contained in:
@@ -14,9 +14,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getText(biochipEarNumber) {
|
getText(biochipEarNumber) {
|
||||||
this.info = {}
|
this.info = {}
|
||||||
return this.instance.post("/api/breed/earTag/page", null, { params: { biochipEarNumber } }).then(res => {
|
return this.instance.post("/api/breed/earTag/page", null, {params: {biochipEarNumber, pageSize: 10, pageNum: 1}}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data?.records) {
|
||||||
this.info = res.data
|
this.info = res.data.records[0]
|
||||||
this.$emit('enter', this.info)
|
this.$emit('enter', this.info)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user