forked from Gitlink/forgeplus-react
超算新闻切换栏目页码和调用接口优化
This commit is contained in:
parent
4f2dcb0f1c
commit
30c213e958
|
|
@ -130,11 +130,11 @@ function NewsIndex(props) {
|
|||
mainList && mainList.length > 0 &&
|
||||
<ul className='customMenus width1600'>
|
||||
<li className={!cateId ? "active" : ""}>
|
||||
<Link to={`/zone/${deptId}/news`}><img src={require(`../../img/1${!cateId ? "w" : "b"}.png`)} width={17} />全部新闻</Link>
|
||||
<Link to={`/zone/${deptId}/news`} onClick={()=>{setPageNum(1)}}><img src={require(`../../img/1${!cateId ? "w" : "b"}.png`)} width={17} />全部新闻</Link>
|
||||
</li>
|
||||
{mainList.map((i, k) => {
|
||||
return <li className={cateId && cateId === String(i.id) ? "active" : ""}>
|
||||
<Link to={`/zone/${deptId}/news/${i.id}`}>
|
||||
<Link to={`/zone/${deptId}/news/${i.id}`} onClick={()=>{setPageNum(1); setViewMode("default")}}>
|
||||
<img src={cateId && cateId === String(i.id) ? require(`../../img/${(k % 7) + 2}w.png`) : require(`../../img/${(k % 7) + 2}b.png`)} width={17} />
|
||||
{i.name}
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Reference in New Issue