query string parameters 转 form data


url: base.carTechUrl + "/car_search/car_tech_service/technique_tactics/mark_result",
method: 'post',
data: data,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}

猜你喜欢

转载自www.cnblogs.com/namehou/p/12149607.html