How to concatenate parameters after url in post submission using axios in vue

problem description

this is the background interface
post submission is not submitted through body but directly splices parameters after url

clipboard.png


axios.defaults.headers = {
"Content-Type": "application/json"
}

post

clipboard.png

clipboard.png

params

clipboard.png

alas, how to concatenate the parameters after url

Jun.15,2022

this.$post ("/ wechat/login/getSmsCode?phone=" + this.phone)


there is a problem with this operation itself. Why do you still need stitching parameters after post?


let params = new URLSearchParams();
params.append('pid', 123);

try this

Menu