使用sylius的API接口,用本地服务器,但是vue的resource 的get 一直访问不到
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 404.
这段是关于报错!
this.$http.get('http://localhost:8000/api/ban...', {
headers: {'Content-Type': 'application/json'}
}).then((response) => {
this.banner = response.data
console.log(this.banner)
})
No 'Access-Control-Allow-Origin' ,看这个像是跨域问题呀,用jsonp方法
})