fetch('http://10.3.134.173/jsonp-test/data/dish_getbypage.php?start=1',
).then((response)=>
response.json()
).then((res)=>{ console.log(res[0].name);
});
fetch('http://10.3.134.173/jsonp-test/data/dish_getbypage.php?start=2',
).then((response)=>
response.json()
).then((res)=>{ console.log(res[0].name);
})同时发起请求,比如一个等待一秒,一个等待两秒返回,然后待都返回结果然后执行后续操作,具体该怎么操作,用promise.all怎么写
慕容森
扬帆大鱼
随时随地看视频慕课网APP
相关分类