This commit is contained in:
Archer
2023-10-30 13:26:42 +08:00
committed by GitHub
parent 008d0af010
commit 60ee160131
216 changed files with 4429 additions and 2229 deletions

View File

@@ -33,6 +33,7 @@ const BillTable = () => {
to: new Date()
});
const { isPc } = useSystemStore();
const [billDetail, setBillDetail] = useState<UserBillType>();
const {
data: bills,
@@ -48,8 +49,6 @@ const BillTable = () => {
}
});
const [billDetail, setBillDetail] = useState<UserBillType>();
return (
<Flex flexDirection={'column'} py={[0, 5]} h={'100%'} position={'relative'}>
<TableContainer px={[3, 8]} position={'relative'} flex={'1 0 0'} h={0} overflowY={'auto'}>
@@ -106,4 +105,4 @@ const BillTable = () => {
);
};
export default BillTable;
export default React.memo(BillTable);

View File

@@ -271,7 +271,7 @@ const UserInfo = () => {
>
<Avatar src={'/imgs/openai.png'} w={'18px'} />
<Box ml={2} flex={1}>
OpenAI
OpenAI/OneAPI
</Box>
<Box
w={'9px'}

View File

@@ -3,7 +3,7 @@ import { Box, Flex, useTheme } from '@chakra-ui/react';
import { getInforms, readInform } from '@/web/support/user/api';
import { usePagination } from '@/web/common/hooks/usePagination';
import { useLoading } from '@/web/common/hooks/useLoading';
import type { informSchema } from '@/types/mongoSchema';
import type { UserInformSchema } from '@fastgpt/global/support/user/type';
import { formatTimeToChatTime } from '@/utils/tools';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import MyIcon from '@/components/Icon';
@@ -20,7 +20,7 @@ const BillTable = () => {
Pagination,
getData,
pageNum
} = usePagination<informSchema>({
} = usePagination<UserInformSchema>({
api: getInforms,
pageSize: isPc ? 20 : 10
});

View File

@@ -32,8 +32,8 @@ const OpenAIAccountModal = ({
<MyModal isOpen onClose={onClose} title={t('user.OpenAI Account Setting')}>
<ModalBody>
<Box fontSize={'sm'} color={'myGray.500'}>
OpenAI key OneAPI 线使 OpenAI
Chat Key 访
OpenAI/OneAPI 线使 OpenAI Chat
Key 访
</Box>
<Flex alignItems={'center'} mt={5}>
<Box flex={'0 0 65px'}>API Key:</Box>

View File

@@ -12,7 +12,7 @@ import {
Box
} from '@chakra-ui/react';
import { getPayOrders, checkPayResult } from '@/web/common/bill/api';
import { PaySchema } from '@/types/mongoSchema';
import type { PaySchema } from '@fastgpt/global/support/wallet/type.d';
import dayjs from 'dayjs';
import { useQuery } from '@tanstack/react-query';
import { formatPrice } from '@fastgpt/global/common/bill/tools';