diff --git a/web/src/main/resources/template/assets/lib/layui/customer/ajaxPostUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/ajaxPostUtil.js index 0623f153eff25e5c79aec345059e352fe8883921..c131fd456a9319265238a35696596b4b09292d73 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/ajaxPostUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/ajaxPostUtil.js @@ -156,10 +156,13 @@ var AjaxPostUtil = { setRequestHeaders(xmlhttp); if("GET" === method.toUpperCase()) { xmlhttp.send(null); - } else if("POST" === method.toUpperCase() || "PUT" === method.toUpperCase() || "DELETE" === method.toUpperCase()) { + } else if("POST" === method.toUpperCase() || "PUT" === method.toUpperCase()) { // 如果是POST提交,设置请求头信息 xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(formateParams); + } else if("DELETE" === method.toUpperCase()) { + xmlhttp.setRequestHeader("Content-Type", "application/json"); + xmlhttp.send(JSON.stringify(ajaxObj.options.params)); } } }; \ No newline at end of file