$.ajax({
url: url,
type: ‘DELETE’,
success: function(data) {
if(data){
$(this).parents(“tr”).remove();
console.log(data);
}else{
layer.msg(“删除失败!”)
}
}
});

报错405,把请求的delete改为get,就正常了