From 5f0699aa73d57a0947c1e8d217be69d2c3f4226b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 24 Oct 2019 11:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../educoder/competitions}/courses.jpg | Bin .../educoder/competitions}/groups1.png | Bin .../educoder/competitions}/groups2.png | Bin .../educoder/competitions}/groups3.png | Bin .../Competitimain/CompetitionsIndex.js | 39 +++++++++++++----- .../Competitimain/Competitionsindex.css | 21 ++++++---- 6 files changed, 41 insertions(+), 19 deletions(-) rename public/{react/src/modules/competitions/Competitimain => images/educoder/competitions}/courses.jpg (100%) rename public/{react/src/modules/competitions/Competitimain => images/educoder/competitions}/groups1.png (100%) rename public/{react/src/modules/competitions/Competitimain => images/educoder/competitions}/groups2.png (100%) rename public/{react/src/modules/competitions/Competitimain => images/educoder/competitions}/groups3.png (100%) diff --git a/public/react/src/modules/competitions/Competitimain/courses.jpg b/public/images/educoder/competitions/courses.jpg similarity index 100% rename from public/react/src/modules/competitions/Competitimain/courses.jpg rename to public/images/educoder/competitions/courses.jpg diff --git a/public/react/src/modules/competitions/Competitimain/groups1.png b/public/images/educoder/competitions/groups1.png similarity index 100% rename from public/react/src/modules/competitions/Competitimain/groups1.png rename to public/images/educoder/competitions/groups1.png diff --git a/public/react/src/modules/competitions/Competitimain/groups2.png b/public/images/educoder/competitions/groups2.png similarity index 100% rename from public/react/src/modules/competitions/Competitimain/groups2.png rename to public/images/educoder/competitions/groups2.png diff --git a/public/react/src/modules/competitions/Competitimain/groups3.png b/public/images/educoder/competitions/groups3.png similarity index 100% rename from public/react/src/modules/competitions/Competitimain/groups3.png rename to public/images/educoder/competitions/groups3.png diff --git a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js index a09a95d4d..1a43bbe4c 100644 --- a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js +++ b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js @@ -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{
+
@@ -124,7 +143,7 @@ class CompetitionsIndex extends Component{ ` } - :""} + 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`):""} /> + />} {datas===undefined?'none':datas.task_count >20 ?
diff --git a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css index 1c400621e..61fc568aa 100644 --- a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css +++ b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css @@ -1,13 +1,5 @@ .teamsLayout{background: transparent !important;} -.courses-head{ - width: 100%; - height: 300px; - background-image: url(./courses.jpg); - background-color: #081C4B; - background-size: cover; - background-position: center; - background-repeat: no-repeat; -} + .competitionstitle{ height:50px !important; border-radius: 6px; @@ -115,4 +107,15 @@ } .endedfont{ color:#000 !important; +} +.zhezhaos{ + + height: 200px; + overflow: hidden; + position: relative; + border: 1px solid rgb(235, 237, 240); + border-radius: 2px; + padding: 48px; + text-align: center; + background: rgb(250, 250, 250); } \ No newline at end of file