失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > vuejs 前端 使用axios发送get post请求 参数在query和body里面的各种情况

vuejs 前端 使用axios发送get post请求 参数在query和body里面的各种情况

时间:2024-06-10 15:59:13

相关推荐

vuejs 前端 使用axios发送get post请求 参数在query和body里面的各种情况

使用axios发送get请求,参数写在query里

async getOrgList() {let res = await this.$axios.get('/user/b/getOrgList', {params: {pageNo: 1,pageSize: 99,type: 6}})this.researchList = res.data.retData.list},

使用axios发送post请求,参数写在body里

async AddOrModifyIt() {await this.$axios.post('/project/b/project/updateProjectOrg', {leader: this.leader,oldOrgId: PrimaryId,planSubjectNum: this.planSubjectNum,sectionId: this.mainResearchValue.sectionId,userId: this.mainResearchValue.userId,userName: this.mainResearchValue.name})},

使用axios发送post请求,参数写在query里

async deleteRow(index, row) {await this.$axios.post('/project/b/project/deleteProjectOrgById',{},{params: {orgPrimaryId: PrimaryId}})},

如果觉得《vuejs 前端 使用axios发送get post请求 参数在query和body里面的各种情况》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。