组织-新增地址和网址的显示

This commit is contained in:
caishi 2021-04-26 16:17:21 +08:00
parent 0636e0a925
commit 2bd6f9cb1e
2 changed files with 11 additions and 5 deletions

View File

@ -3,7 +3,7 @@ import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import './Component.scss';
function Cards({img , title, desc , rightBtn , src}){
function Cards({img , title, desc , rightBtn , src , bottomInfos}){
return(
<div className="cards">
{img &&<div className="img"><img src={getImageUrl(`/${img}`)} alt=""/></div>}
@ -15,6 +15,7 @@ function Cards({img , title, desc , rightBtn , src}){
<div className="desc">
{desc}
</div>
{bottomInfos}
</div>
</div>
)

View File

@ -83,10 +83,9 @@ function Detail(props){
img={detail.avatar_url}
rightBtn={
<React.Fragment>
{flag && !buttonflag && detail.is_admin ? <AlignCenter className="color-blue">
<Link to={`/organize/${OIdentifier}/setting`} className="color-blue">设置</Link>
<i className="iconfont icon-shezhi2 ml3"></i>
</AlignCenter> :""}
{flag && !buttonflag && detail.is_admin ?
<Link to={`/organize/${OIdentifier}/setting`} className="color-blue ml10 font-14">设置<i className="iconfont icon-shezhi2 ml3 fr"></i></Link>
:""}
{buttonflag &&
<span className="subNavs">
<Link to={`/organize/${OIdentifier}/member`} className={pathname ===`/organize/${OIdentifier}/member` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
@ -95,6 +94,12 @@ function Detail(props){
}
</React.Fragment>
}
bottomInfos={
!buttonflag && <div>
<span className="color-grey-6"><i className="iconfont icon-weizhi mr3 font-16 color-grey-6"></i>{detail.location}</span>
<a href={detail.website} target="_blank" className="ml20 color-grey-6"><i className="iconfont icon-lianjie mr3 font-14"></i>{detail.website}</a>
</div>
}
/>
}
<Switch {...props}>