摘要: 与服务器通信 与服务器通信的时长不可控,需要采用异步的形式,可以使用js的fetch函数来调用api。 fetch函数 fetch函数的基本使用形式为: fetch(apiUrl).then((response) => { if (response.status !== 200) { throw n 阅读全文
posted @ 2021-02-23 21:12 zhixin9001 阅读(162) 评论(0) 推荐(0) 编辑