CCF首页新闻高亮 #582
|
@ -14,20 +14,6 @@ import Slider from 'react-slick';
|
||||||
import Left from '../../../home/Img/left.png';
|
import Left from '../../../home/Img/left.png';
|
||||||
import Right from '../../../home/Img/right.png';
|
import Right from '../../../home/Img/right.png';
|
||||||
|
|
||||||
const setting = {
|
|
||||||
dots: true,
|
|
||||||
infinite: true,
|
|
||||||
speed: 2000,
|
|
||||||
slidesToShow: 1,
|
|
||||||
slidesToScroll: 1,
|
|
||||||
pauseOnDotsHover: true,
|
|
||||||
autoplaySpeed: 5000,
|
|
||||||
pauseOnFocus: true,
|
|
||||||
autoplay: true,
|
|
||||||
arrows: true,
|
|
||||||
prevArrow: <img className='slick-prev slick-arrow' src={Left} width="70px" alt="" />,
|
|
||||||
nextArrow: <img className='slick-prev slick-arrow' src={Right} width="70px" alt="" />
|
|
||||||
}
|
|
||||||
|
|
||||||
function HeaderPageCCF(props) {
|
function HeaderPageCCF(props) {
|
||||||
const [projectList, setProjectList] = useState(undefined);
|
const [projectList, setProjectList] = useState(undefined);
|
||||||
|
@ -37,6 +23,22 @@ function HeaderPageCCF(props) {
|
||||||
const { deptId, cateId } = props.match.params;
|
const { deptId, cateId } = props.match.params;
|
||||||
const { data, id, temp } = props;
|
const { data, id, temp } = props;
|
||||||
const [mainList, setMainList] = useState(undefined);
|
const [mainList, setMainList] = useState(undefined);
|
||||||
|
const [tag,setTag] = useState(0);
|
||||||
|
const setting = {
|
||||||
|
dots: true,
|
||||||
|
infinite: true,
|
||||||
|
speed: 2000,
|
||||||
|
slidesToShow: 1,
|
||||||
|
slidesToScroll: 1,
|
||||||
|
pauseOnDotsHover: true,
|
||||||
|
autoplaySpeed: 5000,
|
||||||
|
pauseOnFocus: true,
|
||||||
|
autoplay: true,
|
||||||
|
arrows: true,
|
||||||
|
prevArrow: <img className='slick-prev slick-arrow' src={Left} width="70px" alt="" />,
|
||||||
|
nextArrow: <img className='slick-prev slick-arrow' src={Right} width="70px" alt="" />,
|
||||||
|
afterChange: (index)=> setTag(index)
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (id||cateId) {
|
if (id||cateId) {
|
||||||
|
@ -128,7 +130,7 @@ function HeaderPageCCF(props) {
|
||||||
newsList.map((i, k) => {
|
newsList.map((i, k) => {
|
||||||
return (
|
return (
|
||||||
<li key={k} style={{boxShadow:"0px 0px 20px rgba(35, 54, 185, 0.06)"}}>
|
<li key={k} style={{boxShadow:"0px 0px 20px rgba(35, 54, 185, 0.06)"}}>
|
||||||
<Link className="zone_n_title" to={`/zone/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
|
<Link className="zone_n_title" to={`/zone/${deptId}/newdetail/${i.id}`} style={{color:k===tag?"#466aff":""}} >{i.name}</Link>
|
||||||
<p className="zone_n_value">
|
<p className="zone_n_value">
|
||||||
<span className="font-15" style={{ color: "#8d95a3" }}>
|
<span className="font-15" style={{ color: "#8d95a3" }}>
|
||||||
<img src={shijian} alt="" className="mr3 photo" />
|
<img src={shijian} alt="" className="mr3 photo" />
|
||||||
|
@ -153,7 +155,7 @@ function HeaderPageCCF(props) {
|
||||||
<p className="font-17">
|
<p className="font-17">
|
||||||
<img src={xuexi} alt="" className="mr10"></img>
|
<img src={xuexi} alt="" className="mr10"></img>
|
||||||
{i.name}
|
{i.name}
|
||||||
<i className="iconfont icon-youhua font-12 lg lh26 icontianjiadaohangcolors you " onClick={()=>{window.location.href=`/zone/${deptId}/news/${i.id}`}}></i></p>
|
<Link to={`/zone/${deptId}/news/${i.id}`}><i className="iconfont icon-youhua font-12 lg lh26 icontianjiadaohangcolors you " ></i></Link></p>
|
||||||
{
|
{
|
||||||
i.cmsDocList && i.cmsDocList.length > 0 ?
|
i.cmsDocList && i.cmsDocList.length > 0 ?
|
||||||
i.cmsDocList.map((j, k) => {
|
i.cmsDocList.map((j, k) => {
|
||||||
|
|
Loading…
Reference in New Issue