|
@ -196,18 +196,22 @@ export const getCertificateLogsAtom = (data: req_CertLogs) => |
|
|
}; |
|
|
}; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
export const downloadCertificateAtom = (params: Req_DownloadCert) => |
|
|
|
|
|
atomWithQuery<IApiResult, any>(() => { |
|
|
|
|
|
return { |
|
|
|
|
|
queryKey: ["downloadCertificate", params], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const downloadCertificateAtom = ( |
|
|
|
|
|
params: Req_DownloadCert, |
|
|
|
|
|
enableFetchAtom: boolean |
|
|
|
|
|
) => { |
|
|
|
|
|
return atomWithQuery(() => ({ |
|
|
|
|
|
queryKey: ['downloadCertificate', params], |
|
|
queryFn: async ({ queryKey: [, params] }) => { |
|
|
queryFn: async ({ queryKey: [, params] }) => { |
|
|
return await websitesServ.cert.downloadCertificate(params); |
|
|
return await websitesServ.cert.downloadCertificate(params); |
|
|
}, |
|
|
}, |
|
|
select: (res) => { |
|
|
|
|
|
return res.data; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
enabled: enableFetchAtom, // 通过 enableFetchAtom 控制是否启用查询
|
|
|
|
|
|
})); |
|
|
}; |
|
|
}; |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const deletesCertificateAtom = (params: Req_DeletesCert) => |
|
|
export const deletesCertificateAtom = (params: Req_DeletesCert) => |
|
|
atomWithQuery<IApiResult, any>(() => { |
|
|
atomWithQuery<IApiResult, any>(() => { |
|
|
return { |
|
|
return { |
|
|