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{