vue-axios

vue-axios

支持多种请求方式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
axios(config)

axios.request(config)

axios.get(url,config)

axios.delete(url,config)

axios.head(url,config)

axios.post(url,data,config)

axios.put(url,data,config)

axios.patch(url,data,config)

axios并发请求

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
axios.all([
axios({
url:"http://123.207.32.32:8000/home/multidata",
}),
axios({
url:"http://123.207.32.32:8000/home/data",
params:{
page:1,
type:'sell'
}

})]).then(res=>{
console.log(res);
console.log(res[0]);
console.log(res[1]);
})