要注意post请求参数只能后端@requestBody接收
get请求参数只能后端@requestParam接收
this.$axios.get('/payTest',{params:{totalPrice:this.map.totalPrice}})
.then(res => {
console.log(res.data.data)
this.QRUrl = res.data.data
this.creatQrCode()
})
this.$axios.post('/orders/add',{map:this.map})
.then(res => {
console.log(res.data.msg)
})
要想一起传输必须使用qs工具