|
@ -27,6 +27,7 @@ import { |
|
|
TagOutlined, |
|
|
TagOutlined, |
|
|
} from "@ant-design/icons"; |
|
|
} from "@ant-design/icons"; |
|
|
import { useQueryClient } from "@tanstack/react-query"; |
|
|
import { useQueryClient } from "@tanstack/react-query"; |
|
|
|
|
|
import { useNavigate } from "@tanstack/react-router"; |
|
|
const i18nPrefix = "cert.apply"; |
|
|
const i18nPrefix = "cert.apply"; |
|
|
|
|
|
|
|
|
const DomainsInput = (props: { domains; setDomains; currentDomainMod; setCurrentDomainMod; currentStep }) => { |
|
|
const DomainsInput = (props: { domains; setDomains; currentDomainMod; setCurrentDomainMod; currentStep }) => { |
|
@ -132,10 +133,16 @@ const StatusTable = (props: { value: string; setCurrentStep; setDns_list }) => { |
|
|
setForceUpdate((prev) => prev + 1); |
|
|
setForceUpdate((prev) => prev + 1); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
const { mutate: addCnameFun, isPending: addCnamePending, isSuccess } = useAtomValue(certAddCnameAtom); |
|
|
|
|
|
|
|
|
const { |
|
|
|
|
|
data: addCnameData, |
|
|
|
|
|
mutate: addCnameFun, |
|
|
|
|
|
isPending, |
|
|
|
|
|
isSuccess: isAddSuccess, |
|
|
|
|
|
} = useAtomValue(certAddCnameAtom); |
|
|
const handleAddCname = async (info: any) => { |
|
|
const handleAddCname = async (info: any) => { |
|
|
addCnameFun(info); |
|
|
addCnameFun(info); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// const {
|
|
|
// const {
|
|
|
// data: dnsVerifyStatus,
|
|
|
// data: dnsVerifyStatus,
|
|
|
// isFetching: isVerifyFetching,
|
|
|
// isFetching: isVerifyFetching,
|
|
@ -360,6 +367,7 @@ const Apply = () => { |
|
|
const { styles } = useStyle(); |
|
|
const { styles } = useStyle(); |
|
|
const [form] = Form.useForm(); |
|
|
const [form] = Form.useForm(); |
|
|
const { |
|
|
const { |
|
|
|
|
|
data: applyTxtCertificateData, |
|
|
mutate: applyTxtCertificateFun, |
|
|
mutate: applyTxtCertificateFun, |
|
|
isPending: applyTxtCertificatePending, |
|
|
isPending: applyTxtCertificatePending, |
|
|
isSuccess: applyTxtCertificateIsSuccess, |
|
|
isSuccess: applyTxtCertificateIsSuccess, |
|
@ -379,7 +387,7 @@ const Apply = () => { |
|
|
}; |
|
|
}; |
|
|
const applyTxtCertificateClick = () => { |
|
|
const applyTxtCertificateClick = () => { |
|
|
const data: Req_ApplyTxtCertificate = { |
|
|
const data: Req_ApplyTxtCertificate = { |
|
|
is_sync: true, |
|
|
|
|
|
|
|
|
is_sync: false, |
|
|
acme_type: acme_type, |
|
|
acme_type: acme_type, |
|
|
key_rsa: key_rsa, |
|
|
key_rsa: key_rsa, |
|
|
dns_list: dns_list, |
|
|
dns_list: dns_list, |
|
@ -394,6 +402,21 @@ const Apply = () => { |
|
|
form.setFieldsValue({ algorithm: key_rsa }); |
|
|
form.setFieldsValue({ algorithm: key_rsa }); |
|
|
}, [domains, acme_type, key_rsa, form]); |
|
|
}, [domains, acme_type, key_rsa, form]); |
|
|
|
|
|
|
|
|
|
|
|
const navigate = useNavigate(); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
if (applyTxtCertificateIsSuccess) { |
|
|
|
|
|
const status = (applyTxtCertificateData as any)?.data?.item[0]?.status || 0; |
|
|
|
|
|
const status_txt = (applyTxtCertificateData as any)?.data?.item[0]?.status_txt||""; |
|
|
|
|
|
if (status || status === 5) { |
|
|
|
|
|
message.error(status_txt); |
|
|
|
|
|
} else { |
|
|
|
|
|
message.success(status_txt); |
|
|
|
|
|
navigate({ to: `/client/cert/management` }); // 确保路径正确
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, [applyTxtCertificateIsSuccess]); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<ListPageLayout |
|
|
<ListPageLayout |
|
|
childrenClassName={styles.applyContent} |
|
|
childrenClassName={styles.applyContent} |
|
|