const filterNullParams = (params, allValue) => {Object.keys(params).filter(
key => (params[key] === ''
|| params[key] === undefined
|| params[key] === null
)
&& delete params[key]
);
return params;
}
const queryList = () => {
const reqData = {
a: 1,
b: '',
c: -1,
}
axios.get('xxxxxxx', { params: filterNullParams(reqData) })
.then(res => res.data)
.then((res) => {// 代码});
}