mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 00:17:31 +00:00
perf: 账单字段
This commit is contained in:
@@ -235,9 +235,7 @@ const NumberSetting = () => {
|
|||||||
<Td>
|
<Td>
|
||||||
{item.createTime ? dayjs(item.createTime).format('YYYY/MM/DD HH:mm:ss') : '-'}
|
{item.createTime ? dayjs(item.createTime).format('YYYY/MM/DD HH:mm:ss') : '-'}
|
||||||
</Td>
|
</Td>
|
||||||
<Td whiteSpace="pre-wrap" wordBreak={'break-all'}>
|
<Td>{formatPrice(item.price)}元</Td>
|
||||||
{formatPrice(item.price)}元
|
|
||||||
</Td>
|
|
||||||
<Td>{item.status}</Td>
|
<Td>{item.status}</Td>
|
||||||
<Td>
|
<Td>
|
||||||
{item.status === 'NOTPAY' && (
|
{item.status === 'NOTPAY' && (
|
||||||
@@ -269,6 +267,7 @@ const NumberSetting = () => {
|
|||||||
<Tr>
|
<Tr>
|
||||||
<Th>时间</Th>
|
<Th>时间</Th>
|
||||||
<Th>内容长度</Th>
|
<Th>内容长度</Th>
|
||||||
|
<Th>Tokens 长度</Th>
|
||||||
<Th>消费</Th>
|
<Th>消费</Th>
|
||||||
</Tr>
|
</Tr>
|
||||||
</Thead>
|
</Thead>
|
||||||
@@ -276,9 +275,8 @@ const NumberSetting = () => {
|
|||||||
{bills.map((item) => (
|
{bills.map((item) => (
|
||||||
<Tr key={item.id}>
|
<Tr key={item.id}>
|
||||||
<Td>{item.time}</Td>
|
<Td>{item.time}</Td>
|
||||||
<Td whiteSpace="pre-wrap" wordBreak={'break-all'}>
|
<Td>{item.textLen}</Td>
|
||||||
{item.textLen}
|
<Td>{item.tokenLen}</Td>
|
||||||
</Td>
|
|
||||||
<Td>{item.price}元</Td>
|
<Td>{item.price}元</Td>
|
||||||
</Tr>
|
</Tr>
|
||||||
))}
|
))}
|
||||||
|
1
src/types/mongoSchema.d.ts
vendored
1
src/types/mongoSchema.d.ts
vendored
@@ -83,6 +83,7 @@ export interface BillSchema {
|
|||||||
chatId: string;
|
chatId: string;
|
||||||
time: Date;
|
time: Date;
|
||||||
textLen: number;
|
textLen: number;
|
||||||
|
tokenLen: number;
|
||||||
price: number;
|
price: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
src/types/user.d.ts
vendored
1
src/types/user.d.ts
vendored
@@ -25,6 +25,7 @@ export interface UserBillType {
|
|||||||
id: string;
|
id: string;
|
||||||
time: string;
|
time: string;
|
||||||
textLen: number;
|
textLen: number;
|
||||||
|
tokenLen: number;
|
||||||
userId: string;
|
userId: string;
|
||||||
chatId: string;
|
chatId: string;
|
||||||
price: number;
|
price: number;
|
||||||
|
@@ -10,6 +10,7 @@ export const adaptBill = (bill: BillSchema): UserBillType => {
|
|||||||
chatId: bill.chatId,
|
chatId: bill.chatId,
|
||||||
time: dayjs(bill.time).format('YYYY/MM/DD HH:mm:ss'),
|
time: dayjs(bill.time).format('YYYY/MM/DD HH:mm:ss'),
|
||||||
textLen: bill.textLen,
|
textLen: bill.textLen,
|
||||||
|
tokenLen: bill.tokenLen,
|
||||||
price: formatPrice(bill.price)
|
price: formatPrice(bill.price)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user