1.ajax 代码
var ids =new Array();
$.ajax({
type: "POST",
url: "/user/downReport",
dataType: "html",
traditional: true,
data:{
downReportArray:ids
},
async: true,
success: function (data) {
if(data.code==200){
console.log("正在打包...")
}
}
});
2.后台接收
@RequestMapping(value = "/downReport", method = {RequestMethod.POST})
@ResponseBody
public Object downReport(@RequestParam(value = "downReportArray") Long[] downReportArray,HttpServletRequest request ) throws Exception {
...
}