|
|
|
@ -33,17 +33,13 @@ function codesuccess() {
|
|
|
|
|
class PersonalCompetititem extends React.Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props)
|
|
|
|
|
this.state = {
|
|
|
|
|
data: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
// // ////console.log(this.props.data)
|
|
|
|
|
this.setState({
|
|
|
|
|
data: this.props.data,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -55,7 +51,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {data} = this.props;
|
|
|
|
|
const {key, item} = this.props;
|
|
|
|
|
// ////console.log("PersonalCompetititem");
|
|
|
|
|
// ////console.log(data);
|
|
|
|
|
// ////console.log(data[0]);
|
|
|
|
@ -68,12 +64,14 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
data && data[0] ? <div className={"yslborderbottom"}>
|
|
|
|
|
<div className="regitem" style={{
|
|
|
|
|
item !== undefined || item !== null ? <div className={"yslborderbottom"}>
|
|
|
|
|
<div
|
|
|
|
|
className={this.props.key === undefined || this.props.key === null ? "myregitem11" : this.props.key === 0 ? "regitem" : "myregitem11"}
|
|
|
|
|
style={{
|
|
|
|
|
marginBottom: "19px",
|
|
|
|
|
}}>
|
|
|
|
|
<div className="regitemimg1 ">
|
|
|
|
|
<img className="regitemimg2" src={getImageUrl("images/" + data[0].creator.image_url)}>
|
|
|
|
|
<img className="regitemimg2" src={getImageUrl("images/" + item.creator.image_url)}>
|
|
|
|
|
|
|
|
|
|
</img>
|
|
|
|
|
<p className="" style={{
|
|
|
|
@ -82,7 +80,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
width: "78px",
|
|
|
|
|
textAlign: "center"
|
|
|
|
|
|
|
|
|
|
}}>{data[0].creator.name}</p>
|
|
|
|
|
}}>{item.creator.name}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className=" " style={{
|
|
|
|
|
marginTop: "29px",
|
|
|
|
@ -94,7 +92,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
width: "160px",
|
|
|
|
|
textAlign: "center"
|
|
|
|
|
}}>{data[0].name}</p>
|
|
|
|
|
}}>{item.name}</p>
|
|
|
|
|
</div>
|
|
|
|
|
{this.props.type === 5 || this.props.type === 2 ?
|
|
|
|
|
<div className=" " style={{
|
|
|
|
@ -104,7 +102,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
width: "357px"
|
|
|
|
|
}}>
|
|
|
|
|
{
|
|
|
|
|
data && data[0].team_members.map((item, index) => {
|
|
|
|
|
item && item.team_members.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
index === 0 ?
|
|
|
|
@ -143,7 +141,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
width: "487px"
|
|
|
|
|
}}>
|
|
|
|
|
{
|
|
|
|
|
data && data[0].team_members.map((item, index) => {
|
|
|
|
|
item && item.team_members.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
index === 0 ?
|
|
|
|
@ -199,7 +197,7 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
|
|
|
|
|
color: "#05101A",
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
}}>{data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}</span>
|
|
|
|
|
}}>{item.invite_code === null || item.invite_code === undefined ? "" : item.invite_code}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
@ -207,10 +205,10 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
width: "1px"
|
|
|
|
|
}}>
|
|
|
|
|
<input id="copy_invite_code"
|
|
|
|
|
value={data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}/>
|
|
|
|
|
value={item.invite_code === null || item.invite_code === undefined ? "" : item.invite_code}/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{data[0].invite_code === null || data[0].invite_code === undefined ?
|
|
|
|
|
{item.invite_code === null || item.invite_code === undefined ?
|
|
|
|
|
<i className="regitemimgs3 iconfont icon-fuzhi1 font-14 font-n"
|
|
|
|
|
style={{
|
|
|
|
|
marginLeft: "18px",
|
|
|
|
@ -239,18 +237,18 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div className="regitemimgs555">
|
|
|
|
|
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${data[0].id}`} style={{
|
|
|
|
|
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${item.id}`} style={{
|
|
|
|
|
color: "#459be5",
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
lineHeight: "39px",
|
|
|
|
|
}}>战队详情</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>删除战队</p>
|
|
|
|
|
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(item.id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(item.id, false)}>删除战队</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(data[0])}>
|
|
|
|
|
<p onClick={() => this.props.Createateamedit(data[0])}>编辑战队</p>
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(item)}>
|
|
|
|
|
<p onClick={() => this.props.Createateamedit(item)}>编辑战队</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -262,18 +260,18 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<div className="regitemimgs555">
|
|
|
|
|
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${data[0].id}`} style={{
|
|
|
|
|
<a href={`/newcompetitions/${"gcc-course-2019"}/competition_teams/${item.id}`} style={{
|
|
|
|
|
color: "#459be5",
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
lineHeight: "39px",
|
|
|
|
|
}}>战队详情</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>删除战队</p>
|
|
|
|
|
<div className="regitemimgs555" onClick={() => this.props.Exittheteamshow(item.id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(item.id, false)}>删除战队</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(data[0])}>
|
|
|
|
|
<p onClick={() => this.props.Createateamedit(data[0])}>编辑战队</p>
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Createateamedit(item)}>
|
|
|
|
|
<p onClick={() => this.props.Createateamedit(item)}>编辑战队</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
@ -284,8 +282,8 @@ class PersonalCompetititem extends React.Component {
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Exittheteamshow(data[0].id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(data[0].id, false)}>退出战队</p>
|
|
|
|
|
<div className="regitemimgs6" onClick={() => this.props.Exittheteamshow(item.id, false)}>
|
|
|
|
|
<p onClick={() => this.props.Exittheteamshow(item.id, false)}>退出战队</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|