mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-13 22:56:28 +00:00
@@ -16,6 +16,7 @@ weight: 782
|
||||
## ⚙️ 优化
|
||||
|
||||
1. 兑换码功能支持指定对公支付模式。
|
||||
2. 优化支付套餐模式。
|
||||
|
||||
## 🐛 修复
|
||||
|
||||
|
1
packages/global/support/wallet/bill/api.d.ts
vendored
1
packages/global/support/wallet/bill/api.d.ts
vendored
@@ -16,7 +16,6 @@ export type CreateStandPlanBill = {
|
||||
type CreateExtractPointsBill = {
|
||||
type: BillTypeEnum.extraPoints;
|
||||
extraPoints: number;
|
||||
month: number;
|
||||
};
|
||||
type CreateExtractDatasetBill = {
|
||||
type: BillTypeEnum.extraDatasetSub;
|
||||
|
@@ -796,6 +796,10 @@
|
||||
"dataset_data_input_q": "question",
|
||||
"dataset_data_input_qa": "QA",
|
||||
"dataset_text_model_tip": "Used for text processing in the knowledge base preprocessing stage, such as automatic supplementary indexing, Q&A pair extraction.",
|
||||
"date_12_months": "12 Months",
|
||||
"date_1_month": "1 Month",
|
||||
"date_3_months": "3 Months",
|
||||
"date_6_months": "6 Months",
|
||||
"deep_rag_search": "In-depth search",
|
||||
"delete_api": "Are you sure you want to delete this API key? \nAfter deletion, the key will become invalid immediately and the corresponding conversation log will not be deleted. Please confirm!",
|
||||
"delete_failed": "Deletion Failed",
|
||||
@@ -853,6 +857,7 @@
|
||||
"info.resource": "Resource Usage",
|
||||
"input.Repeat Value": "Duplicate Value",
|
||||
"input_name": "Enter a Name",
|
||||
"invalid_time": "Validity period",
|
||||
"invalid_variable": "Invalid Variable",
|
||||
"is_open": "Is Open",
|
||||
"is_requesting": "Requesting...",
|
||||
@@ -1165,11 +1170,6 @@
|
||||
"support.wallet.subscription.Update extra ai points tips": "Purchase points will take effect immediately and will automatically expire after expiration.",
|
||||
"support.wallet.subscription.Update extra dataset size": "Storage",
|
||||
"support.wallet.subscription.Update extra dataset tips": "After the knowledge base index expires, the existing data is still retained and the data cannot be added or modified.",
|
||||
"support.wallet.subscription.Update extra expire": "Validity period",
|
||||
"support.wallet.subscription.Update extra expire 1 month": "1 Month",
|
||||
"support.wallet.subscription.Update extra expire 12 months": "12 Months",
|
||||
"support.wallet.subscription.Update extra expire 3 months": "3 Months",
|
||||
"support.wallet.subscription.Update extra expire 6 months": "6 Months",
|
||||
"support.wallet.subscription.Update extra price": "Price",
|
||||
"support.wallet.subscription.Upgrade plan": "Upgrade Package",
|
||||
"support.wallet.subscription.ai_model": "AI Language Model",
|
||||
|
@@ -796,6 +796,10 @@
|
||||
"dataset_data_input_q": "问题",
|
||||
"dataset_data_input_qa": "QA 模式",
|
||||
"dataset_text_model_tip": "用于知识库预处理阶段的文本处理,例如自动补充索引、问答对提取。",
|
||||
"date_12_months": "12个月",
|
||||
"date_1_month": "1个月",
|
||||
"date_3_months": "3个月",
|
||||
"date_6_months": "6个月",
|
||||
"deep_rag_search": "深度搜索",
|
||||
"delete_api": "确认删除该API密钥?删除后该密钥立即失效,对应的对话日志不会删除,请确认!",
|
||||
"delete_failed": "删除失败",
|
||||
@@ -853,6 +857,7 @@
|
||||
"info.resource": "资源用量",
|
||||
"input.Repeat Value": "有重复的值",
|
||||
"input_name": "取个名字",
|
||||
"invalid_time": "有效期",
|
||||
"invalid_variable": "无效变量",
|
||||
"is_open": "是否开启",
|
||||
"is_requesting": "请求中……",
|
||||
@@ -1119,6 +1124,8 @@
|
||||
"support.wallet.bill_tag.default_header": "默认抬头",
|
||||
"support.wallet.bill_tag.invoice": "开票记录",
|
||||
"support.wallet.billable_invoice": "可开票账单",
|
||||
"support.wallet.buy_ai_points": "购买 AI 积分",
|
||||
"support.wallet.buy_dataset_capacity": "购买知识库索引量",
|
||||
"support.wallet.buy_resource": "购买资源包",
|
||||
"support.wallet.has_invoice": "是否已开票",
|
||||
"support.wallet.invoice_amount": "开票金额",
|
||||
@@ -1142,35 +1149,28 @@
|
||||
"support.wallet.subscription.AI points usage tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分。具体的计算标准可参考上方的“计费标准”",
|
||||
"support.wallet.subscription.Ai points": "AI 积分计算标准",
|
||||
"support.wallet.subscription.Current plan": "当前套餐",
|
||||
"support.wallet.subscription.Dataset size": "知识库索引量",
|
||||
"support.wallet.subscription.Extra ai points": "额外 AI 积分",
|
||||
"support.wallet.subscription.Extra ai points description": "积分购买量与有效期智能联动, 买的越多用的越久",
|
||||
"support.wallet.subscription.Extra dataset description": "支持根据实际需求为知识库索引量延长有效期",
|
||||
"support.wallet.subscription.Extra dataset size": "额外知识库容量",
|
||||
"support.wallet.subscription.Extra dataset unit": "组/1个月",
|
||||
"support.wallet.subscription.Extra plan": "额外资源包",
|
||||
"support.wallet.subscription.Extra plan tip": "标准套餐不够时,您可以购买额外资源包继续使用",
|
||||
"support.wallet.subscription.FAQ": "常见问题",
|
||||
"support.wallet.subscription.Month amount": "月数",
|
||||
"support.wallet.subscription.Next plan": "未来套餐",
|
||||
"support.wallet.subscription.Points amount": "积分量",
|
||||
"support.wallet.subscription.Stand plan level": "订阅套餐",
|
||||
"support.wallet.subscription.Sub plan": "订阅套餐",
|
||||
"support.wallet.subscription.Sub plan tip": "免费使用【{{title}}】或升级更高的套餐",
|
||||
"support.wallet.subscription.Team plan and usage": "套餐与用量",
|
||||
"support.wallet.subscription.Training weight": "训练优先级:{{weight}}",
|
||||
"support.wallet.subscription.Update extra ai points": "额外 AI 积分",
|
||||
"support.wallet.subscription.Update extra dataset size": "额外存储量",
|
||||
"support.wallet.subscription.Update extra expire 1 month": "1个月",
|
||||
"support.wallet.subscription.Update extra expire 12 months": "12个月",
|
||||
"support.wallet.subscription.Update extra expire 3 months": "3个月",
|
||||
"support.wallet.subscription.Update extra expire 6 months": "6个月",
|
||||
"support.wallet.buy_ai_points": "购买 AI 积分",
|
||||
"support.wallet.subscription.Update extra expire": "有效期",
|
||||
"support.wallet.subscription.Update extra price": "价格",
|
||||
"support.wallet.subscription.Update extra dataset tips": "知识库索引量到期后,仍保留已有数据,无法增改数据",
|
||||
"support.wallet.subscription.Dataset size": "知识库索引量",
|
||||
"support.wallet.buy_dataset_capacity": "购买知识库索引量",
|
||||
"support.wallet.subscription.Extra dataset description": "支持根据实际需求为知识库索引量延长有效期",
|
||||
"support.wallet.subscription.Extra dataset unit": "组/1个月",
|
||||
"support.wallet.subscription.Update extra ai points tips": "购买积分即刻生效,过期后将自动失效",
|
||||
"support.wallet.subscription.Points amount": "积分量",
|
||||
"support.wallet.subscription.Update extra dataset size": "额外存储量",
|
||||
"support.wallet.subscription.Update extra dataset tips": "知识库索引量到期后,仍保留已有数据,无法增改数据",
|
||||
"support.wallet.subscription.Update extra price": "价格",
|
||||
"support.wallet.subscription.Upgrade plan": "升级套餐",
|
||||
"support.wallet.subscription.ai_model": "AI语言模型",
|
||||
"support.wallet.subscription.eval_items_count": "单次评测数据条数: {{count}} 条",
|
||||
|
@@ -796,6 +796,10 @@
|
||||
"dataset_data_input_q": "問題",
|
||||
"dataset_data_input_qa": "QA 模式",
|
||||
"dataset_text_model_tip": "用於知識庫預處理階段的文字處理,例如自動補充索引、問答對提取。",
|
||||
"date_12_months": "12個月",
|
||||
"date_1_month": "1個月",
|
||||
"date_3 months": "3個月",
|
||||
"date_6_months": "6個月",
|
||||
"deep_rag_search": "深度搜尋",
|
||||
"delete_api": "確認刪除此 API 金鑰?\n刪除後該金鑰將立即失效,對應的對話記錄不會被刪除,請確認!",
|
||||
"delete_failed": "刪除失敗",
|
||||
@@ -853,6 +857,7 @@
|
||||
"info.resource": "資源使用量",
|
||||
"input.Repeat Value": "重複的值",
|
||||
"input_name": "輸入名稱",
|
||||
"invalid_time": "有效期",
|
||||
"invalid_variable": "無效變數",
|
||||
"is_open": "是否開啟",
|
||||
"is_requesting": "請求中...",
|
||||
@@ -1165,11 +1170,6 @@
|
||||
"support.wallet.subscription.Update extra ai points tips": "購買積分即刻生效,過期後將自動失效",
|
||||
"support.wallet.subscription.Update extra dataset size": "額外儲存空間",
|
||||
"support.wallet.subscription.Update extra dataset tips": "知識庫索引量到期後,仍保留已有數據,無法增改數據",
|
||||
"support.wallet.subscription.Update extra expire": "有效期",
|
||||
"support.wallet.subscription.Update extra expire 1 month": "1個月",
|
||||
"support.wallet.subscription.Update extra expire 12 months": "12個月",
|
||||
"support.wallet.subscription.Update extra expire 3 months": "3個月",
|
||||
"support.wallet.subscription.Update extra expire 6 months": "6個月",
|
||||
"support.wallet.subscription.Update extra price": "價格",
|
||||
"support.wallet.subscription.Upgrade plan": "升級方案",
|
||||
"support.wallet.subscription.ai_model": "AI 語言模型",
|
||||
|
@@ -23,13 +23,6 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
const { subPlans } = useSystemStore();
|
||||
const [qrPayData, setQRPayData] = useState<QRPayProps>();
|
||||
|
||||
const expireSelectorOptions: { label: string; value: number }[] = [
|
||||
{ label: t('common:support.wallet.subscription.Update extra expire 1 month'), value: 1 },
|
||||
{ label: t('common:support.wallet.subscription.Update extra expire 3 months'), value: 3 },
|
||||
{ label: t('common:support.wallet.subscription.Update extra expire 6 months'), value: 6 },
|
||||
{ label: t('common:support.wallet.subscription.Update extra expire 12 months'), value: 12 }
|
||||
];
|
||||
|
||||
// 额外的知识库索引量
|
||||
const extraDatasetPrice = subPlans?.extraDatasetSize?.price || 0;
|
||||
const {
|
||||
@@ -77,6 +70,12 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
);
|
||||
|
||||
// extra ai points
|
||||
const expireSelectorOptions: { label: string; value: number }[] = [
|
||||
{ label: t('common:date_1_month'), value: 1 },
|
||||
{ label: t('common:date_3_months'), value: 3 },
|
||||
{ label: t('common:date_6_months'), value: 6 },
|
||||
{ label: t('common:date_12_months'), value: 12 }
|
||||
];
|
||||
const extraPointsPrice = subPlans?.extraPoints?.price || 0;
|
||||
const {
|
||||
watch: watchExtraPoints,
|
||||
@@ -109,7 +108,6 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
|
||||
const res = await postCreatePayBill({
|
||||
type: BillTypeEnum.extraPoints,
|
||||
month,
|
||||
extraPoints: points
|
||||
});
|
||||
|
||||
@@ -188,16 +186,15 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
min={0}
|
||||
size={'sm'}
|
||||
onChange={(val) => {
|
||||
// 过滤掉NaN和无效输入
|
||||
if (val === ('' as unknown as number) || val === null || val === undefined) {
|
||||
setValueExtraPoints('points', undefined as unknown as number);
|
||||
} else if (!isNaN(val) && val >= 0) {
|
||||
setValueExtraPoints('points', val as unknown as number);
|
||||
// 当用户输入积分时,自动更新月份
|
||||
const expectedMonth = getMonthByPoints(val);
|
||||
if (expectedMonth !== watchedMonth) {
|
||||
setValueExtraPoints('month', expectedMonth);
|
||||
}
|
||||
setValueExtraPoints('points', val as unknown as number);
|
||||
}}
|
||||
onBlur={(val) => {
|
||||
const formatVal = val || 1;
|
||||
setValueExtraPoints('points', formatVal);
|
||||
|
||||
const expectedMonth = getMonthByPoints(formatVal);
|
||||
if (expectedMonth !== watchedMonth) {
|
||||
setValueExtraPoints('month', expectedMonth);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
@@ -208,7 +205,7 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} fontSize={'sm'} h="36px">
|
||||
<Box flex={['0 0 100px', '1 0 0']} color={'myGray.600'} fontWeight={'500'}>
|
||||
{t('common:support.wallet.subscription.Update extra expire')}
|
||||
{t('common:invalid_time')}
|
||||
</Box>
|
||||
<Flex
|
||||
justifyContent={'end'}
|
||||
@@ -350,7 +347,7 @@ const ExtraPlan = ({ onPaySuccess }: { onPaySuccess?: () => void }) => {
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} fontSize={'sm'}>
|
||||
<Box flex={['0 0 100px', '1 0 0']} color={'myGray.600'} fontWeight={'500'}>
|
||||
{t('common:support.wallet.subscription.Update extra expire')}
|
||||
{t('common:date')}
|
||||
</Box>
|
||||
<Flex
|
||||
justifyContent={'end'}
|
||||
|
@@ -80,7 +80,7 @@ const Team = () => {
|
||||
px={'1rem'}
|
||||
value={teamTab}
|
||||
onChange={(e) => {
|
||||
if (e === TeamTabEnum.audit && !planContent?.permissionTeamOperationLog) {
|
||||
if (e === TeamTabEnum.audit && planContent && !planContent?.permissionTeamOperationLog) {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('common:not_permission')
|
||||
@@ -96,7 +96,7 @@ const Team = () => {
|
||||
}}
|
||||
/>
|
||||
),
|
||||
[planContent?.permissionTeamOperationLog, router, t, teamTab, toast]
|
||||
[planContent, router, t, teamTab, toast]
|
||||
);
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user