mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-23 11:50:20 +08:00
fix: Multiple calls to createAxios function transform parameters are overwritten by other calls (#1474)
This commit is contained in:
parent
46e28f0203
commit
4f35b95b6b
@ -2,6 +2,7 @@
|
||||
// The axios configuration can be changed according to the project, just change the file, other files can be left unchanged
|
||||
|
||||
import type { AxiosResponse } from 'axios';
|
||||
import { clone } from 'lodash-es';
|
||||
import type { RequestOptions, Result } from '/#/axios';
|
||||
import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform';
|
||||
import { VAxios } from './Axios';
|
||||
@ -208,7 +209,7 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
|
||||
// 如果是form-data格式
|
||||
// headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
|
||||
// 数据处理方式
|
||||
transform,
|
||||
transform: clone(transform),
|
||||
// 配置项,下面的选项都可以在独立的接口请求中覆盖
|
||||
requestOptions: {
|
||||
// 默认将prefix 添加到url
|
||||
|
Loading…
Reference in New Issue
Block a user