diff --git a/src/utils/http/axios/helper.ts b/src/utils/http/axios/helper.ts index 533925f23e5773b4cd830bf1fcc1a252232c7b66..30369d57dd061d56a96787b25c43676df14922c2 100644 --- a/src/utils/http/axios/helper.ts +++ b/src/utils/http/axios/helper.ts @@ -21,7 +21,11 @@ export function createNow(join: boolean, restful = false): string | object { /** * @description: Format request parameter time */ -export function formatRequestDate(params: any) { +export function formatRequestDate(params: Recordable) { + if (Object.prototype.toString.call(params) !== '[object Object]') { + return; + } + for (const key in params) { if (params[key] && params[key]._isAMomentObject) { params[key] = params[key].format(DATE_TIME_FORMAT);