fix: 表单提交csrftoken问题

This commit is contained in:
feng626
2022-08-19 14:38:59 +08:00
committed by Jiangjie.Bai
parent 1432fe1609
commit 37b150bc04
2 changed files with 5 additions and 5 deletions

View File

@@ -270,13 +270,13 @@ function requestApi(props) {
if (typeof(dataBody) === "object") {
dataBody = JSON.stringify(dataBody)
}
var beforeSend = props.beforeSend || function (request) {}
var headers = props.headers || {}
$.ajax({
url: props.url,
type: props.method || "PATCH",
headers: headers,
data: dataBody,
beforeSend: beforeSend,
contentType: props.content_type || "application/json; charset=utf-8",
dataType: props.data_type || "json"
}).done(function (data, textStatue, jqXHR) {