关键是红色代码部分
// 用body来提交json数据
api.ajax({ url: 'http://192.168.0.133:8080/Customer/DelUserCustomer', method: 'post', headers: {'Content-Type': 'application/json'}, data: { body:'[{"CustomerID":"1","HLUserID":"2"}]'} }, function (ret, err) { alert(ret.Data); });
服务端用 [FromBody] 标记参数