/** * URL编码; * @param {参数} param */ export function toParams(param) { var result = "" for (let name in param) { if (typeof param[name] != 'function') { result += "&" + name + "=" + encodeURI(param[name]); } } return result.substring(1) }
/** * URL编码; * @param {参数} param */ export function toParams(param) { var result = "" for (let name in param) { if (typeof param[name] != 'function') { result += "&" + name + "=" + encodeURI(param[name]); } } return result.substring(1) }
转载于:https://www.cnblogs.com/freddyhuang/p/9337152.html