refactor: 【web-ant】重构认证模块并移除未使用的组件和功能【0fed9472】(剩余 request、present)
This commit is contained in:
@@ -5,6 +5,7 @@ import type { RequestClientConfig, RequestClientOptions } from './types';
|
||||
import { bindMethods, merge } from '@vben/utils';
|
||||
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
|
||||
import { FileDownloader } from './modules/downloader';
|
||||
import { InterceptorManager } from './modules/interceptor';
|
||||
@@ -36,6 +37,10 @@ class RequestClient {
|
||||
responseReturn: 'raw',
|
||||
// 默认超时时间
|
||||
timeout: 10_000,
|
||||
// 处理请求参数 默认使用 qs 库处理
|
||||
paramsSerializer: (params) => {
|
||||
return qs.stringify(params, { arrayFormat: 'repeat' });
|
||||
},
|
||||
};
|
||||
const { ...axiosConfig } = options;
|
||||
const requestConfig = merge(axiosConfig, defaultConfig);
|
||||
|
||||
Reference in New Issue
Block a user