Access to image at '图片资源地址' from origin '前端地址' has been
blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
图片资源地址,直接在浏览器中打开可以正常显示图片
Think\Controller中加入下列代码,问题还是存在
header('Access-Control-Allow-Origin:*');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
header('Access-Control-Allow-Methods:GET, POST, OPTIONS');