merge 开源夏令营优化

This commit is contained in:
谢思 2022-04-13 16:28:39 +08:00 committed by caishi
parent 2cb833be1e
commit d8646a237c
5 changed files with 65 additions and 23 deletions

View File

@ -71,24 +71,18 @@ function Apply(props) {
e.preventDefault();
validateFieldsAndScroll((err, values) => {
if (!err) {
Modal.confirm({
title: "确认提交",
content: "确定提交报名信息,提交后报名信息将无法修改。",
onOk: ()=>{
const params ={
...values,
projectLogoId: values.logo.file.response.data.id,
userId: current_user.user_id,
userName: current_user.username
}
applyGlcc(params).then(response=>{
if(response && response.message === "success"){
showNotification("报名成功");
setReload(Math.random());
}
})}
})
}
const params ={
...values,
projectLogoId: values.logo.file.response.data.id,
userId: current_user.user_id,
userName: current_user.username
}
applyGlcc(params).then(response=>{
if(response && response.message === "success"){
showNotification("报名成功");
setReload(Math.random());
}
})}
});
};
@ -129,6 +123,9 @@ function Apply(props) {
<Breadcrumb.Item><a href="/glcc">开源夏令营</a></Breadcrumb.Item>
<Breadcrumb.Item>项目报名</Breadcrumb.Item>
</Breadcrumb>
{userApplyInfo && <div className='applySuccess mt20 font-15'>
<i className='iconfont icon-wancheng mr5'></i>您已报名成功请关注活动后续新闻公告!
</div>}
<Form className="pt20 glcc_info_form" onSubmit={handleSubmit}>
{helper('项目名称',
'',
@ -148,9 +145,9 @@ function Apply(props) {
{helper('GitLink项目地址',
'',
'gitlinkUrl',
[{ required: true, message: "请正确输入GitLink项目地址" },
[{ required: true, message: "请正确输入预申报项目在GitLink平台的地址" },
{ max: 252, message: '超出限制长度252位字符请重新编辑' }],
<Input placeholder="请输入GitLink项目地址" onBlur={()=>{verify("gitlink")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
<Input placeholder="请输入预申报项目在GitLink平台的地址" onBlur={()=>{verify("gitlink")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
{helper('官网地址',
'',
@ -163,7 +160,7 @@ function Apply(props) {
'projectIntro',
[{ required: true, message: "请正确输入项目简介" },
{ max: 200, message: '超出限制长度200位字符请重新编辑' }],
<TextArea placeholder="请输入项目简介" onBlur={()=>{verify("intro")}} rows={4} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
<TextArea placeholder="请输入项目简介长度不超过200字符" onBlur={()=>{verify("intro")}} rows={4} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}</div>
<div className='introArea'>{helper('项目logo',
'logo格式为png、jpg、jpeg限制上传大小2m建议上传尺寸为382*228',

View File

@ -103,4 +103,15 @@
&:hover{opacity: 0.8;}
}
}
.applySuccess{
height: 45px;
border: 1px solid;
border-color: #466aff;
line-height: 45px;
padding-left: 20px;
color:#466aff;
}
}
.glcc-banner {
width: 100%;
}

View File

@ -1,7 +1,9 @@
import React from 'react';
import './index.scss';
import { Button } from 'antd';
import gitlink1 from '../../img/gitlink1.png';
import gitlink2 from '../../img/gitlink2.png';
import help from '../../img/help.png';
import './index.scss';
function Contact() {
@ -30,6 +32,13 @@ function Contact() {
</div>
</div>
</div>
{/* 帮助中心 */}
<div className='glcc_help'>
<img src={help}/>
<span className='font-32 title_32'>帮助中心&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span className='font-18 small_32'>记录GitLink编程夏令营活动信息及热点问题</span>
<Button type="danger" className='joinHelp font-16 mr40' onClick={()=>{window.open("/glcc/help")}}>进入帮助中心</Button>
</div>
</div>
</div>
)

View File

@ -3,7 +3,7 @@
background-image: url('../../img/contact_bg.png');
background-size: 100% 100%;
.glcc-content {
padding-bottom: 10vw;
padding-bottom: 6vw;
}
.contact-invite {
@ -41,4 +41,29 @@
}
}
}
}
.glcc_help{
height: 100px;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
background-image:linear-gradient(131.4deg,#c7d9ff 0%,#d2e0ff 14.22%,#dbe6ff 25.11%,#f9fbff 47.69%,#ecf3ff 71.96%,#f2f7ff 100%);
border: 2px solid #ffffff;
.title_32{
margin-left: -115px;
color:#0e439a;
font-weight: 700;}
.small_32{
margin-left: -100px;
color:#0e439a;
}
img{
width: 200px;
margin-top: 5px;
margin-left: -10px;}
.joinHelp{
width: 196px;
height:48px;
}
}

BIN
src/glcc/img/help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB