不使用contentType: "application/json",则data可以是对象
$.ajax({
url: url,
type: "post",
datType: "json",
data: { id: user_id },
async: false,
success: function () {}
});
使用contentType: "application/json",则data只能是json字符串
$.ajax({
url: url,
type: "post",
datType: "json",
contentType: "application/json"
data: "{'id': " + user_id +"}",
async: false,
success: function () {}
});