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, }, }, };