perf: pay ui;update version doc (#3439)

* perf: pay ui

* update doc
This commit is contained in:
Archer
2024-12-19 17:54:56 +08:00
committed by GitHub
parent a997f277ad
commit 922cb433d3
9 changed files with 43 additions and 38 deletions

View File

@@ -21,7 +21,7 @@ const NotSufficientModal = () => {
</Button>
<Button
onClick={() => {
router.push('/account');
router.push('/account/info');
onClose();
}}
>

View File

@@ -6,6 +6,7 @@ import { checkBalancePayResult } from '@/web/support/wallet/bill/api';
import { useToast } from '@fastgpt/web/hooks/useToast';
import { useRouter } from 'next/router';
import { getErrText } from '@fastgpt/global/common/error/utils';
import LightTip from '@fastgpt/web/components/common/LightTip';
export type QRPayProps = {
readPrice: number;
@@ -13,6 +14,8 @@ export type QRPayProps = {
billId: string;
};
const qrCodeSize = 168;
const QRCodePayModal = ({
tip,
readPrice,
@@ -31,8 +34,8 @@ const QRCodePayModal = ({
if (dom.current && window.QRCode && !dom.current.innerHTML) {
new window.QRCode(dom.current, {
text: codeUrl,
width: 128,
height: 128,
width: qrCodeSize,
height: qrCodeSize,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: window.QRCode.CorrectLevel.H
@@ -74,14 +77,10 @@ const QRCodePayModal = ({
return (
<MyModal isOpen title={t('common:user.Pay')} iconSrc="/imgs/modal/pay.svg">
<ModalBody textAlign={'center'} py={6} whiteSpace={'pre-wrap'}>
{tip && (
<Box fontSize={'sm'} whiteSpace={'pre'} mb={3}>
{tip}
</Box>
)}
<Box ref={dom} id={'payQRCode'} display={'inline-block'} h={'128px'}></Box>
<Box mt={3} textAlign={'center'}>
<ModalBody textAlign={'center'} pb={10} whiteSpace={'pre-wrap'}>
{tip && <LightTip text={tip} mb={8} textAlign={'left'} />}
<Box ref={dom} id={'payQRCode'} display={'inline-block'} h={`${qrCodeSize}px`}></Box>
<Box mt={5} textAlign={'center'}>
{t('common:pay.wechat', { price: readPrice })}
</Box>
</ModalBody>