diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx
index f6e918231..07ddfb38a 100644
--- a/src/glcc/apply/index.jsx
+++ b/src/glcc/apply/index.jsx
@@ -12,7 +12,8 @@ import './index.scss';
import { FlexAJ } from '../../forge/Component/layout';
const Option = Select.Option;
function Apply(props) {
- const phonereg = /^([1][3456789])\d{9}$/
+ const phonereg = /(^|\s*\+?0?0?86|\D)(1\d{2})[-\s]{0,3}(\d{4})[-\s]{0,3}(\d{4})(?=\D|$)/
+ const emailreg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
const {form, current_user, showNotification, round} = props;
const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
const [reload, setReload] = useState(undefined);
@@ -51,14 +52,18 @@ function Apply(props) {
useEffect(()=>{
// 获取当前用户报名信息
- current_user && getUserApplyInfo({userId: current_user.user_id, round}).then(response=>{
+ current_user && round && getUserApplyInfo({userId: current_user.user_id, round}).then(response=>{
if(response && response.message === "success"){
- const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, projectLogoId} = response.data;
+ setUserApplyInfo(response.data);
+ if(!response.data){
+ return
+ }
+ const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, projectLogoId, contactMail} = response.data;
const taskInfo = {};
const taskCountArr = []
registrationTaskList.map((item, index)=>{
taskCountArr.push(index+1);
- const{taskName, taskUrl, taskDifficulty, taskReward, tutorName, tutorMail, taskDesc} = item;
+ const{taskName, taskUrl, taskDifficulty, taskReward, tutorName, tutorMail, taskDesc, tutorPhone} = item;
taskInfo[`taskName${index+1}`] = taskName;
taskInfo[`taskUrl${index+1}`] = taskUrl;
taskInfo[`taskDifficulty${index+1}`] = taskDifficulty;
@@ -66,17 +71,17 @@ function Apply(props) {
taskInfo[`tutorName${index+1}`] = tutorName;
taskInfo[`tutorMail${index+1}`] = tutorMail;
taskInfo[`taskDesc${index+1}`] = taskDesc;
+ taskInfo[`tutorPhone${index+1}`] = tutorPhone;
})
setTaskCount(taskCountArr);
setFieldsValue({
- projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro,
+ projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail,
...taskInfo,
logo: {file:{response:{id: projectLogoId}}}
})
- setUserApplyInfo(response.data);
}
})
- }, [reload])
+ }, [])
// 当用户输入结束时 检验用户输入是否符合规范
function verify(dataIndex){
@@ -102,12 +107,13 @@ function Apply(props) {
tutorName: values[`tutorName${item}`],
tutorMail: values[`tutorMail${item}`],
taskDesc: values[`taskDesc${item}`],
+ tutorPhone: values[`tutorPhone${item}`],
round
})
})
- const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro} = values;
+ const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail} = values;
const params ={
- projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, round,
+ projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, round, contactMail,
projectLogoId: values.logo.file.response.id+"",
userId: current_user.user_id,
userName: current_user.username
@@ -235,6 +241,13 @@ function Apply(props) {
{ pattern: phonereg, message: "请输入正确的手机号码"},],
{verify("name")}}/>
)}
+ {helper('联系人邮箱',
+ '',
+ 'contactMail',
+ [{ required: true, message: "输入项目联系人邮箱" },
+ { pattern: emailreg, message: "请输入正确的邮箱地址"},],
+ {verify("name")}}/>
+ )}
{helper('社区简介',
'',
'projectIntro',
@@ -265,9 +278,9 @@ function Apply(props) {
return
课题信息({index+1}/5)
- {index && }
+ {index>0 && }
-
+
})}
{taskCount && taskCount.length<5 &&
diff --git a/src/glcc/apply/taskApply.jsx b/src/glcc/apply/taskApply.jsx
index 83b2a8ce7..9cfe80a13 100644
--- a/src/glcc/apply/taskApply.jsx
+++ b/src/glcc/apply/taskApply.jsx
@@ -3,8 +3,7 @@ import { Breadcrumb, Button, Form, Input, Select, Upload, Modal, InputNumber } f
import TextArea from 'antd/lib/input/TextArea';
const Option = Select.Option;
function TaskApply(props) {
- const emailreg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
- const {helper, disabled, taskKey} = props;
+ const {helper, disabled, taskKey, phonereg, emailreg} = props;
// 低、中、高
const difficultyList = [
{id: 1, name: "低"},
@@ -58,7 +57,14 @@ function TaskApply(props) {
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
)}
- {helper('导师邮箱地址',
+ {helper('导师手机号',
+ '',
+ `tutorPhone${taskKey}`,
+ [{ required: true, message: "请输入导师手机号" },
+ { pattern: phonereg, message: "请输入正确的电话号码"},],
+
+ )}
+ {helper('导师邮箱',
'',
`tutorMail${taskKey}`,
[{ required: true, message: "请输入导师邮箱地址" },
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx
index 39bf210be..67a708e1d 100644
--- a/src/glcc/home/index.jsx
+++ b/src/glcc/home/index.jsx
@@ -21,7 +21,7 @@ import './index.scss';
// round:2022届(1) 2023届(2)
// period: 项目报名阶段(0)
export default (props) => {
- const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate, checkedTaskId, checkTime1, checkTime2, checkTime3, round, match:{params:{id}}, period} = props;
+ const { current_user, isGlccApplyDate, showNotification, studentApplyStart, history, secondStudentApplyDate, isStudentApplyDate, checkedTaskId, checkTime1, checkTime2, checkTime3, round, match:{params:{id}}, period, showLoginDialog} = props;
function goToApply() {
if (isGlccApplyDate) {
if (current_user && current_user.login) {
@@ -69,6 +69,15 @@ export default (props) => {
history.push("/glcc/result");
}
+ // 页面跳转,判断是否登录
+ function gotoCheckLogin(url){
+ if(current_user && current_user.login){
+ history.push(url);
+ return
+ }
+ showLoginDialog();
+ }
+
return (
{/*
*/}
@@ -99,14 +108,14 @@ export default (props) => {
{/* 当前glcc */}
{round === 2 &&
{/* 项目报名入口 */}
- {period === 0 &&
+ {period === 0 &&
{gotoCheckLogin(`/glcc/apply`)}} className="apply project" >
项目报名
{/*
项目报名已截止 */}
项目报名开启,导师席位虚位以待
- }
+ }
{/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
{/* {resultTime2 &&
@@ -176,7 +185,7 @@ export default (props) => {
{/* 活动特邀合作单位 */}
- {/*
+ {round === 1 &&
活动特邀合作单位 OpenMMLab
@@ -185,14 +194,14 @@ export default (props) => {
OpenMMLab是深度学习时代最完整的计算机视觉开源算法体系。自开源以来,累计发布了超过20个算法库,有超过300个算法2300多个预训练模型。所有算法均具备风格统一、模型丰富、质量高、易复现等特点。在社区生态上,OpenMMLab一直秉持开放、认真、持续成长的原则,积极推动社区建设发展
-
*/}
+
}
-
-
+
+
-
+
)
diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx
index 48762e67f..42f279ae4 100644
--- a/src/glcc/home/lightspot/index.jsx
+++ b/src/glcc/home/lightspot/index.jsx
@@ -1,22 +1,17 @@
-import { Button } from 'antd';
import React from 'react';
-import teacherImg from '../../img/teacher-img.png';
import lightspot1 from '../../img/lightspot1.png';
import lightspot2 from '../../img/lightspot2.png';
import lightspot3 from '../../img/lightspot3.png';
import lightspot4 from '../../img/lightspot4.png';
-
-
import './index.scss';
-import { Link } from 'react-router-dom';
function Lightspot(props) {
- const {current_user, isGlccApplyDate, showNotification, goToStudent, period, history} = props;
+ const {current_user, period, history, round, showLoginDialog} = props;
function goToApply(){
if(current_user && !current_user.login){
- history.push(`/login?go_page=/glcc/apply`);
+ showLoginDialog();
return;
}
history.push(period === 0 ? `/glcc/apply` : `/glcc/subjects`);
@@ -31,14 +26,13 @@ function Lightspot(props) {
有兴趣成为GLCC的导师吗?
想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣
- {period === 0 ?
立即报名
:
项目报名项目报名已截止
}
+ {period === 0 && round === 2 ?
立即报名
:
项目报名已结束
}
你是开源新手,有兴趣参加GLCC吗?
想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。
- {period === 2 ?
学生报名
:
学生报名{period<2 ? "敬请期待" : "已结束"}
}
+ {period === 2 && round === 2 ?
学生报名
:
学生报名{period<2 && round === 2 ? "敬请期待" : "已结束"}
}
- {/*

*/}
diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx
index ae045815e..03c42fbfc 100644
--- a/src/glcc/home/partner/index.jsx
+++ b/src/glcc/home/partner/index.jsx
@@ -38,13 +38,13 @@ import log69 from '../../img/69@2x.png';
import log70 from '../../img/浙江大学.png';
import logo1 from '../../img/logo1.png';
import logo2 from '../../img/logo2.png';
-function Partner() {
+function Partner({round}) {
return (
组织方及合作伙伴
-
+ {round === 2 &&
主办方
{ window.open("https://www.ccf.org.cn/") }} className='div8b9'>

@@ -60,39 +60,64 @@ function Partner() {
{ window.open("http://111.8.36.180:81/#/about") }} className='div8b9'>

-
+
}
-
+ {round === 2 &&
钻石赞助商
{ window.open("https://www.bytedance.com/") }}>

-
-{/*
-
+
}
+
+ {round === 1 &&
+
+ 主办方
+
{ window.open("https://www.ccf.org.cn/") }} className='div8b9'>

+
+
+ 承办方
+
{ window.open("https://www.ccf.org.cn/kyfzwyh/") }} className='div8b9'>

+
+
+ 协办方
+
+
{ window.open("https://www.gitlink.org.cn/") }} className='div8b9 mr35'>

+
{ window.open("http://111.8.36.180:81/#/about") }} className='div8b9'>

+
+
+
}
+
+ {round === 1 &&
+ 特邀合作单位
+
+
{ window.open("https://github.com/open-mmlab") }}>

+
+
}
+
+ {round === 1 &&
白金赞助商
{ window.open("http://www.baidu.com/") }}>

{ window.open("https://www.antgroup.com/") }}>

{ window.open("https://www.alibaba.com/") }}>

-
+
}
-
+ {round === 1 &&
黄金赞助商
{ window.open("https://aws.amazon.com/cn/") }}>

{ window.open("https://www.didiglobal.com/") }}>

{ window.open("https://www.99cloud.net/") }}>

-
+
}
-
+ {round === 1 &&
白银赞助商
{ window.open(" https://www.cloudwego.io/") }}>

-
*/}
+
}
diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx
index 130249eeb..902ae44d1 100644
--- a/src/glcc/home/timerShaft/index.jsx
+++ b/src/glcc/home/timerShaft/index.jsx
@@ -2,6 +2,54 @@ import React from 'react';
import Step from './step';
import './index.scss';
+const stepArr2022 = [{
+ title: "Step1",
+ date: "4.15",
+ content: "GLCC夏令营活动发布"
+},
+{
+ title: "Step2",
+ date: "4.15-5.19",
+ content: "社区项目报名,提交课题"
+},
+{
+ title: "Step2",
+ date: "5.20-5.25",
+ content: "公示社区项目名单"
+},
+{
+ title: "Step2",
+ date: "5.26-6.24",
+ content: "学生报名,提交Proposal"
+},
+{
+ title: "Step2",
+ date: "7.1",
+ content: "公示入选学生名单",
+ noArrow: true,
+},
+{
+ title: "Step2",
+ date: "7.1-8.12",
+ content: "项目开发第一阶段",
+},
+{
+ title: "Step2",
+ date: "8.12-9.30",
+ content: "项目开发第二阶段",
+},
+{
+ title: "Step2",
+ date: "10.1-10.21",
+ content: "结项审核,并公示考核结果",
+},
+{
+ title: "Step2",
+ date: "10.21-11.11",
+ content: "评选公布优秀项目和学员",
+ noArrow: true,
+}
+]
const stepArr = [{
title: "Step1",
date: "4.29",
@@ -14,12 +62,12 @@ const stepArr = [{
},
{
title: "Step2",
- date: "5.30-6.5",
+ date: "5.30-6.3",
content: "公示项目、课题名单"
},
{
title: "Step2",
- date: "6.5-6.23",
+ date: "6.4-6.21",
content: "学生报名,提交Proposal"
},
{
@@ -30,22 +78,22 @@ const stepArr = [{
},
{
title: "Step2",
- date: "7.1-8.15",
+ date: "7.1-8.11",
content: "项目开发第一阶段",
},
{
title: "Step2",
- date: "8.16-8.25",
+ date: "8.20",
content: "中期考核,公示考核结果",
},
{
title: "Step2",
- date: "8.26-10.08",
+ date: "8.21-9.28",
content: "项目开发第二阶段",
},
{
title: "Step2",
- date: "10.09-10.16",
+ date: "10.11",
content: "结项审核,公示考核结果",
},
{
@@ -56,7 +104,8 @@ const stepArr = [{
}
]
-function TimerShaft() {
+function TimerShaft({round}) {
+ const step = round === 2 ? stepArr : stepArr2022
return (
@@ -64,7 +113,7 @@ function TimerShaft() {
时间规划
{
- stepArr.map((item, i) => {
+ step.map((item, i) => {
return
})
}
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index ecdc96d9e..1c50bac14 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -133,8 +133,8 @@ const Glcc = (propsF) => {
}, [])
useEffect(()=>{
- // 获取用户课题报名信息
- current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id}).then(response=>{
+ // 获取用户课题报名信息(todo:学生报名阶段请求)
+ false && current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id}).then(response=>{
if(response && response.message === "success"){
// setData(response.data.rows);
const data = {};
@@ -223,12 +223,12 @@ const Glcc = (propsF) => {
>
{/* openmmlab列表 */}
- {/* (
)}
- > */}
+ >
{/* 审核结果页面 */}
{
(
-
+
)}
>
diff --git a/src/glcc/interimReview/result.jsx b/src/glcc/interimReview/result.jsx
index 0f79b9d53..fc225c96b 100644
--- a/src/glcc/interimReview/result.jsx
+++ b/src/glcc/interimReview/result.jsx
@@ -11,7 +11,7 @@ import '../project/index.scss';
const { Search } = Input;
// 课题列表
-function CheckResult({current_user, history, checkTime3, round}) {
+function CheckResult({current_user, history, checkTime3, round, id}) {
// 输入搜索框
const [keyword, setKeyword] = useState(undefined);
const [data, setData] = useState([]);
@@ -107,7 +107,7 @@ function CheckResult({current_user, history, checkTime3, round}) {
-
+
{ setCurrent(1); setKeyword(value) }} />
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx
index 1960172dc..13988dfe0 100644
--- a/src/glcc/project/index.jsx
+++ b/src/glcc/project/index.jsx
@@ -34,7 +34,7 @@ function Project(propsF) {
项目列表
diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx
index 1dac4ff55..941d895dd 100644
--- a/src/glcc/project/taskDetail/index.jsx
+++ b/src/glcc/project/taskDetail/index.jsx
@@ -7,7 +7,7 @@ import './index.scss';
// 课题列表
function TaskDetail(props) {
- const {match, location, isStudentApplyDate, secondStudentApplyDate, applyTaskId, applyTask} = props
+ const {match, location, isStudentApplyDate, secondStudentApplyDate, applyTaskId, applyTask, match:{params:{id}}} = props
const taskId = Number(match.params.taskId);
const [detail, setDetail] = useState(undefined);
@@ -26,8 +26,8 @@ function TaskDetail(props) {
{detail &&