refactor: 【web-ant】重构认证模块并移除未使用的组件和功能【0fed9472】(剩余 request、present)

This commit is contained in:
YunaiV
2025-03-26 07:36:12 +08:00
parent e65469b5ea
commit c881a47ffd
12 changed files with 80 additions and 13 deletions

View File

@@ -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);