添加首页统计跳转页面

This commit is contained in:
zhengw
2026-02-05 16:02:34 +08:00
parent 4b8842d676
commit 3513a19880
14 changed files with 151 additions and 39 deletions

View File

@@ -1,5 +1,6 @@
import { http } from './config';
import Big from 'big.js';
import dayjs from 'dayjs';
export const formatTime = (date: Date) => {
const year = date.getFullYear();
@@ -383,3 +384,8 @@ export const formatFileSize = (fileSize: any): string => {
const size = file_size / 1024 ** index;
return size.toFixed(0) + unitArr[index];
};
export const getDay = (option?: { value: number; unit: 'day' | 'month' | 'year' }) => {
const { value = 0, unit = 'day' } = option || {};
return dayjs().subtract(value, unit).format('YYYY-MM-DD');
};