在 package.json 中添加 proxy:
"proxy": "http://106.13.9.213:9000"
页面中调用:
async componentDidMount() {
let res = await axios.get('/admin/category');
console.log(res);
}
.
在 package.json 中添加 proxy:
"proxy": "http://106.13.9.213:9000"
页面中调用:
async componentDidMount() {
let res = await axios.get('/admin/category');
console.log(res);
}
.
相关文章: