开源xia夏令营issue

This commit is contained in:
谢思 2022-04-12 17:30:50 +08:00
parent aac55ea94f
commit c601d6681b
8 changed files with 44 additions and 33 deletions

View File

@ -29,13 +29,18 @@ function Apply(props) {
);
useEffect(()=>{
//
const url = `/project_categories/pinned_index.json`;
axios.get(url).then(result=>{
if(result && result.data){
setCateList(result.data.project_categories);
}
}).catch(error=>{})
if(current_user && current_user.login){
//
const url = `/project_categories/pinned_index.json`;
axios.get(url).then(result=>{
if(result && result.data){
setCateList(result.data.project_categories);
}
}).catch(error=>{})
}else{
window.location.href="/login?go_page=/glcc/apply"
}
}, [])
useEffect(()=>{
@ -133,16 +138,17 @@ function Apply(props) {
{cateList && cateList.map(item=> {return <Option value={item.name} key={item.id}>{item.name}</Option>})}
</Select>
)}
{helper('GitLink地址',
{helper('GitLink项目地址',
'',
'gitlinkUrl',
[{ required: true, message: "请正确输入GitLink项目地址" }],
<Input placeholder="请输入GitLink地址" onBlur={()=>{verify("gitlink")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
[{ required: true, message: "请正确输入GitLink项目地址" },
{ max: 252, message: '超出限制长度252位字符请重新编辑' }],
<Input placeholder="请输入GitLink项目地址" onBlur={()=>{verify("gitlink")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
{helper('官网地址',
'',
'officialWebsiteUrl',
[],
[{ max: 252, message: '超出限制长度252位字符请重新编辑' }],
<Input placeholder="请输入官网地址" disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
<div className='introArea'>{helper('项目简介',
@ -166,7 +172,7 @@ function Apply(props) {
beforeUpload={beforeUpload}
onChange={handleChange}
>
{imageUrl ? <img src={imageUrl} alt="avatar" style={{ width: '100%' }} /> : <div>
{imageUrl ? <img src={imageUrl} alt="avatar" style={{ maxWidth: '100px', maxHeight: '100px' }} /> : <div>
<i className='iconfont icon-tianjiadaohang font-30'></i>
<div className="ant-upload-text font-13">请上传logo图片</div>
</div>}

View File

@ -8,7 +8,6 @@
.glcc_info_form{
display: flex;
flex-wrap: wrap;
margin-left: -25px;
.ant-row.ant-form-item{
margin-bottom: 20px;
display: flex;
@ -16,10 +15,9 @@
justify-content: flex-end;
}
.ant-col.ant-form-item-control-wrapper {
width: 80%;
width: 78%;
}
.ant-form-item-label{
width: 90px;
margin-right: 15px;
&> label::after{
content: none;
@ -54,7 +52,8 @@
line-height: 120px;
text-align: center;
img{
width: 100px;
max-width: 100px;
max-height: 100px;
}
}
}
@ -65,7 +64,7 @@
.ant-col.ant-form-item-control-wrapper {
width: 90%;
}
.ant-form-item-label{width: 105px;}
.ant-form-item-label{width: 118px;}
&.tips{
margin-left: 40px;
color:#e90000;

View File

@ -11,9 +11,9 @@ function Help(props) {
// wiki
useEffect(()=>{
wikiPages({
owner: 'jasder',
repo: 'ipatool',
projectId: '543017'
owner: 'forgetest2',
repo: 'wiki1',
projectId: '546103'
}).then(res => {
if (res && res.message === "200" && Array.isArray(res.data)) {
setFileArrInit(res.data);
@ -29,10 +29,10 @@ function Help(props) {
// wiki
useEffect(() => {
checkItem.name && getWiki({
owner: 'innov',
repo: 'PiggyMetrics22',
owner: 'forgetest2',
repo: 'wiki1',
pagename: checkItem.name,
projectId: '1158'
projectId: '546103'
}).then(res => {
if (res && res.message === "200") {
setItemDetail(res.data);

View File

@ -25,9 +25,10 @@
}
.help_cntent{
position: relative;
width: 80%;
.bg{
position: absolute;
width: 75vw;
width: 100%;
top: 0;
}
}

View File

@ -10,14 +10,15 @@ import Contact from "./contact";
import banner from "../img/banner.png";
import './index.scss';
export default () => {
export default (props) => {
const {current_user} = props;
return (
<div className="glcc">
{/* <Banner /> */}
<img className="glcc-banner" src={banner}></img>
{/* <div > */}
<Link className="apply-btn" to="/glcc/apply">
<Link className="apply-btn" to={current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply'}>
<div className="apply-text">立即报名</div>
<div className="apply-icon"><i className="font-14 iconfont icon-xiangyoujiantou "></i></div>
</Link>

View File

@ -10,7 +10,8 @@ import lightspot4 from '../../img/lightspot4.png';
import './index.scss';
function Lightspot() {
function Lightspot(props) {
const {current_user} = props;
return (
<div className="lightspot">
@ -21,7 +22,7 @@ function Lightspot() {
<div className="teacher-text">
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗</h3>
<div className="teacher-content">想要扩大项目知名度和影响力为开源项目吸引新鲜血液培养长期开发者通过GitLink平台与高校建立连接指导开源新人传授他们的开源文化享受开源的乐趣</div>
<Button type="primary" href='/glcc/apply' className='applyBut'>立即报名</Button>
<Button type="primary" href={current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply'} className='applyBut'>立即报名</Button>
</div>
<img className="teacher-img" src={teacherImg}></img>
</div>

View File

@ -52,17 +52,17 @@ function Partner() {
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>铂金赞助商</p>
<p className='op83'>铂金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>铂金赞助商</p>
<p className='op83'>铂金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>铂金赞助商</p>
<p className='op83'>铂金赞助商</p>
</div>
</div>
{/* 三级赞助商 */}

View File

@ -71,6 +71,10 @@
background-image:linear-gradient(135.33deg,#ffffff 0%,#d8d8d8 21.34%,#aeaeae 34.31%,#fcfcfc 47.69%,#bbbbbb 64.44%,#f2f2f2 81.59%,#828282 100%);
border:1px solid #dbdbdd;
>.bor{background-color:#ffffff;}
>.op83{
color:#000000;
opacity: .83;
}
}
&.three_sponsor>div{
background-image:linear-gradient(135.33deg,#ba973a 0%,#c7a948 21.34%,#d1ae33 47.69%,#ffdb72 72.15%,#b37907 100%);
@ -81,8 +85,7 @@
background-image:linear-gradient(135.33deg,#636363 0%,#bebebe 21.34%,#979797 43.51%,#9c9c9c 61.08%,#8d8d8d 75.73%,#727272 100%);
border:1px solid #dbdbdd;
>.bor{background-color:#ffffff;}
>p{color: #000000;
opacity:83%;}
// >p{color: #000000;}
}
}
.cont3>div{