vue-core-image-upload
vue-core-image-upload copied to clipboard
后台接到上传的文件,但返回不了数据,求指点
:8888/#/authen/person-authen:1 XMLHttpRequest cannot load http://192.168.10.85:8080/file/upload?token=otu_62ef7659017d12bdf4ac2cc5aa9d2a41. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://127.0.0.1:8888' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
xhr.js?cabd:1 SyntaxError: Unexpected end of JSON input
at JSON.parse (
关于关于的问题,可以参考php的实现 Code,重点是控制header头的返回。
我返回的,这个有问题吗?求大牛指点

设置为当前的domain吧
我这边也是Access-Control-Allow-Origin: *,控制台中能返回图片上传成功的在线路径,但是imageUploded中的res缺是undefined,另外两个报错如图
