From 72f850f675b500d12ebff2338d1b99d6fab476e1 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 3 Mar 2026 11:29:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96dcdn=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=9A=E6=AC=A1=E8=AF=81=E4=B9=A6=20?= =?UTF-8?q?=E5=81=B6=E5=B0=94=E6=8A=A5=20The=20CertName=20already=20exists?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts index 8bc11d2db..09c344ef2 100644 --- a/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-aliyun/plugin/deploy-to-dcdn/index.ts @@ -79,9 +79,11 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { if (typeof this.domainName === 'string') { this.domainName = [this.domainName]; } + + const params:any = await this.buildParams(); for (const domainName of this.domainName) { this.logger.info(`[${domainName}]开始部署`) - const params = await this.buildParams(domainName); + params.DomainName = domainName; await this.doRequest(client, params); this.logger.info(`[${domainName}]部署成功`) } @@ -100,7 +102,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { return client; } - async buildParams(domainName: string) { + async buildParams() { const CertName = (this.certName ?? 'certd') + '-' + dayjs().format('YYYYMMDDHHmmss'); let certId: any = this.cert @@ -111,7 +113,6 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { this.logger.info('上传证书:', CertName); const cert: any = this.cert; return { - DomainName: domainName, SSLProtocol: 'on', CertName: CertName, CertType: 'upload', @@ -126,7 +127,6 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin { } this.logger.info('使用已上传的证书:', certId); return { - DomainName: domainName, SSLProtocol: 'on', CertType: 'cas', CertName: CertName,