diff --git a/src/forge/Information/Component/publicBanner.jsx b/src/forge/Information/Component/publicBanner.jsx index 3f93e9e5d..d763f7809 100644 --- a/src/forge/Information/Component/publicBanner.jsx +++ b/src/forge/Information/Component/publicBanner.jsx @@ -6,16 +6,20 @@ import Menu3 from '../img/menu3.png'; import Menu4 from '../img/menu4.png'; import Menu5 from '../img/menu5.png'; import Menu6 from '../img/menu6.png'; +import Menu7 from '../img/menu7.png'; +import banner from '../img/mainbanner.png' import { Link } from 'react-router-dom'; function PublicBanner(props){ const [ key , setKey ] = useState("1"); + const { deptId } = props.match.params; const { pathname } = props.history.location; const { data , adminUrl } = props; + useEffect(()=>{ if(pathname){ const head = /\/information\/[0-9]{0,}/g; @@ -39,7 +43,7 @@ function PublicBanner(props){ },[pathname]) return( -
+
{ data &&
@@ -49,13 +53,13 @@ function PublicBanner(props){ }
- 首页 - 开源项目 + 首页 + 开源项目 {/* 资源发布 */} - 领域资讯 + 领域资讯 {/* Sig小组 */} - 专区会员 - { adminUrl && {window.location.href=adminUrl}}>后台管理 } + 专区会员 + { adminUrl && {window.location.href=adminUrl}}>后台管理 }
diff --git a/src/forge/Information/Pages/headerPage.jsx b/src/forge/Information/Pages/headerPage.jsx index 9d4371d80..020252ec4 100644 --- a/src/forge/Information/Pages/headerPage.jsx +++ b/src/forge/Information/Pages/headerPage.jsx @@ -49,18 +49,18 @@ function HeaderPage(props){ } return(
-

{data && data.name}

+

{data && data.firstTitle}

{ data &&
-

{data.name}

-

{data.introductionContent}

+

{data.introductionTitle}

+

{data.introductionContent}

} { data && data.introductionImage && - + }
@@ -69,18 +69,18 @@ function HeaderPage(props){ newsList && newsList.length>0 &&
- +

{newsList[0].name}

{newsList[0].summary}

-

+

{newsList[0].publishTime}

- 查看详情 + 查看详情

-
    +
      { newsList.map((i,k)=>{ return( @@ -92,7 +92,7 @@ function HeaderPage(props){ {i.publishTime} - 查看详情 + 查看详情

      ) @@ -111,9 +111,9 @@ function HeaderPage(props){ projectList.map((i,k)=>{ return(
    • - {i.projectProperties && i.projectProperties.authorImageUrl && } -
      - window.open(i.projectURL)} className="z_p_title">{i.projectProperties && i.projectProperties.fullName} +
      {i.projectProperties && i.projectProperties.authorImageUrl && }
      +
      + window.open(i.projectURL)} className="z_p_title">{i.projectProperties && i.projectProperties.name}

      {i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}

    • diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index efb28b48b..0b529f7d1 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -30,7 +30,11 @@ function Main(props){ function getMainList(){ const url = `/cms/doc/open/zone/${deptId}/docOverviewList`; - axios.get(url).then(result=>{ + axios.get(url,{ + params:{ + pageSize:10,pageNum:1 + } + }).then(result=>{ if(result){ setMainList(result.data.rows); setIsSpin(false); @@ -52,11 +56,23 @@ function Main(props){ function clickTab(k,idName){ setKey(k); } + // const hash = props.history.location.hash; + + // useEffect(()=>{ + // if(hash){ + // setTimeout(()=>{ + // let top =document.documentElement.scrollTop; + // console.log(document.documentElement.scrollTop); + // window.scrollTo(0,top-120); + // },50) + // } + // },[hash]) return(
      {/* */}
      +

      领域资讯

      { mainList && mainList.length>0 && @@ -82,42 +98,47 @@ function Main(props){ mainList && mainList.length>0 && mainList.map((i,k)=>{ return( -
      +
      - {i.name} - 更多 + {i.name} + 更多
      { - i.cmsDocList && i.cmsDocList.length>0 ? - i.cmsDocList.map((j,e)=>{ - return( -
      - {e===0 && - ( - i.headImg ? - - : - - ) - } -
      - {j.name} -

      - {j.summary} -

      -
      - {j.publishTime} - {j.visits} + i.cmsDocList && i.cmsDocList.length>0 ? + + {i.cmsDocList.map((j,e)=>{ + return( +
      + {e===0 && + ( + j.headImg ? + + : + + ) + } +
      + {j.name} +

      + {j.summary} +

      +
      + {j.publishTime} + {j.visits} +
      -
      - ) - }) + ) + }) + } +
      + :

      暂无数据~

      +
      }
      diff --git a/src/forge/Information/Pages/newsList.jsx b/src/forge/Information/Pages/newsList.jsx index 665132758..4b66991f1 100644 --- a/src/forge/Information/Pages/newsList.jsx +++ b/src/forge/Information/Pages/newsList.jsx @@ -1,7 +1,7 @@ import React , { useEffect , useState } from 'react'; import PublicBanner from '../Component/publicBanner'; import { Box , LongWidth } from '../../Component/layout'; -import { Menu , Breadcrumb , Pagination , Spin } from 'antd'; +import { Menu , Breadcrumb , Pagination , Spin , Tooltip } from 'antd'; import Hot from '../Component/hot'; import axios from 'axios'; import shijian from '../img/shijian.png'; @@ -21,12 +21,15 @@ function NewsList(props){ const [ details , setDetails ] = useState(undefined); const [ menuSpin , setMenuSpin ] = useState(true); + useEffect(()=>{ if(deptId && cateId){ getMainList(); } },[deptId,cateId,pageNum]) + + useEffect(()=>{ if(deptId && cateId){ setMenuSpin(true); @@ -66,6 +69,7 @@ function NewsList(props){ }).then(result=>{ if(result){ setMainList(result.data.rows); + setTotal(result.data.total); } }).catch(error=>{}) } @@ -101,7 +105,7 @@ function NewsList(props){ { columnList.map((i,k)=>{ return( - {i.name} + {if(document.documentElement.scrollTop > 600)window.scrollTo(0,480);}} to={`/information/${deptId}/news/${i.id}`} title={i.name}>{i.name} ) }) } @@ -144,7 +148,7 @@ function NewsList(props){ } { total > pageSize && -
      +
      {setPageNum(p)}}/>
      } diff --git a/src/forge/Information/Pages/projectSource.jsx b/src/forge/Information/Pages/projectSource.jsx index 8bd1edd63..f8dadea28 100644 --- a/src/forge/Information/Pages/projectSource.jsx +++ b/src/forge/Information/Pages/projectSource.jsx @@ -67,6 +67,13 @@ function ProjectSource(props){ 点赞数量排序 ) + + function changeValue(e){ + if(!e.target.value && e.target.value !==value){ + setSearchName(e.target.value); + } + setValue(e.target.value); + } return(
      {/* */} @@ -74,7 +81,7 @@ function ProjectSource(props){

      开源项目

        -
      • 项目分类
      • +
      • 项目分类
      • setTypeId(0)}>全部分类
      • { typeList && typeList.length>0 && @@ -90,8 +97,8 @@ function ProjectSource(props){
        setValue(e.target.value)} - onSearch={()=>setSearchName(value)} + onChange={changeValue} + onSearch={()=>{setSearchName(value)}} allowClear={true} size={'large'} placeholder="请输入项目名称" @@ -112,7 +119,7 @@ function ProjectSource(props){ {i.projectProperties && }

        - window.open(i.projectURL)}>{i.projectProperties && i.projectProperties.fullName} + window.open(i.projectURL)}>{i.projectProperties && i.projectProperties.name} { i.projectProperties &&

          diff --git a/src/forge/Information/Pages/zoneVIP.jsx b/src/forge/Information/Pages/zoneVIP.jsx index 39c505b86..1048f1d04 100644 --- a/src/forge/Information/Pages/zoneVIP.jsx +++ b/src/forge/Information/Pages/zoneVIP.jsx @@ -1,5 +1,6 @@ import React , { useState , useEffect } from 'react'; import Crown from '../img/crown.png'; +import Nodata from '../../Nodata'; import { Spin } from 'antd'; import axios from 'axios'; @@ -68,6 +69,12 @@ function ZoneVIP(props){ }
        } + { + vipLists && vipLists.length === 0 && +
        + +
        + }
      diff --git a/src/forge/Information/img/menu6.png b/src/forge/Information/img/menu6.png index b9834a3e1..6f9a9b6c4 100644 Binary files a/src/forge/Information/img/menu6.png and b/src/forge/Information/img/menu6.png differ diff --git a/src/forge/Information/img/menu7.png b/src/forge/Information/img/menu7.png new file mode 100644 index 000000000..2e265a0c1 Binary files /dev/null and b/src/forge/Information/img/menu7.png differ diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index 8a2c50902..45bbec818 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -45,7 +45,7 @@ function Index(props){ useEffect(()=>{ axios.interceptors.request.use( config => { - var localproxy = "https://testgetway.gitlink.org.cn"; + var localproxy = "https://testgetway.trustie.net"; var proxy = ""; let url = "/api" +config.url; if(isDev){ @@ -84,7 +84,9 @@ function Index(props){ const url = `/zone/open/${deptId}`; axios.get(url).then(result=>{ if(result){ - setData(result.data.data); + let data = result.data.data; + setData(data); + document.title= data&& data.name; } }).catch(console.error()) } diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index f81dbeed7..9baf42b53 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -20,10 +20,10 @@ text-align:center; } .in_banner{ - background-image: url(./img/mainbanner.png); + // background-image: url(./img/mainbanner.png); background-size: 100% 100%; // background-color:linear-gradient(270deg,#262a35 0%,rgba(38, 42, 53, 0.26) 42.94%,#262a35 100%); - height: 600px; + height: 450px; position: relative; padding-bottom: 88px; &>div{ @@ -37,7 +37,6 @@ color:#78d0f5; font-size:40px; line-height: 40px; - height: 40px; } .sub_t{ margin-top: 35px; @@ -73,7 +72,7 @@ &.ant-menu-item-selected a,a{ color: #fff!important; } - &.ant-menu-item-selected::after{ + &.ant-menu-item-selected::after, &.ant-menu-item-active::after{ content:""; position: absolute; width: 100%; @@ -82,6 +81,9 @@ bottom: 1px; background-color: #466aff; } + &.ant-menu-item-active::after{ + background-color:rgba(255, 255, 255, 0.36); + } } } } @@ -217,6 +219,7 @@ position: relative; display: block; line-height: 25px; + word-break: break-all; &.sub_i{ padding-left: 18px; &::before{ @@ -239,7 +242,7 @@ align-items: center; border-bottom: 1px dashed rgba(70, 106, 255, 0.48); margin-bottom: 5px; - span{ + &>span{ display: block; width: 113px; height: 30px; @@ -249,6 +252,10 @@ font-size:17px; background-image: url(./img/guide.png); background-size: 100% 100%; + span{ + display: block; + max-width: 100px; + } } a{ color:#466aff; @@ -342,6 +349,10 @@ width: 1200px; margin:0px auto; } +.flexCenter{ + display: flex; + align-items: center; +} .detail_news_all{ .detail_banners{ background-image: url(./img/subbanner.png); @@ -420,7 +431,7 @@ .author_img{ width: 66px; height: 66px; - border-radius: 10px; + border-radius: 50%; margin-right: 20px; object-fit: cover; } @@ -530,6 +541,8 @@ font-size:18px; font-weight:500; cursor: default; + display: flex; + align-items: center; } &.active{ color:#466aff; @@ -555,12 +568,13 @@ display: flex; align-items: center; margin-top: 54px; + padding:27px 24px; &>img{ - border-radius: 0px 4px 4px 0px; + border-radius: 4px; object-fit: cover; } .zone_infos_desc{ - padding:0px 34px; + padding:0px 34px 0px 10px; flex: 1; .z_name{ color:#1f2329; @@ -573,6 +587,8 @@ color:#3d485d; font-size:14px; line-height:32px; + word-break: break-all; + -webkit-line-clamp: 4; } } } @@ -590,6 +606,9 @@ font-size:17px; height: 24px; line-height: 24px; + &:hover{ + color: #466aff; + } } .zone_n_desc{ color:#4c5876; @@ -606,6 +625,23 @@ line-height: 20px; margin-top: 15px; } + .zone_btn{ + padding-right: 20px; + position: relative; + height: 20px; + line-height: 20px; + img{ + position: absolute; + left: 62px; + top:5px; + transition: 0.1s; + } + &:hover{ + img{ + left: 68px; + } + } + } .zone_new_first{ background-color: #fff; padding:30px; @@ -616,12 +652,21 @@ margin-left: 30px; display: flex; flex-direction: column; - justify-content: space-between; + &.spaceeTween{ + justify-content: space-between; + } + &.flexStart{ + justify-content: flex-start; + li{ + margin-bottom: 30px!important; + } + } li{ background-color: #fff; width: 385px; padding:20px; border-radius: 4px; + margin-bottom: 30px; &:last-child{ margin-bottom: 0px; } @@ -649,13 +694,19 @@ &:nth-child(2n){ margin-right: 0px!important; } - &>img{ + .imgBox{ + background-color: #E3E7F3; + border-radius: 8px; width: 75px; height: 75px; - border-radius: 8px; margin-right: 14px; + img{ + width: 75px; + height: 75px; + border-radius: 8px; + } } - &>div{ + .infoBox{ flex:1; .z_p_title{ font-weight:700; @@ -665,6 +716,9 @@ height: 22px; line-height: 22px; display: block; + &:hover{ + color: #466aff; + } } .z_p_desc{ color:#4c5876; @@ -687,11 +741,12 @@ display: flex; align-items: center; margin-top: 50px; - justify-content: space-between; flex-wrap: wrap; li{ padding:17px 13px; background-image: url(./img/contributebg.png); + box-shadow:0px 0px 15px rgba(49,61,113,0.06); + background-size: 100% 100%; width: 268px; height: 268px; border:1px solid #fff; @@ -699,6 +754,10 @@ flex-direction: column; align-items: center; margin-bottom: 30px!important; + margin-right: 40px; + &:nth-child(4n){ + margin-right: 0px; + } &>img{ width: 80px; height: 80px; @@ -776,16 +835,16 @@ padding:0px 40px 10px; margin:35px 0px 15px; &:nth-child(4n+1) .card_title{ - background-color: #466aff; + background-color: rgba(72, 91, 170, 1); } &:nth-child(4n+2) .card_title{ - background-color: #07a583; + background-color: rgba(54, 141, 122, 1); } &:nth-child(4n+3) .card_title{ - background-color: #8257e8; + background-color: rgba(120, 95, 181, 1); } &:nth-child(4n+4) .card_title{ - background-color: #cb7e4b; + background-color: rgba(168, 128, 101, 1); } .card_title{ height: 49px; @@ -822,7 +881,7 @@ &>img{ width: 100px; height: 100px; - border-radius: 10px; + border-radius: 50%; margin-right: 24px; } .card_u_info{