求各位大佬帮忙看看这该怎么解决?has been blocked by CORS policy: Cannot parse Access-Control-Allow-Headers response header field in preflight response。
beforeSend: function(xhr) { xhr.setRequestHeader("Access-Control-Allow-Origin", "*"); }
1、让后端设置下允许跨域; 2、使用jsonp,这个比较麻烦了; 欢迎阅读下面的博客,有详细的解释 https://www.cnblogs.com/teach/p/5888958.html