new framwork

This commit is contained in:
archer
2023-06-09 12:57:42 +08:00
parent d9450bd7ee
commit ba9d9c3d5f
263 changed files with 12269 additions and 11599 deletions

16
client/src/utils/adapt.ts Normal file
View File

@@ -0,0 +1,16 @@
import { formatPrice } from './user';
import dayjs from 'dayjs';
import type { BillSchema } from '../types/mongoSchema';
import type { UserBillType } from '@/types/user';
export const adaptBill = (bill: BillSchema): UserBillType => {
return {
id: bill._id,
type: bill.type,
modelName: bill.modelName,
time: bill.time,
textLen: bill.textLen,
tokenLen: bill.tokenLen,
price: formatPrice(bill.price)
};
};