From 5cd3968929acef333cf30d3b20cf21cea6c82c5f Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Fri, 20 Jun 2025 16:58:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=85=BE=E8=AE=AF=E4=BA=91=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E7=AB=99=EF=BC=8C=E9=83=A8=E7=BD=B2=E5=88=B0?= =?UTF-8?q?EO=E6=8F=92=E4=BB=B6=E6=94=AF=E6=8C=81=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/plugin-lib/src/tencent/access.ts | 28 +++++++++++++++++-- .../plugin/deploy-to-eo/index.ts | 3 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/plugins/plugin-lib/src/tencent/access.ts b/packages/plugins/plugin-lib/src/tencent/access.ts index 2387a659..27d1c11e 100644 --- a/packages/plugins/plugin-lib/src/tencent/access.ts +++ b/packages/plugins/plugin-lib/src/tencent/access.ts @@ -8,8 +8,7 @@ import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline"; export class TencentAccess extends BaseAccess { @AccessInput({ title: "secretId", - helper: - "使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建", + helper: "使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建", component: { placeholder: "secretId", }, @@ -25,4 +24,29 @@ export class TencentAccess extends BaseAccess { rules: [{ required: true, message: "该项必填" }], }) secretKey = ""; + + @AccessInput({ + title: "站点类型", + value: "cn", + component: { + name: "a-select", + options: [ + { + label: "国内站", + value: "cn", + }, + { + label: "国际站", + value: "intl", + }, + ], + }, + encrypt: true, + rules: [{ required: true, message: "该项必填" }], + }) + accountType: string; + + isIntl() { + return this.accountType === "intl"; + } } diff --git a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-eo/index.ts b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-eo/index.ts index 9b37b33d..ab4b16f7 100644 --- a/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-eo/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-tencent/plugin/deploy-to-eo/index.ts @@ -89,6 +89,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin { getClient(accessProvider: TencentAccess) { const TeoClient = this.Client; + const endpoint = accessProvider.isIntl()?"teo.intl.tencentcloudapi.com": "teo.tencentcloudapi.com"; const clientConfig = { credential: { secretId: accessProvider.secretId, @@ -97,7 +98,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin { region: '', profile: { httpProfile: { - endpoint: 'teo.tencentcloudapi.com', + endpoint, }, }, };