Like this problem, but I had cross-domain configuration
CodePudding user response:
Bosses, https://segmentfault.com/q/1010000017073493/a-1020000017074611 is similar to the question, kneelCodePudding user response:
Export const postRequest=(url, params)=& gt; {
Return axios ({
Method: "post",
Url: ` ${base} ${url} `,
Data: params,
TransformRequest: [function (data) {
Let ret='
For (let it in the data) {
Ret +=encodeURIComponent (it) + '=' + encodeURIComponent (data [it]) + '& amp; '
}
Return ret
},
Headers: {
'the content-type' : 'application/x - WWW - form - urlencoded',
"withCredentials" : true
}
});
}
CodePudding user response:
The