support add pay form url env (#6086)

* support add pay form url env

* optimize

* fix
This commit is contained in:
heheer
2025-12-17 17:28:40 +08:00
committed by GitHub
parent 285e2b5c93
commit abc2b6d20d
9 changed files with 22 additions and 6 deletions
@@ -1,7 +1,7 @@
import MyModal from '@fastgpt/web/components/common/MyModal';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useTranslation } from 'next-i18next';
import { Box, ModalBody, Flex, Button } from '@chakra-ui/react';
import { useTranslation, Trans } from 'next-i18next';
import { Box, ModalBody, Flex, Button, Text, Link } from '@chakra-ui/react';
import { checkBalancePayResult, putUpdatePayment } from '@/web/support/wallet/bill/api';
import LightTip from '@fastgpt/web/components/common/LightTip';
import QRCode from 'qrcode';
@@ -241,6 +241,17 @@ const QRCodePayModal = ({
</Button>
)}
</Flex>
{feConfigs.payFormUrl && (
<Box mt={4} textAlign="center" fontSize="sm">
<Trans
i18nKey="common:pay.payment_form_tip"
components={{
payLink: <Link href={feConfigs.payFormUrl} target="_blank" color="primary.600" />
}}
/>
</Box>
)}
</ModalBody>
</MyModal>
);
@@ -105,7 +105,7 @@ const TemplateImportModal = ({
FileTypeNode={
<Box fontSize={'xs'}>
<Trans
i18nKey={'file:template_csv_file_select_tip'}
i18nKey="file:template_csv_file_select_tip"
values={{
fileType: '.csv'
}}
@@ -19,7 +19,7 @@ const PolicyTip = ({ isCenter }: { isCenter: boolean }) => {
whiteSpace={'pre-wrap'}
>
<Trans
i18nKey={'login:policy_tip'}
i18nKey="login:policy_tip"
components={{
div: <Flex justifyContent={'center'} />,
termsLink: (
@@ -260,7 +260,7 @@ const EvaluationCreating = () => {
FileTypeNode={
<Box fontSize={'xs'}>
<Trans
i18nKey={'dashboard_evaluation:template_csv_file_select_tip'}
i18nKey="dashboard_evaluation:template_csv_file_select_tip"
values={{
fileType: '.csv'
}}
@@ -150,7 +150,8 @@ export async function initSystemConfig() {
show_coupon: process.env.SHOW_COUPON === 'true',
show_discount_coupon: process.env.SHOW_DISCOUNT_COUPON === 'true',
show_dataset_enhance: licenseData?.functions?.datasetEnhance,
show_batch_eval: licenseData?.functions?.batchEval
show_batch_eval: licenseData?.functions?.batchEval,
payFormUrl: process.env.PAY_FORM_URL || ''
},
systemEnv: {
...fileRes.systemEnv,