版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31201781/article/details/87256606
axios({
method: 'post',
url: '/djauth/sso/ssoLogin.do',
data: params,
// 转换数据的方法
transformRequest: [
function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
ret = ret.substring(0, ret.length - 1)
return ret
}
],
// 设置请求头
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})