关于axios小记

axios的get请求:

this.axios.get('/list/getPro',{params: {page: 1,size: 10}}).then((res) => {
    console.log(res)
})
这里“params”必须加,不然参数传递失败

axios的post请求:

this.axios.post('/list/product',{ids: 12}).then((res) => {
                    console.log(res)
})
这里“params”就不用加,直接传入对象即可
原文地址:https://www.cnblogs.com/wjz-page/p/12837577.html