提交 68086a49 编写于 作者: doc_wei's avatar doc_wei

feat: ajax新增delete请求判断

上级 d3f298f2
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册