fetch(blockTimeUrl)
.then(response => {
console.log(response)
response.json().then(data => {
console.log(data)
})
.catch(error => console.log("你看都走到最后一步了,还是凉了,送你一首凉凉。。",error))
})
.catch(error => console.log("妈呀,以为迈出成功的第一步,不幸夭折了", error)
)
详情见
https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API/Using_Fetch