报错:
Access to Image at 'http://xxx.yyyyyyyy.com/app/p...' from origin 'http://localhost:9527' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9527' is therefore not allowed access.
但是,
如果直接使用img标签可以展示出图片
<img src="http://xxx.yyyyyyyy.com/app/p...;>
请问大家碰到过吗,有什么好的方案???
src不受跨域的影响,jsonp跨域的原理就是基于这个的。vue的话脚手架里,配置下代理就可以了。或者用fetch,也能解决跨域问题。萌新一枚,看看就好。。