接上篇
第三步:参数处理
// 删除无用字段 Object.keys(copyParams).forEach(function (key) { let val = copyParams[key] if (val === null || val === ‘‘ || val === undefined || Number(val) === -1) { delete copyParams[key] } // 数组 null if (typeof copyParams[key] === ‘object‘ && isEmpty(copyParams[key])) { delete copyParams[key] } })