headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
transformRequest: function(obj) {
var str = [];
for(var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&");
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
},
transformRequest: function(obj) {
var str = [];
for(var p in obj)
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&");
},
需要添加这个来转换格式,服务器才可以收到。以x-www-form-urlencoded传输