用户 url

This commit is contained in:
caishi 2021-02-03 17:00:46 +08:00
parent 7a8cbac912
commit daa5cc212c
6 changed files with 14 additions and 11 deletions

View File

@ -4,6 +4,7 @@ import { Button } from 'antd';
import styled from 'styled-components';
import FocusButton from "../UsersList/focus_button";
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
const Img = styled.img`{
border-radius:50%;
@ -39,12 +40,12 @@ const Div = styled.div`{
align-items: center;
border:1px solid #eee;
}`
export default (({ img, name, time, focusStatus, is_current_user, login , successFunc }) => {
export default (({ user , img, name, time, focusStatus, is_current_user, login , successFunc }) => {
return (
<Div>
<Img src={getImageUrl(`images/${img}`)} />
<Link to={`/users/${user && user.login}`}><Img src={getImageUrl(`images/${img}`)} /></Link>
<div className="m-infos">
<Name>{name}</Name>
<Link to={`/users/${user && user.login}`}><Name>{name}</Name></Link>
<Time><I className="iconfont icon-shijian"></I>加入时间:{time}</Time>
{
is_current_user ?

View File

@ -72,9 +72,9 @@ function RightBox({ OIdentifier , history }) {
memberData.organization_users.map((item,key)=>{
return(
<div className="teammembers" key={key}>
<Img src={getImageUrl(`images/${item.user && item.user.image_url}`)} alt="" className="m-img"/>
<Link to={`/users/${item.user && item.user.login}`}><Img src={getImageUrl(`images/${item.user && item.user.image_url}`)} alt="" className="m-img"/></Link>
<div>
<ListName>{item.user && item.user.name}</ListName>
<Link to={`/users/${item.user && item.user.login}`}><ListName>{item.user && item.user.name}</ListName></Link>
<Align><i className="iconfont icon-shijian color-green mr3 font-13"></i><Span>加入时间{item.created_at}</Span></Align>
</div>
</div>

View File

@ -85,7 +85,7 @@ function TeamSettingGroup({organizeDetail,history}){
{
item.users && item.users.map((i,k)=>{
return(
<ImgContent key={k} src={getImageUrl(`images/${i.image_url}`)}/>
<Link to={`/users/${i.login}`}><ImgContent title={i.name} key={k} src={getImageUrl(`images/${i.image_url}`)}/></Link>
)
})
}

View File

@ -1,11 +1,12 @@
import React, { useEffect, useState } from 'react';
import { WhiteBack , FlexAJ } from '../../Component/layout';
import { Menu , Table , Pagination , Icon , Tooltip , Popconfirm } from 'antd';
import { Table , Pagination , Popconfirm } from 'antd';
import Title from '../../Component/Title';
import Search from '../../Component/Search';
import styled from 'styled-components';
import { getImageUrl } from 'educoder';
import axios from 'axios';
import { Link } from 'react-router-dom';
const Img = styled.img`{
width:30px;
@ -63,7 +64,7 @@ export default (({organizeDetail})=>{
width:"5%",
render:(value)=>{
return(
value && <Img src={getImageUrl('images/'+value.image_url)}></Img>
value && <Link to={`/users/${value && value.login}`}><Img src={getImageUrl('images/'+value.image_url)}></Img> </Link>
)
}
},
@ -72,7 +73,7 @@ export default (({organizeDetail})=>{
dataIndex: 'user',
width:"15%",
render:(value,item)=>{
return value && value.name
return <Link to={`/users/${value && value.login}`}>{value && value.name}</Link>
}
},
{

View File

@ -76,7 +76,7 @@ function TeamGroup({organizeDetail,current_user}){
{
item.users && item.users.map((i,k)=>{
return(
<ImgContent src={getImageUrl(`images/${i.image_url}`)}/>
<Link to={`/users/${i.login}`}><ImgContent src={getImageUrl(`images/${i.image_url}`)} title={i.name}/></Link>
)
})
}

View File

@ -38,7 +38,8 @@ function TeamMember({organizeDetail,current_user}){
{
list.map((item,key)=>{
return(
item.user && <Cards
item.user && <Cards
user={item.user}
img={item.user.image_url}
name={item.user.name}
time={item.created_at}