|
|
|
@ -35,7 +35,9 @@ httpService.interceptors.request.use(config => {
|
|
|
|
|
const rqParams = filterRequestData(config.params);
|
|
|
|
|
const rqData = filterRequestData(config.data);
|
|
|
|
|
// post 'Content-Type' === 'application/x-www-form-urlencoded'
|
|
|
|
|
if(config.method === 'post' && config.headers['content-type'] === 'application/x-www-form-urlencoded') {
|
|
|
|
|
console.log(config.headers)
|
|
|
|
|
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
|
|
|
if(config.method === 'post') {
|
|
|
|
|
config.data = qs.stringify(rqData);
|
|
|
|
|
} else {
|
|
|
|
|
config.data = rqData;
|
|
|
|
|