From e7a23064a85f0dd5189cb26950d7388af0d751a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 13 Apr 2022 09:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=BC=80=E6=BA=90=E5=A4=8F?= =?UTF-8?q?=E4=BB=A4=E8=90=A5=E6=8A=A5=E5=90=8D=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/apply/index.jsx | 9 ++++++--- src/glcc/home/index.jsx | 6 +++--- src/glcc/home/lightspot/index.jsx | 5 +++-- src/glcc/home/lightspot/index.scss | 15 ++++++++++++++- src/glcc/index.jsx | 6 ++++-- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx index 218be8d7..8c9a024f 100644 --- a/src/glcc/apply/index.jsx +++ b/src/glcc/apply/index.jsx @@ -8,7 +8,7 @@ import banner from "../img/banner.png"; import './index.scss'; const Option = Select.Option; function Apply(props) { - const {form, current_user, showNotification} = props; + const {form, current_user, showNotification, isGlccApplyDate} = props; // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 1061) // current_user && (current_user.userName = "美女") @@ -29,7 +29,10 @@ function Apply(props) { ); useEffect(()=>{ - if(current_user && current_user.login){ + if(!isGlccApplyDate){ + // 不在开源夏令营报名时间之内 + window.location.href="/glcc"; + }else if(current_user && current_user.login){ // 获取项目分类参数 const url = `/project_categories/pinned_index.json`; axios.get(url).then(result=>{ @@ -38,7 +41,7 @@ function Apply(props) { } }).catch(error=>{}) }else{ - window.location.href="/login?go_page=/glcc/apply" + window.location.href="/login?go_page=/glcc/apply"; } }, []) diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index c95b53fa..c446391b 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -11,14 +11,14 @@ import banner from "../img/banner.png"; import './index.scss'; export default (props) => { - const {current_user} = props; + const {current_user, isGlccApplyDate, showNotification} = props; return (
{/* */} {/*
*/} - + {!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月8日")}}>
立即报名
@@ -27,7 +27,7 @@ export default (props) => {
活动简介
GitLink编程夏令营(GLCC),是在CCF中国计算机学会指导下,由CCF开源发展委员会(CCF ODC)举办的面向全国高校学生的暑期编程活动。活动将覆盖近千所高校,并联合各大开源基金会、开源企业、开源社区、开源专家,旨在鼓励青年学生通过参加真实的开源软件开发,提升自身技术能力,为开源社区输送优秀人才。为青年学生提供开放友好的交流平台,希望进一步推动国内开源社区的繁荣发展。
- + diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx index 7755c4a5..de56f190 100644 --- a/src/glcc/home/lightspot/index.jsx +++ b/src/glcc/home/lightspot/index.jsx @@ -8,10 +8,11 @@ import lightspot4 from '../../img/lightspot4.png'; import './index.scss'; +import { Link } from 'react-router-dom'; function Lightspot(props) { - const {current_user} = props; + const {current_user, isGlccApplyDate, showNotification} = props; return (
@@ -22,7 +23,7 @@ function Lightspot(props) {

有兴趣成为GLCC的导师吗?

想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣
- + {!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月8日")}}>立即报名
diff --git a/src/glcc/home/lightspot/index.scss b/src/glcc/home/lightspot/index.scss index b6856549..485a7a2b 100644 --- a/src/glcc/home/lightspot/index.scss +++ b/src/glcc/home/lightspot/index.scss @@ -13,7 +13,20 @@ } .teacher-text { margin-right: 2.84%; - .applyBut, .applyBut:hover{color: white !important;} + .applyBut{ + width: 120px; + height: 36px; + background-color: #466aff; + border-radius: 2px; + color: white; + display: block; + line-height: 36px; + text-align: center; + &:hover{ + opacity: .8; + color: white !important; + } + } } .teacher-invite { color: #202d40; diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index 8b0953d1..28f323d7 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -31,6 +31,8 @@ const Help = Loadable({ const Glcc = (propsF) => { + // 判断时间是否在开源夏令营报名时间内(4月15日~5月8日) + const isGlccApplyDate = Date.parse(new Date()) < 1652889600000; return (
@@ -39,7 +41,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 帮助中心 */} @@ -53,7 +55,7 @@ const Glcc = (propsF) => { ( - + )} >