forked from Gitlink/forgeplus-react
Merge branch 'feature_news' of https://gitlink.org.cn/durian/forgeplus-react into gitlink_server
This commit is contained in:
commit
0eb93afe3b
|
@ -0,0 +1,58 @@
|
|||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { tempEnum } from '../tempInfo';
|
||||
import Crown from '../img/crown.png';
|
||||
import Nodata from '../../Nodata';
|
||||
import nodata from '../img/nodata.png';
|
||||
|
||||
function Member(props) {
|
||||
const { vipLists, temp } = props;
|
||||
|
||||
return(
|
||||
<div className="vip_list">
|
||||
{
|
||||
vipLists.map((i,k)=>{
|
||||
return(
|
||||
<div className="vip_list_card">
|
||||
<div className="card_title">
|
||||
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
|
||||
<div>
|
||||
<div>
|
||||
{i.typeName}
|
||||
</div>
|
||||
{ temp === tempEnum.zone1 && <div className="linear_gradient">{i.typeName}</div> }
|
||||
</div>
|
||||
</div>
|
||||
<p className="card_desc">{i.typeIntroduction}</p>
|
||||
{
|
||||
i.zoneMemberList && i.zoneMemberList.length > 0 ?
|
||||
<ul className="card_ul">
|
||||
{
|
||||
i.zoneMemberList.map((j,key)=>{
|
||||
return(
|
||||
<li className="card_u_li">
|
||||
<div className="card_u_wrap">
|
||||
<Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link>
|
||||
<div className="card_u_info">
|
||||
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
|
||||
<p className="card_u_down task-hide-2">{j.introduction}</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
:
|
||||
(
|
||||
temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Member;
|
|
@ -4,10 +4,12 @@ import { httpUrl } from '../fetch';
|
|||
import { Link } from 'react-router-dom';
|
||||
import shijian from '../img/shijian.png';
|
||||
import xuexi from '../img/xuexiguanli.png';
|
||||
import { getHomePageList, gethomePageDocList, getAllList, getNewsAllList } from '../api';
|
||||
import { getHomePageList, gethomePageDocList, getAllList, getNewsAllList, getVIPLists } from '../api';
|
||||
import axios from 'axios';
|
||||
import Partner from '../Component/partner';
|
||||
import MemberList from '../Component/memberList';
|
||||
import '../indexZonebyCCF.scss';
|
||||
import '../indexZone1.scss';
|
||||
import "slick-carousel/slick/slick.css";
|
||||
import "slick-carousel/slick/slick-theme.css";
|
||||
import Slider from 'react-slick';
|
||||
|
@ -49,11 +51,19 @@ function HeaderPageCCF(props) {
|
|||
}, [id,cateId])
|
||||
|
||||
function getPersonList() {
|
||||
getHomePageList(id).then(result => {
|
||||
if (result) {
|
||||
setPersonList(result.data.rows);
|
||||
}
|
||||
}).catch(error => { })
|
||||
// 不分类
|
||||
// getHomePageList(id).then(result => {
|
||||
// if (result) {
|
||||
// setPersonList(result.data.rows);
|
||||
// }
|
||||
// }).catch(error => { })
|
||||
// 分类获取首页推荐的会员列表
|
||||
getVIPLists(id, {isHomepage: 1}).then(response=>{
|
||||
if(response){
|
||||
const list = response.data.rows && response.data.rows.filter(item=>item.zoneMemberList);
|
||||
setPersonList(list);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getNewsList() {
|
||||
|
@ -100,7 +110,7 @@ function HeaderPageCCF(props) {
|
|||
}).catch(error => { })
|
||||
}
|
||||
return (
|
||||
<div className="zone_box">
|
||||
<div className="zone_box pb100">
|
||||
{
|
||||
// 新闻动态
|
||||
data && data.cmsShow === 1 && newsList && newsList.length >= 0 &&
|
||||
|
@ -115,7 +125,7 @@ function HeaderPageCCF(props) {
|
|||
return (
|
||||
<div className="regform" key={k}>
|
||||
<div className="newsBannerBox">
|
||||
<img src={i.headImg || img1} alt="" width="785px" style={{objectFit: "cover"}} onClick={()=>{window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
|
||||
<img src={i.headImg || img1} alt="" className='newsImg' onClick={()=>{window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -232,9 +242,10 @@ function HeaderPageCCF(props) {
|
|||
{
|
||||
// 核心贡献者
|
||||
data && data.memberShow === 1 && personList && personList.length > 0 &&
|
||||
<div className="zone_contributor">
|
||||
<div className={`zone_contributor boxmain ${temp}_VIP_box`}>
|
||||
<p className="in_title">{data.homepageMemberTitle}</p>
|
||||
{
|
||||
<MemberList vipLists={personList} temp={temp}/>
|
||||
{/* {
|
||||
<ul className="boxmain zone_c_lists">
|
||||
{
|
||||
personList.map((i, k) => {
|
||||
|
@ -248,7 +259,7 @@ function HeaderPageCCF(props) {
|
|||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
} */}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import { tempConfig, tempEnum } from '../tempInfo'
|
|||
import MemberApply from '../Component/memberApply';
|
||||
import { getVIPLists, getAuditStatus, applyJoin } from '../api';
|
||||
import nodata from '../img/nodata.png';
|
||||
import MemberList from '../Component/memberList';
|
||||
|
||||
import '../indexZone1.scss';
|
||||
|
||||
|
@ -43,7 +44,6 @@ function ZoneVIP(props){
|
|||
|
||||
function getMemberStatus() {
|
||||
getAuditStatus(id).then(res => {
|
||||
console.log(res)
|
||||
if (res && res.data && res.data.code === 200) {
|
||||
setMemberStatus(res.data.data)
|
||||
} else {
|
||||
|
@ -83,58 +83,9 @@ function ZoneVIP(props){
|
|||
<Spin spinning={isSpin}>
|
||||
<div style={{minHeight:400}}>
|
||||
{
|
||||
vipLists && vipLists.length> 0 &&
|
||||
<div className="vip_list">
|
||||
{
|
||||
vipLists.map((i,k)=>{
|
||||
return(
|
||||
<div className="vip_list_card">
|
||||
<div className="card_title">
|
||||
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
|
||||
<div>
|
||||
<div>
|
||||
{i.typeName}
|
||||
</div>
|
||||
{ temp === tempEnum.zone1 && <div className="linear_gradient">{i.typeName}</div> }
|
||||
</div>
|
||||
</div>
|
||||
<p className="card_desc">{i.typeIntroduction}</p>
|
||||
{
|
||||
i.zoneMemberList && i.zoneMemberList.length > 0 ?
|
||||
<ul className="card_ul">
|
||||
{
|
||||
i.zoneMemberList.map((j,key)=>{
|
||||
return(
|
||||
|
||||
<li className="card_u_li">
|
||||
<div className="card_u_wrap">
|
||||
<Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link>
|
||||
<div className="card_u_info">
|
||||
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
|
||||
<p className="card_u_down task-hide-2">{j.introduction}</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
:
|
||||
(
|
||||
temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
{
|
||||
vipLists && vipLists.length === 0 &&
|
||||
<div style={{marginTop:30,backgroundColor:"#fff",padding:"20px"}}>
|
||||
vipLists && (vipLists.length > 0 ? <MemberList vipLists={vipLists} temp={temp}/> : <div style={{marginTop:30,backgroundColor:"#fff",padding:"20px"}}>
|
||||
<Nodata _html={"暂无数据"}/>
|
||||
</div>
|
||||
</div>)
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
|
|
|
@ -76,10 +76,11 @@ export function getProjectsTypeLists(id){
|
|||
})
|
||||
}
|
||||
/**专区会员 */
|
||||
export function getVIPLists(id){
|
||||
export function getVIPLists(id, params){
|
||||
return fetch({
|
||||
url:`/zone/open/${id}/member/overviewList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -20,19 +20,17 @@
|
|||
|
||||
div {
|
||||
height: 100%;
|
||||
|
||||
.regform {
|
||||
img {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
.newsBannerBox{
|
||||
height: 595px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
.newsImg{
|
||||
width: 785px;
|
||||
height: 590px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +80,7 @@
|
|||
text-align: left;
|
||||
left: 50%;
|
||||
margin-left: -115px;
|
||||
bottom: 20%;
|
||||
bottom: 12%;
|
||||
position: absolute;
|
||||
display: flex !important;
|
||||
z-index: 2;
|
||||
|
@ -158,7 +156,7 @@
|
|||
li {
|
||||
background-color: #fff;
|
||||
width: 385px;
|
||||
padding: 20px !important;
|
||||
padding: 22px 20px 19px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 25px !important;
|
||||
position: relative;
|
||||
|
|
Loading…
Reference in New Issue