Commit 0cee404c by archer

perf: 账单字段

parent 274ece1d
......@@ -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>
))}
......
......@@ -83,6 +83,7 @@ export interface BillSchema {
chatId: string;
time: Date;
textLen: number;
tokenLen: number;
price: number;
}
......
......@@ -25,6 +25,7 @@ export interface UserBillType {
id: string;
time: string;
textLen: number;
tokenLen: number;
userId: string;
chatId: string;
price: number;
......
......@@ -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)
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment