From c9841cd2fae15dc6c8e505b70a7cb18b6c8b42ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Fri, 10 Jun 2022 16:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/openmmlab/sliderRight/index.jsx | 11 ++++++----- src/glcc/project/projectList/index.jsx | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/glcc/openmmlab/sliderRight/index.jsx b/src/glcc/openmmlab/sliderRight/index.jsx index 4f9f475a..6f78cc4b 100644 --- a/src/glcc/openmmlab/sliderRight/index.jsx +++ b/src/glcc/openmmlab/sliderRight/index.jsx @@ -8,7 +8,7 @@ let setting = { slidesToShow: 3, slidesToScroll: 1, pauseOnDotsHover: true, - autoplaySpeed: 5000000, + autoplaySpeed: 5000, centerMode: true, centerPadding: "", // pauseOnFocus: true, @@ -21,10 +21,11 @@ function SliderLeft({list,history}) { function goDetail(projectName){ - history.push({ - pathname:'/glcc/projects', - state:{projectName:projectName.replace(/ /g,'-')} - }) + // history.push({ + // pathname:'/glcc/projects', + // state:{projectName:projectName.replace(/ /g,'-')} + // }) + window.open(`/glcc/projects?projectName=${projectName}`); } return ( diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx index c00b8fe8..13134d32 100644 --- a/src/glcc/project/projectList/index.jsx +++ b/src/glcc/project/projectList/index.jsx @@ -10,8 +10,7 @@ const {Search} = Input; // 项目列表 function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, location,history}) { - - let openmmlab =location.state&&location.state.projectName; + let openmmlab =location.search&&location.search.split('=')[1]; // 输入搜索框 const [keyword, setKeyword] = useState(openmmlab?'openmmlab':undefined); const [data, setData] = useState([]);