|
|
|
@ -1,14 +1,10 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
import { Menu, Icon, List, Avatar,Row, Col,Tag,Pagination} from 'antd';
|
|
|
|
|
import {getImageUrl} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import './Competitionsindex.css';
|
|
|
|
|
import NoneData from "../../courses/shixunHomework/shixunHomework";
|
|
|
|
|
import groups1 from './groups1.png';
|
|
|
|
|
import groups2 from './groups2.png';
|
|
|
|
|
import groups3 from './groups3.png';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import NoneData from "../../courses/coursesPublic/NoneData";
|
|
|
|
|
|
|
|
|
|
const { SubMenu } = Menu;
|
|
|
|
|
|
|
|
|
@ -42,7 +38,7 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
axios.get(Url,{params:{
|
|
|
|
|
category:category,
|
|
|
|
|
page:page,
|
|
|
|
|
per_page:20,
|
|
|
|
|
per_page:15,
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if(response.status===200){
|
|
|
|
@ -72,6 +68,14 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
this.props.history.replace(url);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PaginationCourse=(pageNumber)=>{
|
|
|
|
|
let {category}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
page: pageNumber,
|
|
|
|
|
})
|
|
|
|
|
this.getdata(category,pageNumber);
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {datas,page,count}=this.state;
|
|
|
|
|
|
|
|
|
@ -82,6 +86,21 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<div>
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.courses-head{
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 300px;
|
|
|
|
|
background-image: url(`getImageUrl(`images/educoder/competitions/courses.png`)`);
|
|
|
|
|
background-color: #081C4B;
|
|
|
|
|
background-size: cover;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="courses-head pr">
|
|
|
|
|
<div className="edu-txt-center pathNavLine">
|
|
|
|
|
<div className="inline path-nav"></div>
|
|
|
|
@ -124,7 +143,7 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<List
|
|
|
|
|
{datas===undefined?"":datas.length===0?"":<List
|
|
|
|
|
itemLayout="vertical"
|
|
|
|
|
size="large"
|
|
|
|
|
dataSource={datas&&datas}
|
|
|
|
@ -141,7 +160,7 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
}
|
|
|
|
|
</style>:""}
|
|
|
|
|
<img className={"competitonimg"}
|
|
|
|
|
src={item.competition_status==="ended"?groups1:item.competition_status==="nearly_published"?groups2:item.competition_status==="progressing"?groups3:""} />
|
|
|
|
|
src={item.competition_status==="ended"?getImageUrl(`images/educoder/competitions/groups1.png`):item.competition_status==="nearly_published"?getImageUrl(`images/educoder/competitions/groups2.png`):item.competition_status==="progressing"?getImageUrl(`images/educoder/competitions/groups3.png`):""} />
|
|
|
|
|
<List.Item
|
|
|
|
|
key={key}
|
|
|
|
|
actions={[
|
|
|
|
@ -193,7 +212,7 @@ class CompetitionsIndex extends Component{
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
/>}
|
|
|
|
|
|
|
|
|
|
{datas===undefined?'none':datas.task_count >20 ?<div className="mb40 edu-txt-center padding20-30"
|
|
|
|
|
>
|
|
|
|
|