From d6dda2a980657d95e03f9da90785df006d32a7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Tue, 29 Mar 2022 16:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=E5=92=8C?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/qz2022.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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()}}>提案提交 +
  • 数据统计