//config文件夹内index.js dev 配置
proxyTable: {
'/JydDataPlatform': {
target: 'http://XXX.cn',
changeOrigin: true,
pathRewrite: {
'^/JydDataPlatform': ''
}
}
}
// 请求路径 解析的完整路径为'http://XXX.cn/JydDataPlatform/login/getVerificationCode'
that.$http.post("/JydDataPlatform/login/getVerificationCode").then(response=>{
console.log(response);
})
方法二 https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi Allow-Control-Allow-Origin: *插件