diff --git a/src/glcc/home/award/index.jsx b/src/glcc/home/award/index.jsx index 4e8c1e47..70626de6 100644 --- a/src/glcc/home/award/index.jsx +++ b/src/glcc/home/award/index.jsx @@ -10,7 +10,7 @@ function Award() {
丰厚现金奖励
-
根据课题开发耗时,对应奖金从6000元至12000元不等。详细可以课题详情中具体奖金标准
+
根据课题开发耗时,对应奖金从6000元至12000元不等。可在课题详情中查看具体奖金标准
diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx index a4f6b12a..aafad773 100644 --- a/src/glcc/home/timerShaft/index.jsx +++ b/src/glcc/home/timerShaft/index.jsx @@ -46,7 +46,7 @@ const stepArr = [{ { title: "Step2", date: "10.21-11.11", - content: "评选公布优秀项目和学员&学员", + content: "评选公布优秀项目和学员", noArrow: true, } ] diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index b52ebe06..70be8b80 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -56,8 +56,8 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{info.projectName} {info.projectType && {info.projectType}} -

GitLink项目地址: {info.gitlinkUrl}

-
项目简介: {info.projectIntro}
+

GitLink项目地址:  {info.gitlinkUrl}

+
项目简介:  {info.projectIntro}
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{ return
@@ -68,7 +68,7 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{item.taskDesc}
-
课题链接:   {item.taskUrl}
+
课题链接:   {item.taskUrl}
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )}
¥ {item.taskReward}
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 29024186..a5d558ec 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -49,8 +49,8 @@ function Project(propsF) {
- 课题列表 - 项目列表 + 课题列表 + 项目列表
开源夏令营 / @@ -70,6 +70,12 @@ function Project(propsF) { )} > + ( + + )} + >
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index 44a4a8ff..932bfb5b 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -88,6 +88,7 @@ color:#465474; padding-bottom: 12px; border-bottom: 1px dashed #bec5d5; + line-height: 36px; .name{ font-weight:700; color:#3753c5; @@ -99,6 +100,10 @@ border-radius:4px; margin-left: 12px; padding: 4px 6px; + line-height: 26px; + } + .linkUrl{ + color: #466aff; } } .taskItem { @@ -137,7 +142,7 @@ .taskUrl{ color:#465474; font-size:16px; - span{color:#466aff;} + a{color:#466aff;} } .applyBut{ background-color:#466aff; diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index 5f130a6e..dda00dc0 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -35,7 +35,7 @@ function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApply
{data && data.map((item, index)=>{ - return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false} isStudentApplyDate={isStudentApplyDate} studentApplyEnd={studentApplyEnd}> + return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false}>
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index 687b2341..df178029 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -128,7 +128,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial return (
-
{ setKeyword(value) }} />
+
{ setCurrent(1); setKeyword(value) }} />
tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{ background-color:#F1F6FF; diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 05353d5a..06a1c4bc 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -9,6 +9,7 @@ import banner from "../img/banner.png"; import studentSvg from "../img/student.png"; import './index.scss'; import { Link } from 'react-router-dom'; +import { color } from 'echarts/lib/theme/light'; const Option = Select.Option; const gradeList = [ @@ -21,7 +22,7 @@ const gradeList = [ { id: '研二', name: '研二' }, { id: '研三', name: '研三' }]; function Apply(props) { - const { form, current_user, showNotification, isGlccApplyDate, match } = props; + const { form, current_user, showNotification, match } = props; const taskId = Number(match.params.taskId); // 可用于开发时不同账号报名 // current_user && (current_user.user_id = 6) @@ -42,12 +43,21 @@ function Apply(props) { const [myTaskList, setMyTaskList] = useState([]); const [allTaskList, setAllTaskList] = useState([]); + // 学生报名时间范围内 + const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; + // 已过学生报名时间 + const studentApplyEnd = Date.parse(new Date()) > 1656086400000; + useEffect(() => { - // 进入此页面置顶 - window.scrollTo(0, 0); - if (!isGlccApplyDate) { + // 进入此页面到填写页面 + // setTimeout(()=>{ + let clientWidth = document.body.clientWidth; + let scrollHeight = 500 * clientWidth / 1920; + window.scrollTo(0, scrollHeight); + + if (!isStudentApplyDate) { // 不在开源夏令营报名时间之内 - window.location.href = "/glcc"; + window.location.href = "/glcc/student/2"; } else if (current_user && current_user.login) { } else { @@ -55,6 +65,7 @@ function Apply(props) { } }, []) + useEffect(() => { const params = { curPage: 1, @@ -94,13 +105,13 @@ function Apply(props) { applyInfo['memoAttachmentId' + i] = item.memoAttachmentId; if (i == 0) { - setFiles([{ + item.memoAttachment && setFiles([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId }]); } else { - setFiles1([{ + item.memoAttachment && setFiles1([{ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件', id: item.memoAttachmentId, uid: item.memoAttachmentId, @@ -205,15 +216,29 @@ function Apply(props) { ); - // 检查文件上传是否符合规定 + // 检查图片文件上传是否符合规定 function beforeUpload(file) { + const isLittle = file.size / 1024 / 1024 < 5; + if (!isLittle) { + showNotification(`文件大小必须小于${5}MB!`); + } const isType = file.type === "image/png" || file.type === "image/jpg" || file.type === "image/jpeg"; if (!isType) { showNotification("只能上传png、jpg、jpeg格式文件"); } - return isType; + return isLittle && isType; } + // 检查文件上传是否符合规定 + function beforeUpload2(file) { + const isLittle = file.size / 1024 / 1024 < 5; + if (!isLittle) { + showNotification(`文件大小必须小于${5}MB!`); + } + return isLittle; + } + + function getBase64(img, callback) { const reader = new FileReader(); reader.addEventListener('load', () => callback(reader.result)); @@ -313,6 +338,8 @@ function Apply(props) { setMyTaskList(taskListNew); } + const chooseArr = myTaskList.map(i => { return i.taskId }); + return (
@@ -321,12 +348,12 @@ function Apply(props) { 开源夏令营 课题及项目列表 - 学生报名 + 学生报名

申请说明:

-
1、学生报名时间为2022年5月21日-6月19日,请在报名截止时间(北京时间2022年6月19日18点)前提交报名信息。
+
1、学生报名时间为2022年5月26日-6月24日,请在报名截止时间(北京时间2022年6月24日24点)前提交报名信息。
2、本次GLCC夏令营基于GitLink代码托管平台完成编程任务,若您没有平台账户,请先注册后完成课题申请
3、每位学员最多可申请2个课题,至多有且仅有1个课题可以入选
4、建议在提交课题申请,与课题导师邮件沟通,详细了解课题描述、编码任务、技能要求&编程语言、预期产出结果等信息,以便您能够选择最适合的课题
@@ -335,140 +362,148 @@ function Apply(props) {
学生报名
-
申请课题
-
-

基本信息

- {helper('学生姓名', - '', - 'studentName', - [{ required: true, message: "请正确输入学生姓名" }, - { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("studentName") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> - )} - {helper('所在高校', - '', - 'school', - [{ required: true, message: "请正确输入所在高校" }, - { max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("school") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> - )} - {helper('所学专业', - '', - 'profession', - [{ max: 32, message: '超出限制长度32位字符,请重新编辑' }], - { verify("profession") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> - )} - - {getFieldDecorator("location", { - rules: [] - })( - +
+
申请课题
+ +

基本信息

+ {helper('学生姓名', + '', + 'studentName', + [{ required: true, message: "请正确输入学生姓名" }, + { max: 32, message: '超出限制长度32位字符,请重新编辑' }], + { verify("studentName") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + )} + {helper('所在高校', + '', + 'school', + [{ required: true, message: "请正确输入所在高校" }, + { max: 32, message: '超出限制长度32位字符,请重新编辑' }], + { verify("school") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + )} + {helper('所学专业', + '', + 'profession', + [{ max: 32, message: '超出限制长度32位字符,请重新编辑' }], + { verify("profession") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + )} + + {getFieldDecorator("location", { + rules: [] + })( + + )} + + {helper('所在年级', + '', + 'grade', + [], + + )} + {helper('联系电话', + '', + 'phone', + [{ required: true, message: "请正确输入联系电话" }, + { max: 14, message: '超出限制长度14位字符,请重新编辑' }, + { pattern: /[\d-]{4,14}$/, message: '请正确输入联系电话' }], + { verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> + )} + {helper('邮箱地址', + '', + 'mail', + [ + { type: 'email', message: '请输入正确的邮箱地址', }, + { required: true, message: "请输入邮箱地址" }, + { max: 50, message: '超出限制长度50位字符,请重新编辑' }, + ], + { verify("mail") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> )} - - {helper('所在年级', - '', - 'grade', - [], - - )} - {helper('联系电话', - '', - 'phone', - [{ required: true, message: "请正确输入联系电话" }], - { verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> - )} - {helper('邮箱地址', - '', - 'mail', - [{ required: true, message: "请正确输入邮箱地址" }], - { verify("mail") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} /> - )} -
{helper('学生证明', - '请以图片的形式上传学生证明,格式为png、jpg、jpeg', - 'proveAttachmentId', - [{ required: true, message: "请正确上传学生证明" }], - userApplyInfo && userApplyInfo.proveAttachmentId ?
- : - {imageUrl ? avatar :
- -
请上传学生证明
-
} -
- )}
+
{helper('学生证明', + '请以图片的形式上传学生证明,大小不超过5M,格式为png、jpg、jpeg', + 'proveAttachmentId', + [{ required: true, message: "请正确上传学生证明" }], + userApplyInfo && userApplyInfo.proveAttachmentId ?
+ : + {imageUrl ? avatar :
+ +
请上传学生证明
+
} +
+ )}
- { - myTaskList.map((item, i) => { - return ( - -

课题信息({i + 1}/2) {myTaskList.length > 1 && { deleteTask(i) }}>}

- {helper('课题名称', - '', - 'taskId' + i, - [{ required: true, message: "请选择课题名称" }], - - )} -
{helper('自荐书', - '', - 'memo' + i, - [{ required: true, message: "请正确输入自荐书" }, - { max: 500, message: '超出限制长度500位字符,请重新编辑' }], -