导致无法提交,非常的不友好,有完美一点的方案吗?
$(document).ajaxComplete(function (event, xhr, options) {
if (options.url !== "{:url('refresh/token')}" && options.type !== 'GET') {
$.get("{:url('refresh/token')}", function (res) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': res
},
});
});
}
});
最佳答案
