diff --git a/src/utils/request/index.ts b/src/utils/request/index.ts index 3a34fe6..7d15c7e 100644 --- a/src/utils/request/index.ts +++ b/src/utils/request/index.ts @@ -57,7 +57,7 @@ const transform: AxiosTransform = { const { apiUrl, isJoinPrefix, urlPrefix, joinParamsToUrl, formatDate, joinTime = true } = options; // 添加接口前缀 - if (isJoinPrefix) { + if (isJoinPrefix && urlPrefix && isString(urlPrefix)) { config.url = `${urlPrefix}${config.url}`; }