前端使用fetch请求数据

Posted 江州益彤

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了前端使用fetch请求数据相关的知识,希望对你有一定的参考价值。

使用fetch请求数据

created()
    fetch("http://localhost:8181/user/page?pageNum=1&pageSize=5").then(res=>res.json()).then(res=>
      console.log(res);
      this.tableData=res.data;
      this.total=res.total;
    )
  ,

以上是关于前端使用fetch请求数据的主要内容,如果未能解决你的问题,请参考以下文章