async function get(){
let res1 = await axios.get('http://127.0.0.1:2000/name.json')
console.log(res1);
let id = res1.data.data[0].id
let res2 = await axios.get(`http://127.0.0.1:2000/wepon.json?id=${id}`)
console.log(res2);
return 123
}
let res = get()
res.then(re=>console.log(re))
async function get1(){
let res = await Promise.all([(axios.get('http://127.0.0.1:2000/name.json')),(axios.get(`http://127.0.0.1:2000/wepon.json?id=3`))])
console.log(res);
}
get1()
async function get2(){
let res = await Promise.all([(axios.get('http://127.0.0.1:2000/name.json')),(axios.get(`http://127.0.0.1:2000/wepon.json?id=${id}`))])
console.log(res);
}
ge2t().catch(res=>console.log(res))