From d6e98b2c25cdcd5eea8ddece866b7a09b3eae519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 8 Nov 2019 15:02:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=91=E5=AE=A2=E6=9D=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/osshackathon/Osshackathon.css | 3 +++ .../src/modules/osshackathon/Osshackathon.js | 26 ++++++++++++++----- .../modules/osshackathon/Osshackathonmodel.js | 4 +-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/osshackathon/Osshackathon.css b/public/react/src/modules/osshackathon/Osshackathon.css index 2bbaa1574..7fecb7d9c 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.css +++ b/public/react/src/modules/osshackathon/Osshackathon.css @@ -42,6 +42,9 @@ font-weight:400; color:rgba(5,16,26,1); line-height:24px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .ant-input::-webkit-input-placeholder{ diff --git a/public/react/src/modules/osshackathon/Osshackathon.js b/public/react/src/modules/osshackathon/Osshackathon.js index aa3b40d4a..9e09aeeec 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.js +++ b/public/react/src/modules/osshackathon/Osshackathon.js @@ -39,14 +39,16 @@ class Osshackathon extends Component { search:search, }}).then((result)=>{ if(result.status==200){ - console.log(result) this.setState({ data:result.data, spinning:false }) + }else{ + this.setState({ + spinning:false + }) } }).catch((error)=>{ - console.log(error); this.setState({ spinning:true }) @@ -92,6 +94,15 @@ class Osshackathon extends Component { Signupentry=(id)=>{ // 用户报名 + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + this.props.confirm({ content: `是否确认报名?`, onOk: () => { @@ -157,7 +168,7 @@ class Osshackathon extends Component { .then((response) => { if (response.data.status == 0) { // {"status":1,"message":"删除成功"} - this.getosshackathonlist() + this.getosshackathonlist(); this.props.showNotification(`删除成功`); } }) @@ -172,6 +183,9 @@ class Osshackathon extends Component { this.setState({ search:value }) + if(value.length>300){ + this.props.showNotification(`搜索字数大于300个字`); + } let {page,limit,search}=this.state; this.getosshackathon(page,limit,value) } @@ -280,7 +294,7 @@ class Osshackathon extends Component { return( - + {item.name} @@ -319,7 +333,7 @@ class Osshackathon extends Component { return( - + {item.name} @@ -346,7 +360,7 @@ class Osshackathon extends Component { - + {item.description} diff --git a/public/react/src/modules/osshackathon/Osshackathonmodel.js b/public/react/src/modules/osshackathon/Osshackathonmodel.js index 296847510..f9d170695 100644 --- a/public/react/src/modules/osshackathon/Osshackathonmodel.js +++ b/public/react/src/modules/osshackathon/Osshackathonmodel.js @@ -100,7 +100,7 @@ class Osshackathonmodel extends Component{ render() { let {textareavaltype}=this.state; // console.log(this.props.tabkey) - console.log(this.props.Osshackathonmodeltype) + // console.log(this.props.Osshackathonmodeltype) return (
@@ -139,7 +139,7 @@ class Osshackathonmodel extends Component{