From 7e186bf76542e9ff58aa666c4e5dbed52382341b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 25 May 2022 15:53:43 +0800 Subject: [PATCH] issue --- src/glcc/project/component/projectDetail.jsx | 10 +++++----- src/glcc/project/index.jsx | 4 ++++ src/glcc/project/taskDetail/index.jsx | 2 +- src/glcc/project/taskList/index.jsx | 19 +++---------------- src/glcc/student/index.jsx | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 32 deletions(-) diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index 43ee10346..96313e47a 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -39,7 +39,7 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{info.projectName} {info.projectType && {info.projectType}} -

GitLink项目地址:  {info.gitlinkUrl}

+

GitLink项目地址:  {info.gitlinkUrl}

项目简介:  {info.projectIntro}
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{ @@ -47,14 +47,14 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{window.location.href=`/glcc/student/detail/${item.id}`}}>{item.taskName}
导师姓名:   {item.tutorName}
-
邮箱地址:   {item.tutorMail}
+
邮箱地址:   {item.tutorMail}
-
      {item.taskDesc}
- {item.taskUrl &&
课题链接:   {item.taskUrl}
} +
{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 cf78af126..3b5014f75 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -6,6 +6,7 @@ import './index.scss'; import Loadable from "react-loadable"; import Loading from "../../Loading"; import { Link } from 'react-router-dom'; +import { useEffect } from 'react'; // 项目列表页面 const ProjectList = Loadable({ @@ -21,6 +22,9 @@ const TaskList = Loadable({ function Project(propsF) { const {location, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId, setStudentInfoReset} = propsF; const {pathname} = location; + useEffect(()=>{ + window.scrollTo(0, 0); + },[]) return(
diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx index 25cf6911f..5f3063457 100644 --- a/src/glcc/project/taskDetail/index.jsx +++ b/src/glcc/project/taskDetail/index.jsx @@ -38,7 +38,7 @@ function TaskDetail(props) { return (
- + {/* */} {detail &&
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index fef20a795..bdbab33dc 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -103,12 +103,14 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial // 改变pagesize function onShowSizeChange(current, pageSize){ + window.scrollTo(0, 0); setCurrent(1); setPageSize(pageSize); } // 切换页数 function changePage(page, pageSize){ + window.scrollTo(0, 0); setCurrent(page); } @@ -143,26 +145,11 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial }) }, [keyword, current, pageSize, applyTaskId, apply]) - useEffect(()=>{ - // if(apply){ - // // 判断用户是否已经登录 - // if(current_user && current_user.login){ - // apply && studentApplyList().then(response => { - // if (response && response.message === "success") { - // console.log(response); - // } - // }) - // }else{ - // showLoginDialog(); - // } - // } - },[apply]) - return (
- {setCurrent(1);setApply(e.target.checked)}}>已报名 + {current_user && current_user.login ? {setCurrent(1);setApply(e.target.checked)}}>已报名 :
} { setCurrent(1); setKeyword(value) }} />
diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx index 42c51b7b6..59d79625f 100644 --- a/src/glcc/student/index.jsx +++ b/src/glcc/student/index.jsx @@ -49,12 +49,12 @@ function Apply(props) { useEffect(() => { // 进入此页面到填写页面 - setTimeout(()=>{ - let clientWidth = document.body.clientWidth; - let scrollHeight = 500 * clientWidth / 1920; - window.scrollTo(0, scrollHeight); - },200); - // window.scrollTo(0, 50); + // setTimeout(()=>{ + // let clientWidth = document.body.clientWidth; + // let scrollHeight = 500 * clientWidth / 1920; + // window.scrollTo(0, scrollHeight); + // },200); + window.scrollTo(0, 50); if (new Date().getTime() < new Date('2022-05-26').getTime()) { // 不在开源夏令营报名时间之内 @@ -346,7 +346,7 @@ function Apply(props) { return (
- + {/* */}
@@ -361,10 +361,10 @@ function Apply(props) {
2、本次GLCC夏令营基于GitLink代码托管平台完成编程任务,若您没有平台账户,请先注册后完成课题申请
3、每位学员最多可申请2个课题,至多有且仅有1个课题可以入选
4、建议在提交课题申请,与课题导师邮件沟通,详细了解课题描述、编码任务、技能要求&编程语言、预期产出结果等信息,以便您能够选择最适合的课题
-
5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营微信群进行咨询
+
5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营QQ群进行咨询
- 学生报名 + 学生报名
申请课题
@@ -438,7 +438,7 @@ function Apply(props) { onChange={handleChange} > {imageUrl ? avatar : userApplyInfo && userApplyInfo.proveAttachmentId ? -
:
+
:
请上传学生证明
}