$.ajax({
url: '/client/ehr/empReduce',
method: 'POST',
dataType: "json", /*dataType不可少*/
contentType: "application/json; charset=utf-8",
data: JSON.stringify({
idCardNum: idCardNum,
idCardType: idCardType,
reduceType: reduceType,
socialEndMonth: ssEndMonth,
pfEndMonth: pfEndMonth,
reduceState: remark,
userId: 1
}),
success: function(json){
alert(json.msg);
}
url: '/client/ehr/empReduce',
method: 'POST',
dataType: "json", /*dataType不可少*/
contentType: "application/json; charset=utf-8",
data: JSON.stringify({
idCardNum: idCardNum,
idCardType: idCardType,
reduceType: reduceType,
socialEndMonth: ssEndMonth,
pfEndMonth: pfEndMonth,
reduceState: remark,
userId: 1
}),
success: function(json){
alert(json.msg);
}
});
json格式数据不要手写,一定要通过工具转换
java后台接收方式,以对象的方式接收(@RequestBody)