diff --git a/public/css/gitlink.min.css b/public/css/gitlink.min.css index 24873c2d8..d4d16b2a3 100644 --- a/public/css/gitlink.min.css +++ b/public/css/gitlink.min.css @@ -20,6 +20,10 @@ font-family: "ziyouwenyihei"; src: url("../fonts/ziyouwenyihei.ttf"); } +@font-face { + font-family: "jinbuti"; + src: url("../fonts/dingtalk_jinbuti-webfont.woff"); +} .header { width: 100%; height: 51px; diff --git a/public/fonts/dingtalk_jinbuti-webfont.woff b/public/fonts/dingtalk_jinbuti-webfont.woff new file mode 100644 index 000000000..fc2384f0c Binary files /dev/null and b/public/fonts/dingtalk_jinbuti-webfont.woff differ diff --git a/src/forge/Information/Component/publicBanner.jsx b/src/forge/Information/Component/publicBanner.jsx index de004404f..21e24df4a 100644 --- a/src/forge/Information/Component/publicBanner.jsx +++ b/src/forge/Information/Component/publicBanner.jsx @@ -7,7 +7,7 @@ import leftImg from '../img/left.png'; import MemberApply from './memberApply'; import { memberStatusEnum } from '../Pages/zoneVIP'; import { applyJoin, getAuditStatus } from '../api'; - +import uosIcon from "../img/uos.png"; function PublicBanner(props) { @@ -107,7 +107,7 @@ function PublicBanner(props) { data && deptId !== 'xjykyzx' &&
{!isNSCC && !isUOS &&

{data.mainTitle}

} - {isUOS &&

{data.mainTitle}

} + {isUOS &&

{data.mainTitle}

} {isNSCC &&

@@ -119,7 +119,6 @@ function PublicBanner(props) { {isNSCC &&

加入社区
} -
} { diff --git a/src/forge/Information/Pages/homepage/component/news.jsx b/src/forge/Information/Pages/homepage/component/news.jsx index 83da8459e..3be75a823 100644 --- a/src/forge/Information/Pages/homepage/component/news.jsx +++ b/src/forge/Information/Pages/homepage/component/news.jsx @@ -1,6 +1,6 @@ import React , { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; -import { getDirListById, getSubDocList } from '../../../api'; +import { getDirListById, getSubDocList, gethomePageDocList } from '../../../api'; import { Badge, Col, Icon, Row } from 'antd'; import dirpng from '../image/new3.png' import new4 from '../image/new4.png'; @@ -15,6 +15,8 @@ import new12 from '../image/new12.png'; import new13 from '../image/new13.png'; import '../index.scss'; import Nodata from '../../../../Nodata'; +import uosIcon from '../image/uosIcon.png' +import guideArrow from '../../../img/guideArrow.png'; function News({data, subTitle, firstDirIntro, secondDirIntro}) { const {firstTitle, key, homepageCmsTitle, id} = data || {}; @@ -41,24 +43,31 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) { const [docListByDir, setDocListByDir] = useState([]); const [activeDirId, setActiveDirId] = useState(undefined); const [total, setTotal] = useState(0); + const [showNew, setShowNew] = useState({}); - useEffect(()=>{ - id && getDirListById(id).then(res=>{ - if(res){ - const rows = res.data.rows - setDirList(rows); - // 获取第一个栏目的第一条文章 - rows[0] && getDocById(rows[0].id, 1, (data)=>{ - setDocListByFirstDir(data) - }) - // 获取第2个栏目的第一条文章 - rows[1] && getDocById(rows[1].id, 8, (data)=>{ - setDocListBySecondDir(data) - }) - rows[2] && setActiveDirId(rows[2].id) - } - }) - }, [id]) + // useEffect(()=>{ + // id && getDirListById(id).then(res=>{ + // if(res){ + // const rows = res.data.rows + // setDirList(rows); + // // 获取第一个栏目的第一条文章 + // rows[0] && getDocById(rows[0].id, 1, (data)=>{ + // setDocListByFirstDir(data) + // }) + // // 获取第2个栏目的第一条文章 + // rows[1] && getDocById(rows[1].id, 8, (data)=>{ + // setDocListBySecondDir(data) + // }) + // rows[2] && setActiveDirId(rows[2].id) + // } + // }) + // }, [id]) + + useEffect(() => { + if(id){ + getNewsList(); + } + },[ id ]) useEffect(()=>{ activeDirId && getDocById(activeDirId, 4, (data)=>{ @@ -77,6 +86,14 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) { }) } + const getNewsList = () => { + gethomePageDocList(id).then(result=>{ + if(result){ + setShowNew(result.data.rows && result.data.rows[0]); + } + }).catch(error=>{}) + } + const renderItems = () => { const itemsPerRow = 6; let rendered = []; @@ -127,7 +144,16 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) {

{homepageCmsTitle}

{subTitle}

-
+ { + showNew.id &&
+
+

{ showNew.name }

+

{ showNew.summary }

+
+ +
+ } +
{/* 第一个顺序栏目 */} {firstDir &&

@@ -166,6 +192,9 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) {

}
+
+ 查看更多 +
{dirs && !!dirs.length &&
{renderItems()}
} diff --git a/src/forge/Information/Pages/homepage/image/uosBg.png b/src/forge/Information/Pages/homepage/image/uosBg.png new file mode 100644 index 000000000..c33f18998 Binary files /dev/null and b/src/forge/Information/Pages/homepage/image/uosBg.png differ diff --git a/src/forge/Information/Pages/homepage/image/uosIcon.png b/src/forge/Information/Pages/homepage/image/uosIcon.png new file mode 100644 index 000000000..17f9baa20 Binary files /dev/null and b/src/forge/Information/Pages/homepage/image/uosIcon.png differ diff --git a/src/forge/Information/Pages/homepage/index.scss b/src/forge/Information/Pages/homepage/index.scss index fd9d70647..9b5d1f09b 100644 --- a/src/forge/Information/Pages/homepage/index.scss +++ b/src/forge/Information/Pages/homepage/index.scss @@ -208,6 +208,51 @@ .n_1_dir{ width: 195px; } + .news-more { + display: flex; + justify-content: center; + margin-top: 40px; + a { + display: flex; + align-items: center; + color: #466aff; + } + } + .news-show { + background-image: url('./image/uosBg.png'); + background-size: 100% 100%; + height: 440px; + position: relative; + .news-show-left { + width: 570px; + padding: 48px; + img { + width: 19px; + margin-right: 13px; + } + .news-title { + font-family: alibaba; + font-weight: 500; + color: #b2dbff; + font-size: 22px; + } + .news-content { + opacity: 91%; + line-height: 36px; + color: #ffffff; + font-size: 14px; + } + } + .news-img { + height: 385px; + width: 616px; + position: absolute; + right: 0; + bottom: 0; + border-top-left-radius: 10px; + border-bottom-right-radius: 10px; + } + } } .news_1_bg .activeDir, .vip_1_bg .v_type.active{ diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index c8534a9ec..62d4531a3 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -158,11 +158,20 @@ } .main_t_uos{ width: fit-content; - background: linear-gradient(91.24deg,#8ad0ff 3.66%,#70f2e1 99.91%); - background-clip: text; - -webkit-text-fill-color: transparent; font-size:40px; - line-height: 40px; + display: flex; + align-items: center; + font-family: jinbuti; + span { + background: linear-gradient(91.24deg,#8ad0ff 3.66%,#70f2e1 99.91%); + -webkit-text-fill-color: transparent; + background-clip: text; + margin-left: 18px; + } + img { + width: 40px; + height: 40px; + } } .sub_t{ margin-top: 35px;