export function objToQuery(obj) {
let query = '?'
if (typeof obj === 'object') {
for(let key in obj) {
query += key + '=' + obj[key] + '&'
}
}
return query.slice(0, -1)
}
对象转查询字符串 objToQuery
最新推荐文章于 2024-04-03 15:46:51 发布