perf: 账单字段

This commit is contained in:
archer
2023-03-25 20:48:21 +08:00
parent 274ece1d91
commit 0cee404c7f
4 changed files with 7 additions and 6 deletions

View File

@@ -235,9 +235,7 @@ const NumberSetting = () => {
<Td>
{item.createTime ? dayjs(item.createTime).format('YYYY/MM/DD HH:mm:ss') : '-'}
</Td>
<Td whiteSpace="pre-wrap" wordBreak={'break-all'}>
{formatPrice(item.price)}
</Td>
<Td>{formatPrice(item.price)}</Td>
<Td>{item.status}</Td>
<Td>
{item.status === 'NOTPAY' && (
@@ -269,6 +267,7 @@ const NumberSetting = () => {
<Tr>
<Th></Th>
<Th></Th>
<Th>Tokens </Th>
<Th></Th>
</Tr>
</Thead>
@@ -276,9 +275,8 @@ const NumberSetting = () => {
{bills.map((item) => (
<Tr key={item.id}>
<Td>{item.time}</Td>
<Td whiteSpace="pre-wrap" wordBreak={'break-all'}>
{item.textLen}
</Td>
<Td>{item.textLen}</Td>
<Td>{item.tokenLen}</Td>
<Td>{item.price}</Td>
</Tr>
))}

View File

@@ -83,6 +83,7 @@ export interface BillSchema {
chatId: string;
time: Date;
textLen: number;
tokenLen: number;
price: number;
}

1
src/types/user.d.ts vendored
View File

@@ -25,6 +25,7 @@ export interface UserBillType {
id: string;
time: string;
textLen: number;
tokenLen: number;
userId: string;
chatId: string;
price: number;

View File

@@ -10,6 +10,7 @@ export const adaptBill = (bill: BillSchema): UserBillType => {
chatId: bill.chatId,
time: dayjs(bill.time).format('YYYY/MM/DD HH:mm:ss'),
textLen: bill.textLen,
tokenLen: bill.tokenLen,
price: formatPrice(bill.price)
};
};