x-www-form-urlencoded 模式如何传参
直接上代码->
const params = new URLSearchParams();
params.append("grant_type", "password");
params.append("username", that.userPhone);
params.append("password", password);
that.$http
.post(url, params, {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
})
.then(res => {
alert(JSON.stringify(res));
})
.catch(e => {
alert(JSON.stringify(e));
});
20200422:张火火