forked from Gitlink/forgeplus-react
我关注的竞赛列表调整样式
This commit is contained in:
parent
7567cb2040
commit
1928e98c9d
|
@ -38,6 +38,7 @@ export default Form.create()(({ form, match, history, current_user, showNotifica
|
|||
identifier: details.identifier,
|
||||
content: details.content,
|
||||
banner_url: details.banner_url,
|
||||
applet_banner_url: details.applet_banner_url,
|
||||
video_url: details.video_url,
|
||||
enroll_template: details.enroll_template,
|
||||
guide: details.guide,
|
||||
|
@ -138,6 +139,10 @@ export default Form.create()(({ form, match, history, current_user, showNotifica
|
|||
setFieldsValue({
|
||||
[key]: `/api/attachments/${info.file.response.id}`
|
||||
})
|
||||
} else if (key === 'applet_banner_url') {
|
||||
setFieldsValue({
|
||||
[key]: `/api/attachments/${info.file.response.id}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +209,6 @@ export default Form.create()(({ form, match, history, current_user, showNotifica
|
|||
<Input placeholder="请输入参赛单位" onBlur={() => { verify("identifier") }} />
|
||||
)}
|
||||
|
||||
|
||||
<Form.Item className="video-box" label="Banner图">
|
||||
<Row gutter={8}>
|
||||
<Col span={12}>
|
||||
|
@ -225,6 +229,26 @@ export default Form.create()(({ form, match, history, current_user, showNotifica
|
|||
</Row>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item className="video-box" label="封面图">
|
||||
<Row gutter={8}>
|
||||
<Col span={12}>
|
||||
{getFieldDecorator('applet_banner_url', {
|
||||
rules: [],
|
||||
})(<Input placeholder="请上传封面图或填写封面图地址" onBlur={() => { verify("video_url") }} />)}
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Upload
|
||||
accept=".png,jpg,.jpeg,.svg"
|
||||
action={getUploadActionUrl()}
|
||||
onChange={(info) => { handleChange(info, 'applet_banner_url') }}
|
||||
showUploadList={false}
|
||||
>
|
||||
<Button className="upload"><Icon type="upload" />上传封面图</Button>
|
||||
</Upload>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item className="video-box" label="视频地址" >
|
||||
<Row gutter={8}>
|
||||
<Col span={12}>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 305 KiB |
|
@ -4,7 +4,6 @@ import { SnackbarHOC, getImageUrl } from "educoder";
|
|||
import { ImageLayerOfCommentHOC } from "../../../modules/page/layers/ImageLayerOfCommentHOC";
|
||||
import { CNotificationHOC } from "../../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../../modules/tpm/TPMIndexHOC";
|
||||
import bg2 from '../image/myfocus1.png';
|
||||
import title1 from '../image/myfocus2.png';
|
||||
import title2 from '../image/myfocus3.png';
|
||||
import {focusCompetitionList} from '../api.js'
|
||||
|
@ -40,8 +39,8 @@ const MyFocusCompetitions = (props) => {
|
|||
item.comState = 3;
|
||||
}
|
||||
}
|
||||
if(item.created_at && item.upload_date){
|
||||
item.comTime = item.created_at.substring(0, 10).replaceAll('-', '.') + '-' + item.upload_date.substring(0, 10).replaceAll('-', '.')
|
||||
if(item.start_at && item.upload_date){
|
||||
item.comTime = item.start_at.substring(0, 10).replaceAll('-', '.') + '-' + item.upload_date.substring(0, 10).replaceAll('-', '.')
|
||||
}
|
||||
item.content = item.content.replaceAll('font-size', '');
|
||||
item.content = item.content.replaceAll('line-height', '');
|
||||
|
@ -53,26 +52,25 @@ const MyFocusCompetitions = (props) => {
|
|||
},[search])
|
||||
|
||||
return (
|
||||
<div className="myFocusBgBox">
|
||||
<img src={bg2} alt="" className="bg2"/>
|
||||
<div className="myFocusBgBox newMain">
|
||||
<div className="myFocusList">
|
||||
<div className="titleMan">
|
||||
<img src={title1} alt="" width={100}/>
|
||||
<img src={title1} alt="" width={80}/>
|
||||
竞赛管理
|
||||
<img src={title2} alt="" width={100}/>
|
||||
<img src={title2} alt="" width={80}/>
|
||||
</div>
|
||||
<div className="searchCom">
|
||||
<div className="font-15 til">我关注的竞赛</div>
|
||||
<Input.Search placeholder="请输入竞赛名称进行搜索" enterButton allowClear onSearch={(e)=>{setSearch(e)}}/>
|
||||
<div className="font-16 til">我关注的竞赛</div>
|
||||
<Input.Search placeholder="请输入竞赛名称进行搜索" enterButton={<i className="iconfont icon-sousuo"></i>} allowClear onSearch={(e)=>{setSearch(e)}}/>
|
||||
<div style={{width: '120px'}}></div>
|
||||
</div>
|
||||
<div className="listBox mt30">
|
||||
{list && list.map((item, index)=>{
|
||||
return <div className="flexBox itemBoxCom" key={index}>
|
||||
{item.banner_url && <div className="comImgBox mr20"><img src={mygetHelmetapi.current_main_site_url + item.banner_url} alt=""/></div>}
|
||||
{item.banner_url && <div className="comImgBox mr20"><img src={mygetHelmetapi.current_main_site_url + `${item.applet_banner_url ? item.applet_banner_url : item.banner_url}`} alt=""/></div>}
|
||||
<div className="contCom">
|
||||
<a className="title font-20" href={`/competition/${item.identifier}`}>{item.title}</a>
|
||||
<RenderHtml className="comContentIntro font-14" value={item.content}/>
|
||||
<RenderHtml className="comContentIntro font-16" value={item.content}/>
|
||||
<div className="flexBox ot font-14">
|
||||
<div>
|
||||
<span className="timeTitleComItem mr15">竞赛时间</span>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
.myFocusBgBox{
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
background-image:linear-gradient(175.09deg,#f3f9ff 0%,#d6e9ff 100%);
|
||||
min-height: 75vh;
|
||||
padding-bottom: 100px;
|
||||
.bg1, .bg2{
|
||||
|
@ -23,10 +22,10 @@
|
|||
justify-content: center;
|
||||
}
|
||||
.titleMan{
|
||||
padding: 20px 0 10px;
|
||||
padding: 20px 0;
|
||||
font-weight:500;
|
||||
color:#2e3341;
|
||||
font-size:30px;
|
||||
font-size:26px;
|
||||
}
|
||||
.searchCom{
|
||||
justify-content: space-between;
|
||||
|
@ -44,6 +43,16 @@
|
|||
border-radius:20px;
|
||||
}
|
||||
}
|
||||
.ant-input{
|
||||
border: none;
|
||||
box-shadow:0px 3px 12px rgba(0, 0, 0, 0.02);
|
||||
border-top-left-radius: 6px;
|
||||
border-bottom-left-radius: 6px;
|
||||
}
|
||||
.ant-input-search-button{
|
||||
border-top-right-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
}
|
||||
.ant-input-search{
|
||||
width: 480px;
|
||||
}
|
||||
|
@ -51,14 +60,14 @@
|
|||
height: 44px;
|
||||
}
|
||||
.ant-input:hover{
|
||||
border-color: #6e81ff;
|
||||
border: 1px solid#6e81ff;
|
||||
}
|
||||
}
|
||||
.listBox{
|
||||
padding: 0 30px;
|
||||
background-image:linear-gradient(178.28deg,#ecf3f9 0%,#ffffff 100%);
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border:1.5px solid #ffffff;
|
||||
box-shadow:0px 3px 12px rgba(181, 210, 255, 0.23);
|
||||
box-shadow:0px 3px 12px rgba(0, 0, 0, 0.02);
|
||||
.itemBoxCom{
|
||||
justify-content: start;
|
||||
padding: 20px 0;
|
||||
|
@ -73,6 +82,7 @@
|
|||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
.contCom{
|
||||
|
@ -88,10 +98,12 @@
|
|||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
margin: 15px 0 55px;
|
||||
margin: 15px 0 30px;
|
||||
color:#595959;
|
||||
}
|
||||
.timeTitleComItem{
|
||||
height: 32px;
|
||||
line-height: 27px;
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
color:#4154f1;
|
||||
|
@ -104,8 +116,9 @@
|
|||
}
|
||||
.statusComItem{
|
||||
color:#ffffff;
|
||||
width:78px;
|
||||
width:85px;
|
||||
height:32px;
|
||||
line-height: 32px;
|
||||
background-image:linear-gradient(175.37deg,#ffaa00 0%,#ff7617 100%);
|
||||
border-radius:4px;
|
||||
text-align: center;
|
||||
|
|
Loading…
Reference in New Issue