From 397ffc6c19e0f5aafdd01739913fb50b8b8df25a Mon Sep 17 00:00:00 2001 From: heheer Date: Tue, 9 Dec 2025 14:40:25 +0800 Subject: [PATCH] standard plan add custom domain config (#6061) * standard plan add custom domain config * bill detail modal --- .../support/wallet/sub/coupon/type.d.ts | 1 + packages/global/support/wallet/sub/type.d.ts | 2 ++ packages/service/support/wallet/sub/schema.ts | 1 + packages/service/support/wallet/sub/utils.ts | 6 ++++-- packages/web/i18n/en/account.json | 1 + packages/web/i18n/en/common.json | 2 ++ packages/web/i18n/zh-CN/account.json | 1 + packages/web/i18n/zh-CN/common.json | 2 ++ packages/web/i18n/zh-Hant/account.json | 3 ++- packages/web/i18n/zh-Hant/common.json | 4 +++- .../wallet/StandardPlanContentList.tsx | 20 +++++++++++++++++-- .../account/bill/BillDetailModal.tsx | 7 +++++++ 12 files changed, 44 insertions(+), 6 deletions(-) diff --git a/packages/global/support/wallet/sub/coupon/type.d.ts b/packages/global/support/wallet/sub/coupon/type.d.ts index 0afcda182..aa64cc455 100644 --- a/packages/global/support/wallet/sub/coupon/type.d.ts +++ b/packages/global/support/wallet/sub/coupon/type.d.ts @@ -12,6 +12,7 @@ export type CustomSubConfig = { appRegistrationCount: number; auditLogStoreDuration: number; ticketResponseTime: number; + customDomain: number; }; export type TeamCouponSub = { diff --git a/packages/global/support/wallet/sub/type.d.ts b/packages/global/support/wallet/sub/type.d.ts index a575ddf7e..cb8789f2e 100644 --- a/packages/global/support/wallet/sub/type.d.ts +++ b/packages/global/support/wallet/sub/type.d.ts @@ -20,6 +20,7 @@ export type TeamStandardSubPlanItemType = { websiteSyncPerDataset?: number; auditLogStoreDuration?: number; ticketResponseTime?: number; + customDomain?: number; // Custom plan specific fields priceDescription?: string; @@ -73,6 +74,7 @@ export type TeamSubSchema = { appRegistrationCount?: number; auditLogStoreDuration?: number; ticketResponseTime?: number; + customDomain?: number; totalPoints: number; surplusPoints: number; diff --git a/packages/service/support/wallet/sub/schema.ts b/packages/service/support/wallet/sub/schema.ts index 8585ff636..d0a435aa2 100644 --- a/packages/service/support/wallet/sub/schema.ts +++ b/packages/service/support/wallet/sub/schema.ts @@ -64,6 +64,7 @@ const SubSchema = new Schema({ appRegistrationCount: Number, auditLogStoreDuration: Number, ticketResponseTime: Number, + customDomain: Number, // stand sub and extra points sub. Plan total points totalPoints: { diff --git a/packages/service/support/wallet/sub/utils.ts b/packages/service/support/wallet/sub/utils.ts index e1bafdec7..434d258d8 100644 --- a/packages/service/support/wallet/sub/utils.ts +++ b/packages/service/support/wallet/sub/utils.ts @@ -74,7 +74,8 @@ export const getTeamStandPlan = async ({ teamId }: { teamId: string }) => { standard?.appRegistrationCount ?? standardConstants.appRegistrationCount, auditLogStoreDuration: standard?.auditLogStoreDuration ?? standardConstants.auditLogStoreDuration, - ticketResponseTime: standard?.ticketResponseTime ?? standardConstants.ticketResponseTime + ticketResponseTime: standard?.ticketResponseTime ?? standardConstants.ticketResponseTime, + customDomain: standard?.customDomain ?? standardConstants.customDomain } : undefined }; @@ -210,7 +211,8 @@ export const getTeamPlanStatus = async ({ auditLogStoreDuration: standardPlan?.auditLogStoreDuration ?? standardConstants.auditLogStoreDuration, ticketResponseTime: - standardPlan?.ticketResponseTime ?? standardConstants.ticketResponseTime + standardPlan?.ticketResponseTime ?? standardConstants.ticketResponseTime, + customDomain: standardPlan?.customDomain ?? standardConstants.customDomain } : undefined, diff --git a/packages/web/i18n/en/account.json b/packages/web/i18n/en/account.json index ec07e6f1b..062af0c68 100644 --- a/packages/web/i18n/en/account.json +++ b/packages/web/i18n/en/account.json @@ -9,6 +9,7 @@ "confirm_logout": "Confirm to log out?", "create_channel": "Add new channel", "create_model": "Add new model", + "custom_domain": "Custom Domain", "custom_model": "custom model", "default_model": "Default model", "default_model_config": "Default model configuration", diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 9e6d832bd..1d16e7198 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -1224,6 +1224,8 @@ "support.wallet.subscription.function.Points": "{{amount}} points", "support.wallet.subscription.function.Requests per minute": "{{amount}} QPM", "support.wallet.subscription.function.Website sync per dataset": "Single knowledge base {{amount}} web pages synchronized", + "support.wallet.subscription.function.Custom domain": "{{amount}} Custom domains", + "support.wallet.subscription.function.custom domain tip": "The number of custom domains that a team can configure for binding independent domain names to access applications", "support.wallet.subscription.mode.Month": "Month", "support.wallet.subscription.mode.Period": "Subscription Period", "support.wallet.subscription.mode.Year": "Year", diff --git a/packages/web/i18n/zh-CN/account.json b/packages/web/i18n/zh-CN/account.json index 6e6ff57be..f75ebbc79 100644 --- a/packages/web/i18n/zh-CN/account.json +++ b/packages/web/i18n/zh-CN/account.json @@ -14,6 +14,7 @@ "create_channel": "新增渠道", "create_model": "新增模型", "custom_config_details": "定制配置详情", + "custom_domain": "自定义域名", "custom_model": "自定义模型", "day": "天", "default_model": "预设模型", diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json index 8a75af271..59d76fc6b 100644 --- a/packages/web/i18n/zh-CN/common.json +++ b/packages/web/i18n/zh-CN/common.json @@ -1233,6 +1233,8 @@ "support.wallet.subscription.function.Requests per minute": "{{amount}} QPM", "support.wallet.subscription.function.Ticket response time": "{{amount}} 小时工单支持响应", "support.wallet.subscription.function.Website sync per dataset": "站点同步最大 {{amount}} 页", + "support.wallet.subscription.function.Custom domain": "{{amount}} 个自定义域名", + "support.wallet.subscription.function.custom domain tip": "团队可以配置的自定义域名数量,用于绑定独立域名访问应用", "support.wallet.subscription.function.qpm tip": "主要指团队每分钟请求 Agent 的最大次数,与单个 Agent 复杂度无关。其他 OpenAPI 接口也受此影响,每个接口单独计算", "support.wallet.subscription.mode.Month": "按月", "support.wallet.subscription.mode.Period": "订阅周期", diff --git a/packages/web/i18n/zh-Hant/account.json b/packages/web/i18n/zh-Hant/account.json index 02c7c5204..a5991bcaf 100644 --- a/packages/web/i18n/zh-Hant/account.json +++ b/packages/web/i18n/zh-Hant/account.json @@ -14,6 +14,7 @@ "create_channel": "新增管道", "create_model": "新增模型", "custom_config_details": "定制配置詳情", + "custom_domain": "自定義域名", "custom_model": "自訂模型", "day": "天", "default_model": "預設模型", @@ -114,4 +115,4 @@ "website_sync_per_dataset": "站點同步最大頁數", "yes": "是", "yuan": "{{amount}}元" -} \ No newline at end of file +} diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json index 5e619e30b..49336f05b 100644 --- a/packages/web/i18n/zh-Hant/common.json +++ b/packages/web/i18n/zh-Hant/common.json @@ -775,11 +775,11 @@ "create_success": "建立成功", "create_time": "建立時間", "cron_job_run_app": "排程任務", - "custom_plan_price": "定制化計費", "custom_plan_feature_1": "優先深度技術支援", "custom_plan_feature_2": "專屬客戶經理", "custom_plan_feature_3": "彈性資源配置", "custom_plan_feature_4": "安全可控", + "custom_plan_price": "定制化計費", "custom_title": "自訂標題", "data_index_custom": "自定義索引", "data_index_default": "預設索引", @@ -1213,6 +1213,7 @@ "support.wallet.subscription.Upgrade plan": "升級方案", "support.wallet.subscription.ai_model": "AI 語言模型", "support.wallet.subscription.function.Audit log store duration": "{{amount}} 天團隊操作日誌記錄", + "support.wallet.subscription.function.Custom domain": "{{amount}} 個自定義域名", "support.wallet.subscription.function.History store": "{{amount}} 天對話紀錄保留", "support.wallet.subscription.function.Max app": "{{amount}} 個 Agent", "support.wallet.subscription.function.Max dataset": "{{amount}} 個知識庫", @@ -1221,6 +1222,7 @@ "support.wallet.subscription.function.Points": "{{amount}} 積分", "support.wallet.subscription.function.Requests per minute": "{{amount}} QPM", "support.wallet.subscription.function.Website sync per dataset": "單知識庫 {{amount}} 個網頁同步", + "support.wallet.subscription.function.custom domain tip": "團隊可以配置的自定義域名數量,用於綁定獨立域名訪問應用", "support.wallet.subscription.mode.Month": "按月", "support.wallet.subscription.mode.Period": "訂閱週期", "support.wallet.subscription.mode.Year": "按年", diff --git a/projects/app/src/components/support/wallet/StandardPlanContentList.tsx b/projects/app/src/components/support/wallet/StandardPlanContentList.tsx index 6a2d8599e..a79fd48b0 100644 --- a/projects/app/src/components/support/wallet/StandardPlanContentList.tsx +++ b/projects/app/src/components/support/wallet/StandardPlanContentList.tsx @@ -46,7 +46,8 @@ const StandardPlanContentList = ({ standplan?.chatHistoryStoreDuration ?? plan.chatHistoryStoreDuration, auditLogStoreDuration: standplan?.auditLogStoreDuration ?? plan.auditLogStoreDuration, appRegistrationCount: standplan?.appRegistrationCount ?? plan.appRegistrationCount, - ticketResponseTime: standplan?.ticketResponseTime ?? plan.ticketResponseTime + ticketResponseTime: standplan?.ticketResponseTime ?? plan.ticketResponseTime, + customDomain: standplan?.customDomain ?? plan.customDomain }; }, [ subPlans?.standard, @@ -62,7 +63,8 @@ const StandardPlanContentList = ({ standplan?.chatHistoryStoreDuration, standplan?.auditLogStoreDuration, standplan?.appRegistrationCount, - standplan?.ticketResponseTime + standplan?.ticketResponseTime, + standplan?.customDomain ]); return planContent ? ( @@ -175,6 +177,20 @@ const StandardPlanContentList = ({ )} + {planContent.customDomain !== undefined && ( + + + + {t('common:support.wallet.subscription.function.Custom domain', { + amount: planContent.customDomain + })} + + + + )} ) : null; }; diff --git a/projects/app/src/pageComponents/account/bill/BillDetailModal.tsx b/projects/app/src/pageComponents/account/bill/BillDetailModal.tsx index 5bc963ffd..67ac99b4b 100644 --- a/projects/app/src/pageComponents/account/bill/BillDetailModal.tsx +++ b/projects/app/src/pageComponents/account/bill/BillDetailModal.tsx @@ -109,6 +109,13 @@ const BillDetailModal = ({ billId, onClose }: BillDetailModalProps) => { unit: 'h' }); } + if (config.customDomain !== undefined) { + items.push({ + key: i18nT('account:custom_domain'), + value: config.customDomain, + unit: '' + }); + } return items; }, [bill?.couponDetail?.subscriptions]);