diff --git a/components/SelectTree/HiddenLevel/Gwj/index.js b/components/SelectTree/HiddenLevel/Gwj/index.js index 7aa8c29..0fa6812 100644 --- a/components/SelectTree/HiddenLevel/Gwj/index.js +++ b/components/SelectTree/HiddenLevel/Gwj/index.js @@ -63,7 +63,7 @@ function HiddenLevelSelectTree(props) { }, []); return ( - + ); } diff --git a/hooks/useDownloadBlob/index.d.ts b/hooks/useDownloadBlob/index.d.ts index 85e2a78..056ef8d 100644 --- a/hooks/useDownloadBlob/index.d.ts +++ b/hooks/useDownloadBlob/index.d.ts @@ -7,12 +7,7 @@ interface UseDownloadBlobOptions { params?: Record; } -export interface downloadBlobOptions { - url: string; - options?: UseDownloadBlobOptions; -} - -export type DownloadBlobFunction = (options: downloadBlobOptions) => Promise; +export type DownloadBlobFunction = (url: string, options: UseDownloadBlobOptions) => Promise; /** * 下载Blob流文件 diff --git a/hooks/useDownloadBlob/index.js b/hooks/useDownloadBlob/index.js index e66af53..4502c1e 100644 --- a/hooks/useDownloadBlob/index.js +++ b/hooks/useDownloadBlob/index.js @@ -18,7 +18,7 @@ export default function useDownloadBlob(returnType = "object") { return reject(new Error("请传入 url")); const { name = "", type = "", params = {} } = options; - const finalUrl = (process.env.app.API_HOST || window.__JJB_ENVIRONMENT__.API_HOST) + url; + const finalUrl = new URL((process.env.app.API_HOST || window.__JJB_ENVIRONMENT__.API_HOST) + url); Object.entries(params).forEach(([key, value]) => { finalUrl.searchParams.append(key, value); });