📅  最后修改于: 2022-03-11 15:03:10.677000             🧑  作者: Mango
let isLoading = true;
fetch(myRequest)
.then(function(json) { /* process your JSON further */ })
.catch(function(error) { console.error(error); /* this line can also throw, e.g. when console = {} */ })
.finally(function() { isLoading = false; });