es6中fetch-api

指定需要請求的url地址,通過第一個. then得到一個response對象,想要拿到最終數據調用response.json返回一個新的promise,把第一個.then中的promise,return,通過第二個.then就可以處理數據結果
相關文章
相關標籤/搜索