From 627f1fb838412262e492f049837761cf031604ba 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:41:32 +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 --- .../Competitimain/CompetitionsIndex.js | 30 ++++---------- .../Competitimain/Competitionsindex.css | 11 ++++- .../Competitioncommon/CompetitionCommon.css | 14 ++++--- .../Competitioncommon/CompetitionCommon.js | 40 +++++++++++++++---- 4 files changed, 60 insertions(+), 35 deletions(-) diff --git a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js index ba736e03e..61e6419b7 100644 --- a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js +++ b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js @@ -78,9 +78,9 @@ class CompetitionsIndex extends Component{ } render() { let {datas,page,count}=this.state; - - - + admin: true + business: false + console.log(this.props.current_user&&this.props.current_user.business) return (
@@ -100,7 +100,7 @@ class CompetitionsIndex extends Component{ ` } -
+
@@ -126,22 +126,7 @@ class CompetitionsIndex extends Component{
- + {datas===undefined?"":datas.length===0?"": + title={ this.setcompetitonurl(item.competition_status==="ended"?null:item.competition_status==="nearly_published"?`/newcompetitions/${item.identifier}/common_header`:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null)} + onClick={()=>this.setcompetitonurl(item.competition_status==="ended"?null:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null)} >{item.name}{item.sub_title===null?"":{ item.sub_title }} diff --git a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css index 61fc568aa..c711859c9 100644 --- a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css +++ b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css @@ -14,7 +14,16 @@ background: #fff; width: 1200px; } - +.CompetitionsList{ + position: relative; + max-height: 210px; +} +.competitonimg{ + position: absolute; + right: -5px; + width: 80px; + top: 20px; +} .ant-menu-horizontal { border-bottom:none !important; diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css index e7bd0b0e7..5f6a96173 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css @@ -63,6 +63,7 @@ padding: 20px; background:rgba(255,255,255,1); box-shadow:3px 2px 12px 2px rgba(0,0,0,0.05); + position: relative; } .CompetitionCommonbannerfont{ @@ -92,11 +93,7 @@ color:#05101A; } -.CompetitionCommonbannerfont .competitionbannerdiv:nth-child(4),.CompetitionCommonbannerfont .competitionbannerdiv:nth-child(4) button{ - height: 50px; - background: rgba(76,172,255,1); - border-radius: 4px; -} + .Competitioncolor9b{ color: #9B9B9B; @@ -209,4 +206,11 @@ .Competitiontransparent table{ background: transparent; +} + +.Commonimg{ + position: absolute; + right: -5px; + width:93px; + top: 20px; } \ No newline at end of file diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js index bc9387c08..f3177cece 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js @@ -66,6 +66,8 @@ debugger
+ @@ -96,18 +98,42 @@ debugger
¥{data&&data.bonus}
-
{data&&data.visits_count}
+
{data.competition_status==="nearly_published"?"--":data&&data.visits_count}
-
{data&&data.member_count}
+
{data.competition_status==="nearly_published"?"--":data&&data.member_count}
+ {data.competition_status==="ended"?:} + {data.competition_status==="ended"? + : + 立即报名 + } {data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`} @@ -121,10 +147,10 @@ debugger {data&&data.competition_modules.map((item,key)=>{ return( - {item.module_url===null?this.getrightdata(item.id,item.module_type)}>{item.name}:
this.getrightdata(item.id,item.module_type)}>{item.name}:this.getrightdata(item.id,item.module_type)} + href={item.module_url} + // onClick={()=>this.getrightdata(item.id,item.module_type)} >{item.name}} )