From c14ee5c3597a9eedbbc530e3717f048b8dcb5423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Thu, 16 Dec 2021 14:03:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A8=E8=8D=90=E5=88=9B?= =?UTF-8?q?=E5=AE=A2=E7=9A=84=E7=8A=B6=E6=80=81=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/home/SecondSection/index.jsx | 8 ++++---- src/home/SecondSection/index.scss | 23 +++++++++++------------ src/home/SeventhSection/index.jsx | 4 ++-- src/military/task/taskAdmin/index.jsx | 9 ++++++--- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/home/SecondSection/index.jsx b/src/home/SecondSection/index.jsx index 8d59a8c2..01576084 100644 --- a/src/home/SecondSection/index.jsx +++ b/src/home/SecondSection/index.jsx @@ -84,13 +84,13 @@ function SecondSection({ second ,main_web_site_url}) {
{ - list.map((item, i) => { + list&&list.map((item, i) => { return (
-
{ goDetail(item.fake_id) }}> +
{i + 1} -

{item.title}

- {item.tag} +

{ goDetail(item.fake_id) }}>{item.title}

+ {item.tag}

{item.content}

{item.created_time && item.created_time.split(' ')[0]} diff --git a/src/home/SecondSection/index.scss b/src/home/SecondSection/index.scss index b87ff930..2a2c1244 100644 --- a/src/home/SecondSection/index.scss +++ b/src/home/SecondSection/index.scss @@ -134,18 +134,6 @@ border-radius: .2em; } - .slide-tag-1{ - background: #586dff; - } - - .slide-tag-2 { - background: #e53939; - } - - .slide-tag-3 { - background: #ff7300; - } - .news-time { font-size: .95em; @@ -164,4 +152,15 @@ margin-left: 100px; } + .slick-slide:nth-child(n) .slide-tag{ + background: #586dff; + } + + .slick-slide:nth-child(2n) .slide-tag{ + background: #e53939; + } + + .slick-slide:nth-child(3n) .slide-tag{ + background: #ff7300; + } } diff --git a/src/home/SeventhSection/index.jsx b/src/home/SeventhSection/index.jsx index d92d1c69..f7dc3d49 100644 --- a/src/home/SeventhSection/index.jsx +++ b/src/home/SeventhSection/index.jsx @@ -56,7 +56,7 @@ function SeventhSection({ main_web_site_url }) {
{ - list.map((item, i) => { + list&& list.map((item, i) => { return ( { goDetail(item.fake_login) }} alt="images-not_found" />) }) } @@ -66,7 +66,7 @@ function SeventhSection({ main_web_site_url }) {
{ - list.map((item, i) => { + list&& list.map((item, i) => { return (
{ goDetail(item.fake_login) }} alt="images-not_found" /> { goDetail(item.fake_login) }}>{item.name} diff --git a/src/military/task/taskAdmin/index.jsx b/src/military/task/taskAdmin/index.jsx index c6dcbb79..c60c3414 100644 --- a/src/military/task/taskAdmin/index.jsx +++ b/src/military/task/taskAdmin/index.jsx @@ -59,7 +59,7 @@ export default Form.create()(({ form, showNotification, match, history }) => { } setLoading(false); }) - }, [statusString, order, sort, publishMode, showUserMode, curPage, searchObj, isDelete, reload ,recommend]); + }, [statusString, order, sort, publishMode, showUserMode, curPage, searchObj, isDelete, reload, recommend]); const helper = useCallback( @@ -212,8 +212,11 @@ export default Form.create()(({ form, showNotification, match, history }) => { } { - record.recommend ? - : + !record.recommend && [3, 4, 5, 6, 7, 8].includes(record.status) && + } + + { + record.recommend && } {/* 查看 */}