diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx index 72d8fa44..e3869cd6 100644 --- a/src/glcc/apply/index.jsx +++ b/src/glcc/apply/index.jsx @@ -7,7 +7,7 @@ import { httpUrl } from '../fetch'; 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 = "美女") @@ -28,7 +28,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=>{ @@ -37,7 +40,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 3af8a7e5..485a7a2b 100644 --- a/src/glcc/home/lightspot/index.scss +++ b/src/glcc/home/lightspot/index.scss @@ -13,6 +13,20 @@ } .teacher-text { margin-right: 2.84%; + .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) => { ( - + )} >