uos专区定制
This commit is contained in:
parent
9f3caf78c2
commit
3f104f71d9
|
|
@ -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;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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' &&
|
||||
<div className="zone_content">
|
||||
{!isNSCC && !isUOS && <p className="main_t">{data.mainTitle}</p>}
|
||||
{isUOS && <p className="main_t_uos"> <img src={require('../img/uos.png').default} alt='' /> {data.mainTitle}</p>}
|
||||
{isUOS && <p className="main_t_uos"> <img src={uosIcon} alt='' /> <span>{data.mainTitle}</span></p>}
|
||||
{isNSCC && <Fragment>
|
||||
<img src={require('../img/new.png').default} alt='' width={115} />
|
||||
<p className="main_t_nscc mt10 pb10">
|
||||
|
|
@ -119,7 +119,6 @@ function PublicBanner(props) {
|
|||
{isNSCC && <div className='mt30'>
|
||||
<a className="zone_apply_but font-16 color-white" onClick={apply}>加入社区<i class="iconfont icon-jiantou3 font-14 ml5"></i></a>
|
||||
</div>}
|
||||
<img src={require('../img/uos.png').default} alt='' />
|
||||
</div>
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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}) {
|
|||
<div className='news_1 width1200 pt50 pb60'>
|
||||
<p className='font-bd font-30 mb15 align task-hide'>{homepageCmsTitle}</p>
|
||||
<p className='font-16 align color212 mb50'>{subTitle}</p>
|
||||
<div className='df mb80'>
|
||||
{
|
||||
showNew.id && <div className="news-show">
|
||||
<div className="news-show-left">
|
||||
<p className="news-title"><img src={ uosIcon } alt="" />{ showNew.name }</p>
|
||||
<p className="news-content">{ showNew.summary }</p>
|
||||
</div>
|
||||
<img className="news-img" src={ showNew.headImg } alt="" />
|
||||
</div>
|
||||
}
|
||||
<div className='df'>
|
||||
{/* 第一个顺序栏目 */}
|
||||
{firstDir && <div className='firstDir clearfix'>
|
||||
<p className='font-16 task-hide'>
|
||||
|
|
@ -166,6 +192,9 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) {
|
|||
</Row>
|
||||
</div>}
|
||||
</div>
|
||||
<div className="news-more">
|
||||
<Link to={`/zone/${key}/news`} >查看更多<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
|
||||
</div>
|
||||
{dirs && !!dirs.length && <div className='df wrap backWhite pt30 pb15 pl10 pr10'>
|
||||
{renderItems()}
|
||||
</div>}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 534 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue