movii
6/28/2017 - 2:23 PM

笔记:「饭否精选·日历」微信小程序制作记录-爬虫部分:4. map() + Promise.all()

笔记:「饭否精选·日历」微信小程序制作记录-爬虫部分:4. map() + Promise.all()

Promise.all(array.map(url => request(url).then(data => {
  // save data
}))).then(() => {
  // do next
})