Revert "sub plan page (#885)" (#886)

This reverts commit 443ad37b6a.
This commit is contained in:
Archer
2024-02-23 17:48:15 +08:00
committed by GitHub
parent 443ad37b6a
commit fd9b6291af
246 changed files with 4281 additions and 6286 deletions

View File

@@ -0,0 +1,26 @@
/* bill common */
import { PRICE_SCALE } from './constants';
import { BillSourceEnum } from './constants';
import { AuthUserTypeEnum } from '../../permission/constant';
/**
* dataset price / PRICE_SCALE = real price
*/
export const formatStorePrice2Read = (val = 0, multiple = 1) => {
return Number(((val / PRICE_SCALE) * multiple).toFixed(10));
};
export const formatModelPrice2Read = (val = 0) => {
return Number((val / 1000).toFixed(10));
};
export const getBillSourceByAuthType = ({
shareId,
authType
}: {
shareId?: string;
authType?: `${AuthUserTypeEnum}`;
}) => {
if (shareId) return BillSourceEnum.shareLink;
if (authType === AuthUserTypeEnum.apikey) return BillSourceEnum.api;
return BillSourceEnum.fastgpt;
};