feat: 修复发布时图片未上传完成导致详情图片丢失的问题,修复详情球局日期展示问题,修复球局管理取消活动无响应的问题

This commit is contained in:
2025-10-24 15:59:03 +08:00
parent 4126ad5679
commit f93b27c4a7
8 changed files with 308 additions and 193 deletions

View File

@@ -13,8 +13,11 @@ function genGameLength(startTime: Dayjs, endTime: Dayjs) {
return "";
}
const hours = endTime.diff(startTime, "hour");
if (Math.floor(hours / 24) > 1) {
return `${Math.floor(hours / 24)}${hours % 24}小时`;
if (Math.floor(hours / 24) >= 1) {
const leftHours = Math.floor(hours % 24);
return `${Math.floor(hours / 24)}${
leftHours !== 0 ? `${leftHours}小时` : ""
}`;
}
return `${hours}小时`;
}