Axios 对于vue来说是非常非常有用的,我们做适当的封装,可以更加的节省我们的开发时间,下面代码为作者使用的很漂亮的封装,不仅可以拦截请求还可以灵活的请求数据。 import axio
GET方法 getGroupData(){ let filter ={ page:1, pageSize:10, }; this.$request(this.$api.groupList,filter,GET) .then((res)= { console.log(res); if( res.data.code ==200){ this.$ refs.groupTable1.listData = res .data.data; }else{ console.log(获
常用的三种header中的三种content-type如下 1、Content-Type: application/json 2、Content-Type: multipart/form-data 3、Content-Type: application/x-www-form-urlencoded 项目中第二次遇到需要独立设置header中的content-t