diff --git a/src/forge/Information/Component/memberList.jsx b/src/forge/Information/Component/memberList.jsx new file mode 100644 index 00000000..67faf6af --- /dev/null +++ b/src/forge/Information/Component/memberList.jsx @@ -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( +
+ { + vipLists.map((i,k)=>{ + return( +
+
+ +
+
+ {i.typeName} +
+ { temp === tempEnum.zone1 &&
{i.typeName}
} +
+
+

{i.typeIntroduction}

+ { + i.zoneMemberList && i.zoneMemberList.length > 0 ? + + : + ( + temp === tempEnum.zone1 ? : + ) + } +
+ ) + }) + } +
+ ) +} +export default Member; \ No newline at end of file diff --git a/src/forge/Information/Pages/headerPagebyCCF.jsx b/src/forge/Information/Pages/headerPagebyCCF.jsx index 43aef1d6..ddc3f0bc 100644 --- a/src/forge/Information/Pages/headerPagebyCCF.jsx +++ b/src/forge/Information/Pages/headerPagebyCCF.jsx @@ -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 ( -
+
{ // 新闻动态 data && data.cmsShow === 1 && newsList && newsList.length >= 0 && @@ -115,7 +125,7 @@ function HeaderPageCCF(props) { return (
- {window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} /> + {window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
) @@ -232,9 +242,10 @@ function HeaderPageCCF(props) { { // 核心贡献者 data && data.memberShow === 1 && personList && personList.length > 0 && -
+

{data.homepageMemberTitle}

- { + + {/* {
    { personList.map((i, k) => { @@ -248,7 +259,7 @@ function HeaderPageCCF(props) { }) }
- } + } */}
} diff --git a/src/forge/Information/Pages/zoneVIP.jsx b/src/forge/Information/Pages/zoneVIP.jsx index 4541c2c8..c9a37ae6 100644 --- a/src/forge/Information/Pages/zoneVIP.jsx +++ b/src/forge/Information/Pages/zoneVIP.jsx @@ -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){
{ - vipLists && vipLists.length> 0 && -
- { - vipLists.map((i,k)=>{ - return( -
-
- -
-
- {i.typeName} -
- { temp === tempEnum.zone1 &&
{i.typeName}
} -
-
-

{i.typeIntroduction}

- { - i.zoneMemberList && i.zoneMemberList.length > 0 ? -
    - { - i.zoneMemberList.map((j,key)=>{ - return( - -
  • -
    - -
    -
    {j.name}{j.memberLevel && {j.memberLevel} }
    -

    {j.introduction}

    -
    -
    -
  • - ) - }) - } -
- : - ( - temp === tempEnum.zone1 ? : - ) - } -
- ) - }) - } -
- } - { - vipLists && vipLists.length === 0 && -
+ vipLists && (vipLists.length > 0 ? :
-
+
) }
diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js index 80d2f30d..0c8f02b0 100644 --- a/src/forge/Information/api.js +++ b/src/forge/Information/api.js @@ -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 }) } diff --git a/src/forge/Information/indexZonebyCCF.scss b/src/forge/Information/indexZonebyCCF.scss index 8a6874cf..ff65cae0 100644 --- a/src/forge/Information/indexZonebyCCF.scss +++ b/src/forge/Information/indexZonebyCCF.scss @@ -20,19 +20,18 @@ 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: 585px; + position: relative; + z-index: 1; + object-fit: cover; + } } } } @@ -82,7 +81,7 @@ text-align: left; left: 50%; margin-left: -115px; - bottom: 20%; + bottom: 12%; position: absolute; display: flex !important; z-index: 2;