forked from Gitlink/forgeplus-react
merge gitlink_server
This commit is contained in:
commit
4b4197e459
|
@ -12,16 +12,30 @@ import './index.scss';
|
|||
|
||||
export default (props) => {
|
||||
const {current_user, isGlccApplyDate, showNotification} = props;
|
||||
function goToApply(){
|
||||
if(isGlccApplyDate){
|
||||
if(current_user && current_user.login){
|
||||
window.location.href="https://wj.qq.com/s2/10175205/e8df/";
|
||||
}else{
|
||||
window.location.href="/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
|
||||
}
|
||||
}else{
|
||||
showNotification("不在报名时间,报名时间为4月15日~5月20日");
|
||||
window.location.href="/glcc";
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="glcc">
|
||||
{/* <Banner /> */}
|
||||
<img className="glcc-banner" src={banner} alt=""></img>
|
||||
{/* <div > */}
|
||||
<Link className="apply-btn" to={isGlccApplyDate ? current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>
|
||||
{/* <Link className="apply-btn" to={isGlccApplyDate ? current_user && current_user.login ? 'https://wj.qq.com/s2/10175205/e8df/' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}> */}
|
||||
<div className="apply-btn" onClick={goToApply}>
|
||||
<div className="apply-text">立即报名</div>
|
||||
<div className="apply-icon"><i className="font-14 iconfont icon-xiangyoujiantou "></i></div>
|
||||
</Link>
|
||||
</div>
|
||||
{/* </Link> */}
|
||||
{/* </div> */}
|
||||
<div className="introduce glcc-content">
|
||||
<div className="glcc-tit">活动简介</div>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
border: 1px solid #466aff;
|
||||
color: #fff;
|
||||
padding-left: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.apply-text {
|
||||
font-family: Alibaba PuHuiTi;
|
||||
|
|
|
@ -14,6 +14,19 @@ import { Link } from 'react-router-dom';
|
|||
function Lightspot(props) {
|
||||
const {current_user, isGlccApplyDate, showNotification} = props;
|
||||
|
||||
function goToApply(){
|
||||
if(isGlccApplyDate){
|
||||
if(current_user && current_user.login){
|
||||
window.location.href="https://wj.qq.com/s2/10175205/e8df/";
|
||||
}else{
|
||||
window.location.href="/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
|
||||
}
|
||||
}else{
|
||||
showNotification("不在报名时间,报名时间为4月15日~5月20日");
|
||||
window.location.href="/glcc";
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="lightspot">
|
||||
<div className="glcc-content">
|
||||
|
@ -23,7 +36,8 @@ function Lightspot(props) {
|
|||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗?</h3>
|
||||
<div className="teacher-content">想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣</div>
|
||||
<Link className='applyBut' to={isGlccApplyDate ? current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名</Link>
|
||||
{/* <Link className='applyBut' to={isGlccApplyDate ? current_user && current_user.login ? 'https://wj.qq.com/s2/10175205/e8df/' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名</Link> */}
|
||||
<div className='applyBut' onClick={goToApply}>立即报名</div>
|
||||
</div>
|
||||
<img className="teacher-img" src={teacherImg} alt=''></img>
|
||||
</div>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
&:hover{
|
||||
opacity: .8;
|
||||
color: white !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue