diff --git a/src/military/qz2022.js b/src/military/qz2022.js index fb9d5b60f..2b0d4ca0a 100644 --- a/src/military/qz2022.js +++ b/src/military/qz2022.js @@ -94,7 +94,13 @@ const Qz2022 = (props) => { }) }, [reload]) - console.log(active); + let applyStatus; // 是否处于报名阶段 + let referStatus; // 提交作品的开始时间 = 报名的最后时间 + if(qzDetail){ + applyStatus = Date.parse(new Date()) < Date.parse(new Date(qzDetail.enroll_date)); + referStatus = !applyStatus && Date.parse(new Date()) < Date.parse(new Date(qzDetail.upload_date)); + } + return ( {/* banner图+选项 */} @@ -110,12 +116,13 @@ const Qz2022 = (props) => {
  • 通知公告
  • - {current_user && current_user.login ?
  • - 参赛报名 -
  • : props.showLoginDialog} - {current_user && current_user.login ?
  • - 提案提交 -
  • : props.showLoginDialog} + {/* 处于报名阶段正常跳转到报名页面,不处于右侧弹消息 */} +
  • + {current_user && current_user.login ? !applyStatus && props.showNotification("当前不处于报名时间") : props.showLoginDialog()}}>参赛报名 +
  • +
  • + {current_user && current_user.login ? !referStatus && props.showNotification("未到作品提交时间,请耐心等待") : props.showLoginDialog()}}>提案提交 +
  • 数据统计