报如下错误:
Access to XMLHttpRequest at ‘http://192.168.20.100:8090/expert/indInformation‘ from origin ‘http://127.0.0.1:8020‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
看到:“ CORS policy: No ‘Access-Control-Allow-Origin’ header”,不用说,就是跨域问题。
解决办法是
1.先确认下自己的接口名字是否写错了。
2.请后端开发人员在服务器配置一下。