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] =?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 ? : ''}