修改后台目录和创建比赛的时间设置

This commit is contained in:
2025-05-09 20:56:40 +08:00
parent c05136a0be
commit 14462000c5
13 changed files with 187 additions and 123 deletions

View File

@@ -11,6 +11,16 @@ export function getACRate(acCount: number, totalCount: number) {
return `${rate}%`
}
export function getACRateNumber(acCount: number, totalCount: number) {
let rate = ""
if (totalCount === 0) rate = "0.00"
else {
if (acCount >= totalCount) rate = "100.00"
else rate = ((acCount / totalCount) * 100).toFixed(2)
}
return Number(rate)
}
export function filterEmptyValue(object: any) {
let query: any = {}
Object.keys(object).forEach((key) => {
@@ -89,7 +99,7 @@ export function durationToDays(
if (duration.days) {
result += duration.days + "天"
}
return !!result ? result :"一天以内"
return !!result ? result : "一天以内"
}
export function secondsToDuration(seconds: number): string {