发送 get 请求
this.axios.get('/rebar/produceTask/selectProProduceTaskItemList',{params:data}).then( res => {console.log('发送get请求')})
发送 post 请求,使用 this.qs.stringify() 传参需要安装 qs,使用方法请查看博客
getDataList() {var data={name:this.queryInfo.name,page:this.queryInfo.page,rows:this.queryInfo.rows,projectId:this.projectId,sectId:this.sectId,}this.axios.post('/rebar/material/selectMaterialList',this.qs.stringify(data)).then( res => {console.log('发送post请求')})},
如果觉得《Vue axios 发送 get 和 post 请求》对你有帮助,请点赞、收藏,并留下你的观点哦!