Files

19 lines
358 B
Plaintext

export class XiaoZhi {
/**
* 对象转URL参数
*/
static tansParams(params : UTSJSONObject) : string {
const json = params.toMap()
let result = ""
json.forEach((value, key) => {
if (result.length > 0) {
result += "&"
}
result += encodeURIComponent(key)
+ "="
+ encodeURIComponent(value.toString())
})
return result
}
}