用vue-cli搭建的vue項目,axios發起get請求的時候,控制臺報錯:Failed to load http://222.16.46.131:8080/Skyworth/changePictureAdmin: 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 502.我要訪問的http://222.16.46.131:8080/Skyworth/changePictureAdmin是別人寫好的,已經部署在其他服務器的接口,后臺有設置cors,請問前端vue項目需要更改什么配置文件,才能成功跨域請求?
vue+webpack+axios跨域請求,No 'Access-Control-Allow-
白豬掌柜的
2019-02-11 16:15:08