本地跨域解决方案1:
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/api': {
target: '', //接口
changeOrigin: true, //是否跨域
pathRewrite: {
'^/api': '/' //重写接口
}
}
},
}
线上跨域:
解决方法1:
解决方法2: