开源夏令营报名跳转到另一个链接

This commit is contained in:
谢思 2022-05-10 17:42:00 +08:00
parent 76a2231fe7
commit 147e538e6f
4 changed files with 33 additions and 3 deletions

View File

@ -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>

View File

@ -33,6 +33,7 @@
border: 1px solid #466aff;
color: #fff;
padding-left: 18px;
cursor: pointer;
}
.apply-text {
font-family: Alibaba PuHuiTi;

View File

@ -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>

View File

@ -25,6 +25,7 @@
&:hover{
opacity: .8;
color: white !important;
cursor: pointer;
}
}
}