Here is my example code(Delete):
destroy: {
type: 'post',
url: base_url + "delete",
dataType: "json",
contentType: 'application/json; charset=utf-8',
complete: function (jqXhr, data) {
if (jqXhr.responseJSON.success) {
}
else {
}
alert(jqXhr.responseJSON.msg)
console.log(jqXhr, data)
return false;
}
My response json : {"id":null,"success":false,"msg":"操作失败!","response":null}
PLS help.