This commit is contained in:
caishi 2023-05-29 10:55:34 +08:00
parent ff78733593
commit ec2f78a258
8 changed files with 98 additions and 42 deletions

View File

@ -5,6 +5,7 @@ import Menu2 from '../img/menu2.png';
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 { Link } from 'react-router-dom';
@ -18,16 +19,21 @@ function PublicBanner(props){
if(pathname){
const head = /\/information\/[0-9]{0,}/g;
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(head.test(pathname)){
setKey("1");
}
if(project.test(pathname)){
setKey("2");
}
if(info.test(pathname)){
if(info.test(pathname) || infodetail.test(pathname)){
setKey("4");
}
if(vip.test(pathname)){
setKey("6");
}
}
},[pathname])
@ -47,6 +53,7 @@ function PublicBanner(props){
<Menu.Item key={"3"}><img src={Menu3} alt="" width="33px"/>资源发布</Menu.Item>
<Menu.Item key={"4"}><Link to={`/information/1/news`}><img src={Menu4} alt="" width="32px"/>领域资讯</Link></Menu.Item>
<Menu.Item key={"5"}><img src={Menu5} alt="" width="27px"/>Sig小组</Menu.Item>
<Menu.Item key={"6"}><Link to={`/information/1/VIP`}><img src={Menu6} alt="" width="27px"/>专区会员</Link></Menu.Item>
</Menu>
</div>
</div>

View File

@ -8,6 +8,7 @@ import axios from 'axios';
function HeaderPage(props){
const [ projectList , setProjectList ] = useState(undefined);
const [ personList , setPersonList ] = useState(undefined);
const [ newsList, setNewsList ] = useState(undefined);
const { deptId } = props.match.params;
const { data } = props;
@ -15,8 +16,18 @@ function HeaderPage(props){
useEffect(()=>{
getProjectList();
getNewsList();
getPersonList();
},[])
function getPersonList(){
const url = `/zone/open/${deptId}/member/homePageList`;
axios.get(url).then(result=>{
if(result){
setPersonList(result.data.rows);
}
}).catch(error=>{})
}
function getNewsList(){
const url = `/cms/doc/open/zone/${deptId}/homePageDocList`;
axios.get(url).then(result=>{
@ -29,7 +40,7 @@ function HeaderPage(props){
function getProjectList(){
const url = `/zone/open/${deptId}/project/list`;
axios.get(url,{params:{
isHomepage:1,pageNum:1,pageSize:4
isHomepage:1
}}).then(result=>{
if(result){
setProjectList(result.data.rows);
@ -102,7 +113,7 @@ function HeaderPage(props){
<li>
{i.projectProperties && i.projectProperties.authorImageUrl && <img src={i.projectProperties.authorImageUrl} alt="" /> }
<div>
<Link to={i.projectURL} className="z_p_title">{i.fullName}</Link>
<a onClick={()=>window.open(i.projectURL)} className="z_p_title">{i.fullName}</a>
<p className="z_p_desc task-hide-2">{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}</p>
</div>
</li>
@ -114,28 +125,22 @@ function HeaderPage(props){
</div>
<div className="zone_contributor">
<p className="in_title">核心贡献者</p>
<ul className="boxmain zone_c_lists">
<li>
<img src="" alt="" />
<span>贡献者名字一</span>
<p className="task-hide-2">我是贡献者的简介内容占两行我是贡献者的简介内容占两行我是贡献者的简介内容占两行</p>
</li>
<li>
<img src="" alt="" />
<span>贡献者名字一2</span>
<p className="task-hide-2">我是贡献者的简介内容占两行我是贡献者的简介内容占两行我是贡献者的简介内容占两行</p>
</li>
<li>
<img src="" alt="" />
<span>贡献者名字一3</span>
<p className="task-hide-2">我是贡献者的简介内容占两行我是贡献者的简介内容占两行我是贡献者的简介内容占两行</p>
</li>
<li>
<img src="" alt="" />
<span>贡献者名字一4</span>
<p className="task-hide-2">我是贡献者的简介内容占两行我是贡献者的简介内容占两行我是贡献者的简介内容占两行</p>
</li>
</ul>
{
personList && personList.length > 0 &&
<ul className="boxmain zone_c_lists">
{
personList.map((i,k)=>{
return(
<li>
<img src={i.imageUrl} alt="" />
<span>{i.name}</span>
<p className="task-hide-2">{i.introduction}</p>
</li>
)
})
}
</ul>
}
</div>
<div className="zone_parter">

View File

@ -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 } from 'antd';
import { Menu , Breadcrumb , Pagination , Spin } from 'antd';
import Hot from '../Component/hot';
import axios from 'axios';
import shijian from '../img/shijian.png';
@ -19,6 +19,7 @@ function NewsList(props){
const [ hostList , setHotList ] = useState(undefined);
const [ mainList , setMainList ] = useState(undefined);
const [ details , setDetails ] = useState(undefined);
const [ menuSpin , setMenuSpin ] = useState(true);
useEffect(()=>{
if(deptId && cateId){
@ -28,6 +29,7 @@ function NewsList(props){
useEffect(()=>{
if(deptId && cateId){
setMenuSpin(true);
getMainList();
getHotList();
getColumnList();
@ -50,6 +52,7 @@ function NewsList(props){
if(result){
setColumnList(result.data.rows);
setTotal(result.data.total);
setMenuSpin(false);
}
}).catch(error=>{})
}
@ -90,20 +93,22 @@ function NewsList(props){
</Breadcrumb>
<p className="in_title mb30">{details && details.name}</p>
<Box>
{
columnList && columnList.length>0 &&
<Spin spinning={menuSpin}>
<div className="column_menu">
<Menu selectedKeys={[cateId]}>
{
columnList.map((i,k)=>{
return(
<Menu.Item key={i.id} value={i.id} ><Link to={`/information/${deptId}/news/${i.id}`}>{i.name}</Link></Menu.Item>
)
})
}
</Menu>
{
columnList && columnList.length>0 &&
<Menu selectedKeys={[cateId]}>
{
columnList.map((i,k)=>{
return(
<Menu.Item key={i.id} value={i.id} ><Link to={`/information/${deptId}/news/${i.id}`}>{i.name}</Link></Menu.Item>
)
})
}
</Menu>
}
</div>
}
</Spin>
<div className="column_content">
<LongWidth>
<div className="main_card">

View File

@ -112,7 +112,7 @@ function ProjectSource(props){
{i.projectProperties && <img src={i.projectProperties.authorImageUrl} alt="" className="author_img"/> }
<div style={{flex:"1"}}>
<p className="in_b_main">
<Link to={i.projectURL}>{i.fullName}</Link>
<a onClick={()=>window.open(i.projectURL)}>{i.fullName}</a>
{
i.projectProperties &&
<ul>

View File

@ -0,0 +1,14 @@
import React from 'react';
function ZoneVIP(props){
const { deptId } = props.match.params;
return(
<div className="boxmain zone_VIP_box">
<p className="in_title">专区会员</p>
<p className="vip_sub_title">社区根据您的贡献与扮演角色将用户划分成为不同的人员团队并构建会员成长体系您有兴趣成为会员尽情发挥创意与智慧与专区共同成长吗</p>
</div>
)
}
export default ZoneVIP;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -13,6 +13,10 @@ import PublicBanner from "./Component/publicBanner";
import { isDev } from 'educoder';
import './index.scss';
const VIP = Loadable({
loader: () => import("./Pages/zoneVIP"),
loading: Loading,
});
const HeaderPage = Loadable({
loader: () => import("./Pages/headerPage"),
loading: Loading,
@ -87,6 +91,12 @@ function Index(props){
<NewsDetail {...props} {...p}/>
)}
></Route>
<Route
path="/information/:deptId/VIP"
render={(p) => (
<VIP {...props} {...p}/>
)}
></Route>
<Route
path="/information/:deptId/projects"
render={(p) => (

View File

@ -1,5 +1,6 @@
.information_main{
background-color:#f3f5f8;
min-height: 100vh;
.ant-breadcrumb{
font-size: 15px;
margin-bottom: 20px;
@ -673,15 +674,17 @@
}
.zone_contributor{
min-height: 466px;
background-image: url(./img/productBg2.png);
background-size: 100% 100%;
// background-image: url(./img/productBg2.png);
// background-size: 100% 100%;
background-color: #F7F9FC;
width: 100%;
padding:44px 0px 58px;
padding:44px 0px 30px;
.zone_c_lists{
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);
@ -691,6 +694,7 @@
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 30px!important;
&>img{
width: 80px;
height: 80px;
@ -747,4 +751,15 @@
}
}
}
}
.zone_VIP_box{
padding:50px 0px;
.vip_sub_title{
color:#1f2329;
font-size:15px;
line-height:27px;
text-align:center;
margin-top: 16px;
max-width: 1000px;
}
}