diff --git a/src/App.js b/src/App.js index 031f9a040..d1c049dc0 100644 --- a/src/App.js +++ b/src/App.js @@ -160,7 +160,7 @@ const Topic = Loadable({ }) // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 -const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","information"]; +const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone"]; class App extends Component { constructor(props) { @@ -381,7 +381,7 @@ class App extends Component { )} > { return () diff --git a/src/forge/Information/Component/hot.jsx b/src/forge/Information/Component/hot.jsx index f0c0b7349..ba9c224fd 100644 --- a/src/forge/Information/Component/hot.jsx +++ b/src/forge/Information/Component/hot.jsx @@ -13,7 +13,7 @@ function Hot({list , title,deptId}){ return(
  • {k+1} - {i.name} + {i.name}
  • ) }) diff --git a/src/forge/Information/Component/publicBanner.jsx b/src/forge/Information/Component/publicBanner.jsx index 6b2a74def..7ed3313f3 100644 --- a/src/forge/Information/Component/publicBanner.jsx +++ b/src/forge/Information/Component/publicBanner.jsx @@ -22,11 +22,11 @@ function PublicBanner(props){ useEffect(()=>{ if(pathname){ - const info = /\/information\/[0-9]{0,}\/news/g; - const infodetail = /\/information\/[0-9]{0,}\/newdetail/g; - const project = /\/information\/[0-9]{0,}\/projects/g; - const vip = /\/information\/[0-9]{0,}\/VIP/g; - if(pathname === `/information/${deptId}`){ + const info = /\/zone\/[0-9]{0,}\/news/g; + const infodetail = /\/zone\/[0-9]{0,}\/newdetail/g; + const project = /\/zone\/[0-9]{0,}\/projects/g; + const vip = /\/zone\/[0-9]{0,}\/VIP/g; + if(pathname === `/zone/${deptId}`){ setKey("1"); } else if(project.test(pathname)){ @@ -42,7 +42,7 @@ function PublicBanner(props){ },[pathname]) return( -
    +
    { data &&
    @@ -52,12 +52,12 @@ function PublicBanner(props){ }
    - 首页 - 开源项目 + 首页 + 开源项目 {/* 资源发布 */} - 领域资讯 + 领域资讯 {/* Sig小组 */} - 专区会员 + 专区会员 { adminUrl && {window.location.href=adminUrl}}>后台管理 }
    diff --git a/src/forge/Information/Pages/headerPage.jsx b/src/forge/Information/Pages/headerPage.jsx index eaf6f1c27..647c02ebb 100644 --- a/src/forge/Information/Pages/headerPage.jsx +++ b/src/forge/Information/Pages/headerPage.jsx @@ -6,6 +6,7 @@ import guideArrow from '../img/guideArrow.png'; import { Link } from 'react-router-dom'; import shijian from '../img/shijian.png'; import axios from 'axios'; +import Nodata from '../../Nodata'; function HeaderPage(props){ const [ projectList , setProjectList ] = useState(undefined); @@ -64,21 +65,21 @@ function HeaderPage(props){ }
    } -
    -

    新闻动态

    - { - newsList && newsList.length>0 && + { + newsList && newsList.length>0 && +
    +

    新闻动态

    - {newsList[0].name} + {newsList[0].name}

    {newsList[0].summary}

    {newsList[0].publishTime}

    - 查看详情 + 查看详情

      @@ -86,14 +87,14 @@ function HeaderPage(props){ newsList.map((i,k)=>{ return( k > 0 &&
    • - {i.name} + {i.name}

      {i.summary}

      {i.publishTime} - 查看详情 + 查看详情

    • ) @@ -101,8 +102,8 @@ function HeaderPage(props){ }
    - } -
    +
    + }

    精选项目

    { diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index c5a305b05..22f44a041 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -71,11 +71,11 @@ function Main(props){ { mainList && mainList.length>0 && - 全部 + 全部 { mainList.map((i,k)=>{ return( - {i.name} + {i.name} ) }) } @@ -101,14 +101,14 @@ function Main(props){
    {i.name} - { i.cmsDocList && i.cmsDocList.length> 0 && {window.scrollTo(0,400)}}>更多 } + { i.cmsDocList && i.cmsDocList.length> 0 && {window.scrollTo(0,400)}}>更多 }
    { i.cmsDocList && i.cmsDocList.length>0 ? i.cmsDocList.map((j,e)=>{ return( -
    {props.history.push(`/information/${deptId}/newdetail/${j.id}`)}}> +
    {props.history.push(`/zone/${deptId}/newdetail/${j.id}`)}}> {e===0 && ( j.headImg ? @@ -118,7 +118,7 @@ function Main(props){ ) }
    - {j.name} + {j.name}

    {j.summary}

    diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index b78af91e6..11d9e5a39 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -49,8 +49,8 @@ function NewsDetail(props){ detail &&
    - 领域资讯 - { cmsDir && {cmsDir.name} } + 领域资讯 + { cmsDir && {cmsDir.name} } 正文
    diff --git a/src/forge/Information/Pages/newsList.jsx b/src/forge/Information/Pages/newsList.jsx index 5e3d2c008..7789c46e7 100644 --- a/src/forge/Information/Pages/newsList.jsx +++ b/src/forge/Information/Pages/newsList.jsx @@ -100,7 +100,7 @@ function NewsList(props){ //
    //
    // - // 领域资讯 + // 领域资讯 // {details && details.name} // //

    {details && details.name}

    @@ -113,7 +113,7 @@ function NewsList(props){ // { // columnList.map((i,k)=>{ // return( - // {if(document.documentElement.scrollTop > 600)window.scrollTo(0,480);}} to={`/information/${deptId}/news/${i.id}`} title={i.name}>{i.name} + // {if(document.documentElement.scrollTop > 600)window.scrollTo(0,480);}} to={`/zone/${deptId}/news/${i.id}`} title={i.name}>{i.name} // ) // }) // } @@ -129,7 +129,7 @@ function NewsList(props){ mainList && mainList.length>0 && mainList.map((i,k)=>{ return( -
    {props.history.push(`/information/${deptId}/newdetail/${i.id}`)}} key={k}> +
    {props.history.push(`/zone/${deptId}/newdetail/${i.id}`)}} key={k}> { i.headImg ? @@ -137,7 +137,7 @@ function NewsList(props){ }
    - {i.name} + {i.name}

    {i.summary}

    diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index 5e13c8ae3..49465a8fb 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -105,37 +105,37 @@ function Index(props){ (
    )} > ( )} > ( )} > ( )} > (
    )} > ( )}