diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx
index f6e918231..14467fe2a 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);
@@ -53,12 +54,16 @@ function Apply(props) {
// 获取当前用户报名信息
current_user && 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,14 +71,14 @@ 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])
@@ -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..d71443730 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 &&
-
+
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/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx
index 130249eeb..a8a397de4 100644
--- a/src/glcc/home/timerShaft/index.jsx
+++ b/src/glcc/home/timerShaft/index.jsx
@@ -14,12 +14,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 +30,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: "结项审核,公示考核结果",
},
{
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index ecdc96d9e..ffed816c1 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -242,7 +242,7 @@ const Glcc = (propsF) => {
(
-
+
)}
>
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 &&