浏览器报错Failed to load http://xxx.com: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
但network里面接口数据都已经过来了,然后ajax那边没进success进了error,查了资料说不是同一个域很有可能造成我这样的情况,请问怎么解决呢
$.ajax({
url: nowInfo.get,
get: 'get',
data: token
dataType:"text",
success: function (data) {
console.log(data)
},
error: function (data) {
console.log(data)
}
})
如何解决跨域?
https://segmentfault.com/a/11...