Fetch函数

2017-08-30  本文已影响9人  Cola1993a
fetch(api.HN_ITEM_ENDPOINT+topStoryIDs[startIndex]+".json")
              .then((response) => response.json())
              .then((topStory) => {
                  topStory.count = startIndex+1;
                  rowsData.push(topStory);
                  startIndex++;
                  iterateAndFetch();
              })
              .done();
上一篇 下一篇

猜你喜欢

热点阅读