vue axios 携带参数
跟大家分享两种axios携带参数的方法(可用于前后端传值) :
A 相当于另起一个名字 ,可以在后台通过A获取到B
B 即将被携带的数据 , 常用 this.变量名
1 this.axios.post/get('url' , {params : {A : B}})
.then(res =>{}).catch({})
2 this.axios.post/get(`url?A=${B}`)
.then(res =>{}).catch(res=>{})
分享基础,共同进步

浙公网安备 33010602011771号