接口传参方式修改

This commit is contained in:
于秀圆 2022-09-29 18:27:32 +08:00
parent bcbafaf9f0
commit 3dcb9b8778
2 changed files with 30 additions and 30 deletions

View File

@ -1890,21 +1890,21 @@
// ) {
// params.status = ''
// }
// let paramsFather = ''
// let i = 1
// for (var key in params) {
// if (params[key] === '') {
// delete params[key]
// } else {
// if (i != 1) {
// paramsFather += `&${key}=` + params[key]
// i += 1
// } else if (i == 1) {
// paramsFather += `${key}=` + params[key]
// i += 1
// }
// }
// }
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(params).then((res) => {
dataSource.value = res.data.data
pagination.value.total = res.data.count

View File

@ -292,21 +292,21 @@
type: this.mapSearchParam.type,
borderPolygonList: this.mapSearchParam.borderPolygonList || [],
}
// let paramsFather = ''
// let i = 1
// for (var key in params) {
// if (params[key] === '') {
// delete params[key]
// } else {
// if (i != 1) {
// paramsFather += `&${key}=` + params[key]
// i += 1
// } else if (i == 1) {
// paramsFather += `${key}=` + params[key]
// i += 1
// }
// }
// }
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(params).then((res) => {
console.log('根据parent查询摄像头', res.data.data)
if(type=='map'){