AJAX代码
$.ajax({
url: "/api/export",
type: 'POST',
dataType: 'json',
data: sendExportData,
success: function success(data) {
}
})
sendExportData的数据,forArrValue里面是一个比较大的数据
koa2 代码
let body =ctx.request.body ;
const formulaName=body.formulaName,
formulaParameterForOne=body.formulaParameterForOne,
formulaParameterForArr=body.formulaParameterForArr;
console.log("body",body);
body打印出来是
注意sendExportData中formulaParameterForArr是一个长度为7的数组,可是koa里面body接收到的formulaParameterForArr长度只有4。
请教一下各位,为什么会这样?该如何解决这个问题
用浏览器的开发者工具,查看网络请求那里,看下发送的http请求中的参数值是不是对着呢