📅  最后修改于: 2022-03-11 15:03:32.999000             🧑  作者: Mango
const url = localhost:4000/api/users/register;
const usersData= [];
let getData = () => {
axios.get(url)
.then(res => usersData.push(res.data))
.catch(err => console.log(err.data))
}