优化:对请求参数进行过滤去重

pull/64/MERGE
李强 2022-06-21 08:53:23 +08:00
parent 92ca593a3b
commit dc939118c9
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ const filterParams = function (that, array) {
const columnKeys = arr.map(item => {
return item.key
})
const newArray = [...columnKeys, array, 'id']
let newArray = [...columnKeys, array, 'id']
newArray = [...new Set(newArray)]
return '{' + newArray.toString() + '}'
}