vue解决前后端跨域问题

1/在config中index.js中

找到proxyTable在里面添加如下代码

proxyTable: {
'/api': {
target: 'https://api.douban.com/v2/movie/',
changeOrigin: true,
pathRewrite:{
'^/api':''
}
}

原文地址:https://www.cnblogs.com/bubuabc/p/10524596.html