1. In config/index.js:
proxyTable: {
'/api': {
target: 'http://192.168.10.000:8066',//api地址
changeOrigin: true,
pathRewrite: {
'^/api': '/'
}
}
},
2. Page usage:
this.$axios.post("/api/signin",loginParams).then(data=>{
}).catch(err=>{
})
3. Re-run npm run dev after configuration