From ed3d8cd4b60e8516e5b4fbc2a4b026ae202dc678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 2 Jan 2020 10:27:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/question/component/Contentpart.js | 1 + .../src/modules/testpaper/Testpaperlibrary.js | 16 ++++++---------- .../modules/testpaper/component/Contentpart.js | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index 50fce4742..dbb1b4817 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -199,6 +199,7 @@ class Contentpart extends Component { : this.props.Contentdata.items.map((object, index) => { return ( this.props.getitem_basketss(id)} getitem_baskets={(e)=>this.props.getitem_baskets(e)} showmodels={(e)=>this.props.showmodels(e)} diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 89768e2fc..6c07032ad 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -97,6 +97,12 @@ class Testpaperlibrary extends Component { this.setState({ keywords: value, }) + var data={ + page:1, + per_page:10, + public:this.state.defaultActiveKey, + } + this.getdata(data); } callback = (key) => { this.setState({ @@ -110,16 +116,6 @@ class Testpaperlibrary extends Component { this.getdata(data); } - //搜索框的内容 - setdatafunsval=()=>{ - - } - -//搜索按钮 - setdatafuns=()=>{ - - } - //获取数据 getdata=(data)=>{ const url = `/examination_banks.json`; diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index 765be880f..042aad2e7 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -37,6 +37,7 @@ class Contentpart extends Component { this.props.history.push('/question'); } + render() { let {page}=this.state; let {defaultActiveKey}=this.props; @@ -189,7 +190,7 @@ class Contentpart extends Component { : this.props.Contentdata.exams.map((object, index) => { return ( - + )