refactor: 使用 vben 自带的 paramsSerializer 枚举,替代原本自己封装的方法
parent
4fb83d3883
commit
584f107ae1
|
|
@ -61,10 +61,7 @@ class RequestClient {
|
||||||
responseReturn: 'raw',
|
responseReturn: 'raw',
|
||||||
// 默认超时时间
|
// 默认超时时间
|
||||||
timeout: 10_000,
|
timeout: 10_000,
|
||||||
// 处理请求参数 默认使用 qs 库处理
|
paramsSerializer: 'repeat'
|
||||||
paramsSerializer: (params) => {
|
|
||||||
return qs.stringify(params, { arrayFormat: 'repeat' });
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
const { ...axiosConfig } = options;
|
const { ...axiosConfig } = options;
|
||||||
const requestConfig = merge(axiosConfig, defaultConfig);
|
const requestConfig = merge(axiosConfig, defaultConfig);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue