微调样式

This commit is contained in:
何童崇 2022-03-30 10:47:27 +08:00
parent 42b0a5dfad
commit 9b29599aef
3 changed files with 13 additions and 7 deletions

View File

@ -103,6 +103,9 @@ const Qz2022 = (props) => {
applyStatus = Date.parse(new Date()) < Date.parse(new Date(qzDetail.enroll_date));
referStatus = !applyStatus && Date.parse(new Date()) < Date.parse(new Date(qzDetail.upload_date));
}
console.log(qzDetail);
return (
<React.Fragment>
{/* banner图+选项 */}
@ -152,7 +155,7 @@ const Qz2022 = (props) => {
{/* 大赛介绍 */}
<Route path="/competition/qz2022/introduce"
render={
() => (<Introduce {...props} qzDetail={qzDetail||{}} />)
() => (<Introduce {...props} qzDetail={qzDetail} />)
}
></Route>
{/* 大赛指南 */}
@ -218,7 +221,7 @@ const Qz2022 = (props) => {
{/* 大赛介绍 */}
<Route path="/competition/qz2022"
render={
() => (<Introduce {...props} />)
() => (<Introduce {...props} qzDetail={qzDetail}/>)
}
></Route>
</Switch>

View File

@ -5,14 +5,17 @@ import '../../index.scss';
function Introduce({ qzDetail }) {
let { content, video_url } = qzDetail;
let content= qzDetail&&qzDetail.content;
let video_url= qzDetail&&qzDetail.video_url;
console.log(qzDetail);
return (
<div className="introduce">
<div className="introduce-content clearfix">
<div className="introduce-video"><video src={video_url} autoPlay controls muted></video></div>
<div className="introduce-info">
<div className="info-content" dangerouslySetInnerHTML={{ __html:content||''}}>
<div className="info-tit">启智2022作战概念·JSJSJS需求创新大赛</div>
<div className="info-content" dangerouslySetInnerHTML={{ __html:content}}>
</div>
</div>

View File

@ -9,7 +9,7 @@
width: 62.5%;
height: 100%;
margin: 0 auto;
padding: 5% 2% 5% 2.5%;
padding: 2.75% 2% 5% 2.5%;
box-sizing: border-box;
}
.introduce-video {
@ -27,17 +27,17 @@
.introduce-info {
display: flex;
flex-direction: column;
justify-content: space-around;
justify-content: center;
min-width: 35%;
min-height: 75%;
}
.info-tit {
font-family: PingFang SC;
font-weight: 700;
color: #2e3341;
font-size: 1.25rem;
letter-spacing: 0.1rem;
margin-bottom: 1rem;
}
.content-item {
font-size: 1rem;