From 94488ab40733b9d9d555b14231ac4cb57a731874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <1261960504@qq.com> Date: Sat, 18 Dec 2021 08:57:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=9F=E5=90=8D?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E8=B0=83=E6=95=B4=E6=8C=89=E9=92=AE=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/home/SecondSection/index.jsx | 4 ++-- src/home/SeventhSection/index.jsx | 4 ++-- src/home/SixthSection/index.jsx | 4 ++-- src/home/index.jsx | 18 +++++++++++++++--- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/home/SecondSection/index.jsx b/src/home/SecondSection/index.jsx index 01576084..b6291980 100644 --- a/src/home/SecondSection/index.jsx +++ b/src/home/SecondSection/index.jsx @@ -25,7 +25,7 @@ let setting = { } -function SecondSection({ second ,main_web_site_url}) { +function SecondSection({ second ,main_web_site_url ,btnUrl}) { const [leftItem, setLeftItem] = useState({}); const [list, setList] = useState([]); @@ -77,7 +77,7 @@ function SecondSection({ second ,main_web_site_url}) {
- +
diff --git a/src/home/SeventhSection/index.jsx b/src/home/SeventhSection/index.jsx index f7dc3d49..97a8f560 100644 --- a/src/home/SeventhSection/index.jsx +++ b/src/home/SeventhSection/index.jsx @@ -27,7 +27,7 @@ let setting = { } -function SeventhSection({ main_web_site_url }) { +function SeventhSection({ main_web_site_url,btnUrl }) { const [list, setList] = useState([]); @@ -79,7 +79,7 @@ function SeventhSection({ main_web_site_url }) { - + diff --git a/src/home/SixthSection/index.jsx b/src/home/SixthSection/index.jsx index 838fa01e..59a3800c 100644 --- a/src/home/SixthSection/index.jsx +++ b/src/home/SixthSection/index.jsx @@ -17,7 +17,7 @@ import './index.scss'; let iconArr = [completeIcon1, completeIcon2, completeIcon3]; -function SixthSection({ sixth, main_web_site_url }) { +function SixthSection({ sixth, main_web_site_url,btnUrl }) { const [list, setList] = useState(); @@ -78,7 +78,7 @@ function SixthSection({ sixth, main_web_site_url }) { - + diff --git a/src/home/index.jsx b/src/home/index.jsx index 96b5c425..46b5db6e 100644 --- a/src/home/index.jsx +++ b/src/home/index.jsx @@ -33,6 +33,18 @@ function HomePage({ history }) { let settings = JSON.parse(localStorage.chromesetting); let main_web_site_url = settings.main_web_site_url; + let forumUrl =""; + let competitionUrl =""; + if(settings.navbar){ + for (const item of settings.navbar){ + if(item.name.indexOf("论坛")>-1){ + forumUrl=item.link; + } + if(item.name.indexOf("竞赛")>-1){ + competitionUrl=item.link; + } + } + } function scrollListener() { @@ -120,7 +132,7 @@ function HomePage({ history }) {
- +
@@ -137,11 +149,11 @@ function HomePage({ history }) {
- +
- +