Merge branch 'gitlink_ssr_head' into pre_gitlink_ssr
This commit is contained in:
commit
42709ee3f6
|
|
@ -1,17 +1,39 @@
|
|||
import React from 'react';
|
||||
import React,{useCallback, useEffect,useState} 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';
|
||||
import { Input } from 'antd';
|
||||
const { Search } = Input;
|
||||
|
||||
function Member(props) {
|
||||
const { vipLists, temp } = props;
|
||||
const { vipLists, temp , deptId } = props;
|
||||
const isUOS = deptId === "uos";//id===91:泛在的开发社区成员,定制
|
||||
const [ list , setList ] = useState(vipLists);
|
||||
|
||||
useEffect(()=>{
|
||||
if(vipLists && vipLists.length > 0 ){
|
||||
const ele = vipLists.map((i=>{
|
||||
return isUOS && i.id===91 ? {...i,isSearch:i.zoneMemberList.length>0}:{...i}
|
||||
}))
|
||||
setList(ele);
|
||||
}
|
||||
},[vipLists])
|
||||
|
||||
function searchFunc(e,index){
|
||||
let zonelist = vipLists[index].zoneMemberList;
|
||||
let member = e ? zonelist.filter(i=>i.name.indexOf(e)>-1) : zonelist;
|
||||
const ele = list.map((i,k)=>{
|
||||
return k === index ? {...i,zoneMemberList:member} :{...i}
|
||||
})
|
||||
setList(ele);
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="vip_list">
|
||||
{
|
||||
vipLists.map((i,k)=>{
|
||||
list.map((i,k)=>{
|
||||
return(
|
||||
<div className="vip_list_card">
|
||||
<div className="card_title">
|
||||
|
|
@ -23,16 +45,28 @@ function Member(props) {
|
|||
{ temp === tempEnum.zone1 && <div className="linear_gradient">{i.typeName}</div> }
|
||||
</div>
|
||||
</div>
|
||||
<p className="card_desc">{i.typeIntroduction}</p>
|
||||
<div className={`card_desc ${i.isSearch ? "seachCardDesc":""}`}>
|
||||
<p>{i.typeIntroduction}</p>
|
||||
</div>
|
||||
{i.isSearch &&
|
||||
<Search
|
||||
onSearch={(e)=>searchFunc(e,k)}
|
||||
allowClear={true}
|
||||
className='uosSearch'
|
||||
placeholder='请输入单位名称搜索'
|
||||
style={{width:"300px",height:"36px",marginTop:"20px"}}
|
||||
suffix={<i className="iconfont icon-sousuo5 font-15"/>}
|
||||
/>
|
||||
}
|
||||
{
|
||||
i.zoneMemberList && i.zoneMemberList.length > 0 ?
|
||||
<ul className="card_ul">
|
||||
<ul className={`card_ul ${isUOS && i.id === 91 ? "doubleUl" :""}`}>
|
||||
{
|
||||
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>
|
||||
{ !(isUOS && i.id === 91) && <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>
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ function PublicBanner(props) {
|
|||
</p>
|
||||
|
||||
</Fragment>}
|
||||
<p className="sub_t" dangerouslySetInnerHTML={{ __html: data.subTitle }}></p>
|
||||
<p className={`sub_t ${isUOS ?"font-17":""}`} dangerouslySetInnerHTML={{ __html: data.subTitle }}></p>
|
||||
{isNSCC && <div className='mt30'>
|
||||
<a className="zone_apply_but font-16 color-white" onClick={apply}>加入社区<i class="iconfont icon-jiantou3 font-14 ml5"></i></a>
|
||||
</div>}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ function ZoneVIP(props){
|
|||
<Spin spinning={isSpin}>
|
||||
<div style={{minHeight:400}}>
|
||||
{
|
||||
vipLists && (vipLists.length > 0 ? <MemberList vipLists={vipLists} temp={temp}/> : <div style={{marginTop:30,padding:"20px"}}>
|
||||
vipLists && (vipLists.length > 0 ? <MemberList vipLists={vipLists} temp={temp} deptId={deptId}/> : <div style={{marginTop:30,padding:"20px"}}>
|
||||
{
|
||||
temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
}
|
||||
.main_t_uos{
|
||||
width: fit-content;
|
||||
font-size:40px;
|
||||
font-size:44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: jinbuti;
|
||||
|
|
@ -169,8 +169,8 @@
|
|||
margin-left: 18px;
|
||||
}
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
}
|
||||
}
|
||||
.sub_t{
|
||||
|
|
@ -1218,10 +1218,30 @@
|
|||
line-height:32px;
|
||||
word-break: break-all;
|
||||
margin-top: 32px;
|
||||
&.seachCardDesc{
|
||||
position: relative;
|
||||
.ant-input-search{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.card_ul{
|
||||
margin-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
&.doubleUl{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
margin-top: 0px;
|
||||
.card_u_li{
|
||||
width: 49%;
|
||||
&:last-child .card_u_wrap{
|
||||
border-bottom: 1px dashed rgba(141, 149, 172,0.27);
|
||||
}
|
||||
}
|
||||
}
|
||||
.card_u_li{
|
||||
&:last-child .card_u_wrap{
|
||||
border-bottom: none;
|
||||
|
|
@ -1264,6 +1284,7 @@
|
|||
background-color:rgba(70, 106, 255, 0.13);
|
||||
border-radius:2px;
|
||||
min-width: 76px;
|
||||
padding:0px 10px;
|
||||
text-align: center;
|
||||
line-height: 26px;
|
||||
color:#466aff;
|
||||
|
|
@ -2028,6 +2049,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.uosSearch{
|
||||
.ant-input-suffix{
|
||||
background-color: unset;
|
||||
.anticon{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.NSCC_source_box{
|
||||
background-image: url('./img/source-bg.png');
|
||||
background-size: 100% 100%;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ class Infos extends Component {
|
|||
route_type: undefined,
|
||||
undo_events:0,
|
||||
menuKey:"6",
|
||||
avatarVisible:false
|
||||
avatarVisible:false,
|
||||
user_project_count:0
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -387,7 +388,12 @@ class Infos extends Component {
|
|||
}
|
||||
<Menu.Item key="0"><Link to={`/${user && user.login}`} onClick={()=>this.chooseTab("0")}><i className="iconfont icon-gailan"></i>活动概览</Link></Menu.Item>
|
||||
<Menu.Item key="1"><Link to={`/${user && user.login}/statistics`}><i className="iconfont icon-shujutongji"></i>数据统计</Link></Menu.Item>
|
||||
<Menu.Item key="2"><Link to={`/${user && user.login}/projects`}><i className="iconfont icon-xiangmu"></i>参与项目</Link></Menu.Item>
|
||||
<Menu.Item key="2">
|
||||
<Link to={`/${user && user.login}/projects`}>
|
||||
<i className="iconfont icon-xiangmu"></i>参与项目
|
||||
{ user && user.user_projects_count > 0 ? <span className="menuNum">({user.user_projects_count})</span> :"" }
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
{
|
||||
current_user && user && user.login === current_user.login ?
|
||||
<Menu.Item key="3">
|
||||
|
|
|
|||
Loading…
Reference in New Issue