跨域问题。
vue和后端都有配置,但是还是报跨域问题
检查后端发现没报错,那就是前端问题。
接口也有写
proxyTable: {
"/api":{
target: 'http://localhost:8081/', //后端接口的根目录
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api': '/'
}
}
}
axios.defaults.baseURL = '/api'
经过检查是,ip地址那显示不对。在main。js中加上上面代码
可以参考文章https://blog.csdn.net/cywleo/article/details/115562345
我的问题解决了