put、delete、post、get四种传参方式
PUT:
this.$http.put('url', {
modifyTime:this.sizeForm.modifyTime,
mqttRes:this.sizeForm.mqttRes,
udpRes:this.sizeForm.udpRes,
refId:this.sizeForm.refId,
id:this.sizeForm.id
} ).then
POST:
this.$http.post('url', {
createTime:time,
mqttRes:this.sizeForm.mqttRes,
udpRes:this.sizeForm.udpRes,
refId:this.sizeForm.refId,
deleteFlag:this.sizeForm.deleteFlag
} )
DELETE:
axios.delete('url', { params: { id: 111 } }).then(function(ret) { console.log(ret.data) })
GET:
let params = { userId: `${this.userid}:gt`, carId: this.centercarid, status: true } this.$http.get('url', { params:params } ).then()
详细demo https://blog.csdn.net/m0_38010595/article/details/112793938
长风破浪会有时,直挂云帆济沧海