mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 支持http校验方式申请证书
This commit is contained in:
+6
-6
@@ -58,6 +58,9 @@
|
||||
<div v-if="item.type === 'cname'" class="plan-cname">
|
||||
<cname-verify-plan v-model="item.cnameVerifyPlan" @change="onPlanChanged" />
|
||||
</div>
|
||||
<div v-if="item.type === 'http'" class="plan-http">
|
||||
<cname-verify-plan v-model="item.cnameVerifyPlan" @change="onPlanChanged" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -127,12 +130,7 @@ function showError(error: string) {
|
||||
errorMessageRef.value = error;
|
||||
}
|
||||
|
||||
type DomainGroup = Record<
|
||||
string,
|
||||
{
|
||||
[key: string]: CnameRecord;
|
||||
}
|
||||
>[];
|
||||
type DomainGroup = Record<string, Record<string, CnameRecord>>;
|
||||
|
||||
function onDomainsChanged(domains: string[]) {
|
||||
console.log("域名变化", domains);
|
||||
@@ -169,6 +167,7 @@ function onDomainsChanged(domains: string[]) {
|
||||
planItem = {
|
||||
domain,
|
||||
type: "cname",
|
||||
//@ts-ignore
|
||||
cnameVerifyPlan: {
|
||||
...subDomains
|
||||
}
|
||||
@@ -178,6 +177,7 @@ function onDomainsChanged(domains: string[]) {
|
||||
const cnamePlan = planItem.cnameVerifyPlan;
|
||||
for (const subDomain in subDomains) {
|
||||
if (!cnamePlan[subDomain]) {
|
||||
//@ts-ignore
|
||||
cnamePlan[subDomain] = {
|
||||
id: 0
|
||||
};
|
||||
|
||||
+9
-1
@@ -1,11 +1,19 @@
|
||||
import { CnameRecord } from "@certd/pipeline";
|
||||
|
||||
export type HttpRecord = {
|
||||
domain: string;
|
||||
httpUploaderType: string;
|
||||
httpUploaderAccess: number;
|
||||
httpUploadRootDir: string;
|
||||
};
|
||||
|
||||
export type DomainVerifyPlanInput = {
|
||||
domain: string;
|
||||
type: "cname" | "dns";
|
||||
type: "cname" | "dns" | "http";
|
||||
dnsProviderType?: string;
|
||||
dnsProviderAccessId?: number;
|
||||
cnameVerifyPlan?: Record<string, CnameRecord>;
|
||||
httpVerifyPlan?: Record<string, HttpRecord>;
|
||||
};
|
||||
export type DomainsVerifyPlanInput = {
|
||||
[key: string]: DomainVerifyPlanInput;
|
||||
|
||||
Reference in New Issue
Block a user