|
|
@ -82,14 +82,8 @@ const transform: AxiosTransform = { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (!isString(params)) { |
|
|
|
if (!isString(params)) { |
|
|
|
formatDate && formatRequestDate(params); |
|
|
|
formatDate && formatRequestDate(params); |
|
|
|
if (Reflect.has(config, 'data') && config.data && (Object.keys(config.data).length > 0 || config.data instanceof FormData)) { |
|
|
|
config.data = data; |
|
|
|
config.data = data; |
|
|
|
config.params = params; |
|
|
|
config.params = params; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// 非GET请求如果没有提供data,则将params视为data
|
|
|
|
|
|
|
|
config.data = params; |
|
|
|
|
|
|
|
config.params = undefined; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (joinParamsToUrl) { |
|
|
|
if (joinParamsToUrl) { |
|
|
|
config.url = setObjToUrlParams( |
|
|
|
config.url = setObjToUrlParams( |
|
|
|
config.url as string, |
|
|
|
config.url as string, |
|
|
|