一些字段为空则不返回,不为空则放到对象中

mac2024-03-17  32

function getReqData(){ let obj = {} let objList = ['a','b','c','d','e'] objList.forEach(function(item){ let result = getQueryString(item) if( result ){ obj[item] = result } }) return obj }
最新回复(0)