From 0ac20c71096f6b54c49efbfdfb25006c2e43845b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Tue, 6 Jun 2023 09:44:58 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=AF=BC=E5=B8=88?=
=?UTF-8?q?=E6=8A=A5=E5=90=8D=E9=80=9A=E9=81=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/glcc/index.jsx | 36 ++++++++++++++++++++++++------------
src/glcc/project/index.jsx | 5 +----
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index cf616cf48..894f9e9df 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -86,6 +86,8 @@ const Glcc = (propsF) => {
const [glccSettings, setGLccSetting] = useState(undefined);
// 是否展示项目、课题列表入口
const [repoPublic, setRepoPublic] = useState(false);
+ // 是否处于项目/课题补录阶段
+ const [applyRepo, setApplyRepo] = useState(false);
useEffect(()=>{
if(id && id === "2022"){
@@ -101,8 +103,11 @@ const Glcc = (propsF) => {
// 判断是否展示项目、课题
const publicRepoTask = res.data.filter(item=>item.name === "repoPublic");
publicRepoTask[0] && setRepoPublic(judge(nowTime, publicRepoTask[0].value, "range"))
- // 过滤掉 项目课题公示时间
- const filterRepoPublic = res.data.filter(item=>item.name !== "repoPublic");
+ // 是否处于项目/课题补录阶段
+ const repoApply1 = res.data.filter(item=>item.name === "repoApply1");
+ repoApply1[0] && setApplyRepo(judge(nowTime, repoApply1[0].value, "range"))
+ // 过滤掉 项目课题公示时间、项目/课题补录
+ const filterRepoPublic = res.data.filter(item=>["repoPublic", "repoApply1"].indexOf(item.name) === -1);
const periodIndex = filterRepoPublic.findIndex(item=>judge(nowTime, item.value, "range"));
periodIndex !== -1 && setPeriod(filterRepoPublic[periodIndex].name);
}
@@ -188,12 +193,12 @@ const Glcc = (propsF) => {
{/* 学生报名 */}
- (
)}
- >
+ >}
{/* 开源夏令营报名页面 */}
{period === "repoApply" && {
)}
>}
+ {/* 导师报名课题路由通道 */}
+ {applyRepo && (
+
+ )}
+ >}
{/* 教师审核 */}
{
)}
>
- (
)}
- >
+ >}
{/* 项目/课题列表 */}
- (
-
+
)}
- >
+ >}
{/* 课题列表 */}
- (
-
+
)}
- >
+ >}
{/* openmmlab列表 */}
{
window.scrollTo(0, 0);
},[])
From 5672b3a73e21c1d77b36ad89ffb85745c162fcff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Tue, 6 Jun 2023 11:36:02 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96glcc=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E7=8B=AC=E7=AB=8B=E8=B7=AF=E7=94=B1=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/glcc/project/index.jsx | 2 +-
src/glcc/project/projectList/index.jsx | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx
index 32bbe7315..ecd9399e2 100644
--- a/src/glcc/project/index.jsx
+++ b/src/glcc/project/index.jsx
@@ -30,7 +30,7 @@ function Project(propsF) {

-
学生报名时间: {id === '2023' ? '2023年6月4日-6月21日' : '2022年5月26日-6月24日'}
+
学生报名时间: {id === '2022' ? '2022年5月26日-6月24日' : '2023年6月4日-6月21日'}
课题列表
diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx
index ab303c2d4..4ae2a9e9d 100644
--- a/src/glcc/project/projectList/index.jsx
+++ b/src/glcc/project/projectList/index.jsx
@@ -31,8 +31,10 @@ function ProjectList({ applyTaskId, location, match, applyTask, round, period, m
if (response && response.message === "success") {
let dataArr = response.data.rows;
dataArr.forEach(i => {
- let urlArr = i.gitlinkUrl.split('/');
- i.gitlinkLastUrl = urlArr.pop() || urlArr.pop();
+ // 兼容url最后带/的情况
+ let urlArr = i.gitlinkUrl.endsWith('/') ? i.gitlinkUrl.substring(0, i.gitlinkUrl.length-1).split('/') : i.gitlinkUrl.split('/');
+ // 直接使用last url会导致命中css
+ i.gitlinkLastUrl = `${urlArr.pop()}glcc`;
i.gitlinkLastUrl = i.gitlinkLastUrl.replace(/\./g, '');
});
if (gitlinkLastUrl) {
@@ -90,7 +92,7 @@ function ProjectList({ applyTaskId, location, match, applyTask, round, period, m
overlayClassName='projectItemPopover'
autoAdjustOverflow={false}
>
-
+
{!gitlinkLastUrl && !openmmlab && item.recommendFlag ?

: ''}
From f5b0b07f33dfa93d45f5c9b9d19e536b3c4863db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Tue, 6 Jun 2023 11:48:45 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=8A=A5=E5=90=8D?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=A0=E9=99=A42022=E5=B9=B4=E7=9A=84?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/glcc/student/index.jsx | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx
index caf128557..f81c94cdc 100644
--- a/src/glcc/student/index.jsx
+++ b/src/glcc/student/index.jsx
@@ -53,19 +53,9 @@ function Apply(props) {
useEffect(() => {
// 进入此页面到填写页面
- // 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()) {
- // 不在开源夏令营报名时间之内
- window.location.href = "/glcc/subjects";
- } else if (current_user && current_user.login) {
-
- } else {
+ // 未登录
+ if (current_user && !current_user.login){
window.location.href = `/login?go_page=/glcc/student/apply/${taskId}`;
}
}, [])