mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-14 10:22:02 +08:00
【新增】私有证书
This commit is contained in:
13
frontend/apps/domain-management-backend/src/mocks/utils.ts
Normal file
13
frontend/apps/domain-management-backend/src/mocks/utils.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
||||
|
||||
export const paginate = <T>(list: T[], page: number, pageSize: number) => {
|
||||
const start = (page - 1) * pageSize;
|
||||
const end = start + pageSize;
|
||||
return { slice: list.slice(start, end), total: list.length };
|
||||
};
|
||||
|
||||
export const nowSec = () => Math.floor(Date.now() / 1000);
|
||||
|
||||
export const fen = (yuan: number) => Math.round(yuan * 100);
|
||||
|
||||
export const yuan = (fenVal: number) => Number((fenVal / 100).toFixed(2));
|
||||
Reference in New Issue
Block a user