初始化项目
This commit is contained in:
@@ -253,12 +253,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
|
||||
authenticationHeader: 'x-token',
|
||||
authenticationScheme: '',
|
||||
// 请求超时时间,默认3分钟
|
||||
timeout: 3 * 60 * 1000,
|
||||
// 基础接口地址
|
||||
// baseURL: globSetting.apiUrl,
|
||||
// 默认请求头设置
|
||||
// headers: { 'Content-Type': ContentTypeEnum.JSON },
|
||||
// 如果是form-data格式
|
||||
timeout: 15 * 60 * 1000,
|
||||
headers: {
|
||||
'content-type': ContentTypeEnum.FORM_URLENCODED,
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
@@ -297,11 +292,3 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
|
||||
);
|
||||
}
|
||||
export const defHttp = createAxios();
|
||||
|
||||
// other api url
|
||||
// export const otherHttp = createAxios({
|
||||
// requestOptions: {
|
||||
// apiUrl: 'xxx',
|
||||
// urlPrefix: 'xxx',
|
||||
// },
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user