目录

项目中同时请求多个接口

目录
1
2
3
4
5
6
7
8
async my_fun(){
    const [response1, response2] = await Promise.all(
        [
            fetch(api1),
            fetch(api2)
        ].map(v=>v.catch(e=>console.log(e)))
    )
}