$.ajax({
dataType: "json",
type: "POST",
url: "地址(/api/products)",
data: JSON.stringify({
'efairyuser_id': (efairyuser_id), 'access_token': (access_token),
'agency_info': (json)
}),
success: function (data) {
//.........
},
error: function () {
alert("失败!");
},
});
get
$.ajax({ dataType: "json", type: "get", url: "地址(/api/products)", data: { 'efairyuser_id': efairyuser_id, 'access_token': access_token },//要发送的数据(参数)格式为{'val1':"1","val2":"2"} success: function (data) { //......... }, error: function () { alert("失败!"); }, });