feat: 修复发布时图片未上传完成导致详情图片丢失的问题,修复详情球局日期展示问题,修复球局管理取消活动无响应的问题
This commit is contained in:
@@ -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}小时`;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,12 @@ export default function StickyButton(props) {
|
||||
available: false,
|
||||
// action: () => toast("活动已取消"),
|
||||
};
|
||||
} else if (MATCH_STATUS.FINISHED === match_status) {
|
||||
return {
|
||||
text: "活动已结束",
|
||||
available: false,
|
||||
// action: () => toast("活动已取消"),
|
||||
};
|
||||
} else if (dayjs(end_time).isBefore(dayjs())) {
|
||||
return {
|
||||
text: "活动已结束",
|
||||
|
||||
Reference in New Issue
Block a user