diff --git a/src/glcc/api.js b/src/glcc/api.js index 217d7870..89e8e569 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -88,4 +88,12 @@ export function studentApplyList(params) { method: 'get', params }); +} + +// 课题详情 +export function getTaskById(id) { + return fetch({ + url: `/api/applyInformation/task/${id}`, + method: 'get' + }); } \ No newline at end of file diff --git a/src/glcc/home/contact/index.jsx b/src/glcc/home/contact/index.jsx index 0f0841ec..0e7d8a39 100644 --- a/src/glcc/home/contact/index.jsx +++ b/src/glcc/home/contact/index.jsx @@ -15,15 +15,15 @@ function Contact() {

期待你的加入,和我们一起推动开源繁荣发展!

-

问题资讯: 243275429@qq.com

+

交流QQ群: 210174286

合作推广: gitlink@ccf.org.cn

gitlink1
-

加入GitLink

-

社区QQ群

+

加入编程夏令营

+

交流QQ群

gitlink2
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx index c3085b39..76bf64f4 100644 --- a/src/glcc/home/index.jsx +++ b/src/glcc/home/index.jsx @@ -14,7 +14,7 @@ import apply2 from "../img/apply2.png"; import './index.scss'; export default (props) => { - const { current_user, isGlccApplyDate, showNotification } = props; + const { current_user, isGlccApplyDate, showNotification, studentApplyStart } = props; function goToApply() { if (isGlccApplyDate) { if (current_user && current_user.login) { @@ -30,9 +30,10 @@ export default (props) => { function goToStudent(){ // 学生报名时间 - const studentApply = Date.parse(new Date()) > 1653494400000; - if(!studentApply){ + if(!studentApplyStart){ showNotification("不在报名时间,报名开始时间为5月26日"); + }else{ + window.location.href="/glcc/subjects"; } } @@ -52,7 +53,7 @@ export default (props) => {
- 项目报名 > + 项目报名 项目报名已截止
项目报名开启,导师席位虚位以待
@@ -61,7 +62,7 @@ export default (props) => {
- 学生报名 > + 学生报名
选择感兴趣的课题,开启您的开源之旅
@@ -76,7 +77,7 @@ export default (props) => {
- + diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx index 93206a35..ca240cdf 100644 --- a/src/glcc/home/lightspot/index.jsx +++ b/src/glcc/home/lightspot/index.jsx @@ -12,7 +12,7 @@ import { Link } from 'react-router-dom'; function Lightspot(props) { - const {current_user, isGlccApplyDate, showNotification} = props; + const {current_user, isGlccApplyDate, showNotification, studentApplyStart} = props; function goToApply(){ if(isGlccApplyDate){ @@ -29,9 +29,10 @@ function Lightspot(props) { function goToStudent(){ // 学生报名时间 - const studentApply = Date.parse(new Date()) > 1653494400000; - if(!studentApply){ + if(!studentApplyStart){ showNotification("不在报名时间,报名开始时间为5月26日"); + }else{ + window.location.href="/glcc/subjects"; } } @@ -61,7 +62,7 @@ function Lightspot(props) {

汇聚行业顶尖开源项目

-
平台汇聚商汤、腾讯、百度、阿里巴巴、亚马逊云科技、滴滴等行业尖端开源项目,把握开源生态发展脉搏
+
平台汇聚腾讯、百度、阿里巴巴、亚马逊云科技、滴滴等行业尖端开源项目,把握开源生态发展脉搏
diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx index 364ed825..59ed4349 100644 --- a/src/glcc/home/partner/index.jsx +++ b/src/glcc/home/partner/index.jsx @@ -3,6 +3,15 @@ import './index.scss'; import ccf from '../../img/ccf_logo.png'; import gitlink from '../../img/gitlink.png'; import xjy from '../../img/xjy.png'; +import sponsor11 from '../../img/sponsor11.png'; +import sponsor21 from '../../img/sponsor21.png'; +import sponsor22 from '../../img/sponsor22.png'; +import sponsor23 from '../../img/sponsor23.png'; +import sponsor31 from '../../img/sponsor31.png'; +import sponsor32 from '../../img/sponsor32.png'; +import sponsor41 from '../../img/sponsor41.png'; + + import log34 from '../../img/34@2x.png'; import log35 from '../../img/35@2x.png'; import log36 from '../../img/36@2x.png'; @@ -50,81 +59,39 @@ function Partner() {
- {false &&
- 赞助商 - {/* 一级赞助商 */} -
-
- -

-

钻石赞助商

-
-
- -

-

钻石赞助商

-
-
- -

-

钻石赞助商

-
+ +
+ 钻石赞助商 +
+
{window.open("https://openmmlab.com/")}}>OpenMMLab
- {/* 二级赞助商 */} -
-
- -

-

铂金赞助商

-
-
- -

-

铂金赞助商

-
-
- -

-

铂金赞助商

-
+
+ +
+ 白金赞助商 +
+
{window.open("http://www.baidu.com/")}}>百度
+
{window.open("https://www.alibaba.com/")}}>蚂蚁集团
+
{window.open("https://www.antgroup.com/")}}>阿里巴巴
- {/* 三级赞助商 */} -
-
- -

-

黄金赞助商

-
-
- -

-

黄金赞助商

-
-
- -

-

黄金赞助商

-
+
+ +
+ 黄金赞助商 +
+
{window.open("https://aws.amazon.com/cn/")}}>亚马逊云科技
+
{window.open("https://www.didiglobal.com/")}}>滴滴出行
- {/* 四级赞助商 */} -
-
- -

-

白银赞助商

-
-
- -

-

白银赞助商

-
-
- -

-

白银赞助商

-
+
+ +
+ 白银赞助商 +
+
{window.open("https://www.bytedance.com/")}}>字节跳动
-
} +
+ +
参与高校
diff --git a/src/glcc/home/partner/index.scss b/src/glcc/home/partner/index.scss index 54a87b54..dfc3cd25 100644 --- a/src/glcc/home/partner/index.scss +++ b/src/glcc/home/partner/index.scss @@ -37,57 +37,57 @@ .div8b9 .gitlink{width: 180px;} .div8b9 .xjy{width: 200px;} } - .cont2>div>div{ - width:156px; - height:87px; - padding: 12px 20px; - margin-right: 50px; - >img{width: 110px; - margin: 0 auto;} - >.bor{ - width: 100px; - height: 2px; - margin: 0 auto; - } - >p{ - width: auto; - font-size: 12px; - margin: 2px auto; - text-align: center;} - } - .cont2>div{ - display: flex; - margin-top: 30px; - >div{border-radius:4px; - &:hover{ - box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76); - }} - &.one_sponsor>div{ - background-image:linear-gradient(135.33deg,#333333 0%,#474747 21.34%,#929292 44.35%,#575757 61.08%,#444444 75.73%,#212121 100%); - border:1px solid #c4bfba; - >.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);} - } - &.two_sponsor>div{ - 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%); - border:1px solid #efe3ca; - >.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);} - } - &.four_sponsor>div{ - 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;} - } - } + // .cont2>div>div{ + // width:156px; + // height:87px; + // padding: 12px 20px; + // margin-right: 50px; + // >img{width: 110px; + // margin: 0 auto;} + // >.bor{ + // width: 100px; + // height: 2px; + // margin: 0 auto; + // } + // >p{ + // width: auto; + // font-size: 12px; + // margin: 2px auto; + // text-align: center;} + // } + // .cont2>div{ + // display: flex; + // margin-top: 30px; + // >div{border-radius:4px; + // &:hover{ + // box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76); + // }} + // &.one_sponsor>div{ + // background-image:linear-gradient(135.33deg,#333333 0%,#474747 21.34%,#929292 44.35%,#575757 61.08%,#444444 75.73%,#212121 100%); + // border:1px solid #c4bfba; + // >.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);} + // } + // &.two_sponsor>div{ + // 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%); + // border:1px solid #efe3ca; + // >.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);} + // } + // &.four_sponsor>div{ + // 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;} + // } + // } .cont3>div{ display: flex; flex-wrap: wrap; @@ -101,11 +101,15 @@ align-items: center; justify-content: center; margin: 0 20px 20px 0; + &.sponsor{ + margin-bottom: 0; + } &:hover{ cursor: pointer; box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76); } >img{width: 95%;} } + } } \ No newline at end of file diff --git a/src/glcc/img/bgPng.png b/src/glcc/img/bgPng.png new file mode 100644 index 00000000..abfa4a50 Binary files /dev/null and b/src/glcc/img/bgPng.png differ diff --git a/src/glcc/img/gitlink1.png b/src/glcc/img/gitlink1.png index 51826cb9..bc9bfe09 100644 Binary files a/src/glcc/img/gitlink1.png and b/src/glcc/img/gitlink1.png differ diff --git a/src/glcc/img/logo.png b/src/glcc/img/logo.png new file mode 100644 index 00000000..15f800cb Binary files /dev/null and b/src/glcc/img/logo.png differ diff --git a/src/glcc/img/qqChat.png b/src/glcc/img/qqChat.png index 4e2d7d66..58e9088b 100644 Binary files a/src/glcc/img/qqChat.png and b/src/glcc/img/qqChat.png differ diff --git a/src/glcc/img/sponsor11.png b/src/glcc/img/sponsor11.png new file mode 100644 index 00000000..5be81e1f Binary files /dev/null and b/src/glcc/img/sponsor11.png differ diff --git a/src/glcc/img/sponsor21.png b/src/glcc/img/sponsor21.png new file mode 100644 index 00000000..da34ca28 Binary files /dev/null and b/src/glcc/img/sponsor21.png differ diff --git a/src/glcc/img/sponsor22.png b/src/glcc/img/sponsor22.png new file mode 100644 index 00000000..b2ae125e Binary files /dev/null and b/src/glcc/img/sponsor22.png differ diff --git a/src/glcc/img/sponsor23.png b/src/glcc/img/sponsor23.png new file mode 100644 index 00000000..e9495f7c Binary files /dev/null and b/src/glcc/img/sponsor23.png differ diff --git a/src/glcc/img/sponsor31.png b/src/glcc/img/sponsor31.png new file mode 100644 index 00000000..3091232a Binary files /dev/null and b/src/glcc/img/sponsor31.png differ diff --git a/src/glcc/img/sponsor32.png b/src/glcc/img/sponsor32.png new file mode 100644 index 00000000..20ce2460 Binary files /dev/null and b/src/glcc/img/sponsor32.png differ diff --git a/src/glcc/img/sponsor41.png b/src/glcc/img/sponsor41.png new file mode 100644 index 00000000..3b68d725 Binary files /dev/null and b/src/glcc/img/sponsor41.png differ diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index 1778b66d..b91dfe55 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -12,6 +12,8 @@ import Loadable from "react-loadable"; import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; import { useState } from "react"; +import { useEffect } from "react"; +import { getStudentApplyInfo } from "./api"; // 任务管理审核 @@ -40,11 +42,41 @@ const Project = Loadable({ loader: () => import("./project"), loading: Loading, }); +// 课题详情页面 +const TaskDetail = Loadable({ + loader: () => import("./project/taskDetail"), + loading: Loading, +}); const Glcc = (propsF) => { + const {current_user} = propsF; // 判断时间是否在开源夏令营报名时间内(4月15日~5月20日) const isGlccApplyDate = Date.parse(new Date()) < 1653062400000; + // 学生报名时间new Date().getTime() > new Date('2022-05-26').getTime() + const studentApplyStart = new Date().getTime() > new Date('2022-05-26').getTime(); + const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25').getTime(); + const studentApplyEnd = new Date().getTime() > new Date('2022-06-25').getTime(); + + // 用户已报名课题id数组 + const [applyTaskId, setApplyTaskId] = useState({}); + // 刷新用户课题报名信息 + const [studentInfoReset, setStudentInfoReset] = useState(undefined); + + useEffect(()=>{ + // 获取用户课题报名信息current_user user_id + current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id}).then(response=>{ + if(response && response.message === "success"){ + // setData(response.data.rows); + const data = {}; + response.data && response.data.registrationStudentTaskList.map(item=>{ + data[item.taskId] = item.id; + }) + setApplyTaskId(data); + } + }) + },[studentInfoReset, current_user]) + return (
@@ -52,7 +84,7 @@ const Glcc = (propsF) => { ( - + )} > {/* 开源夏令营报名页面 */} @@ -69,18 +101,32 @@ const Glcc = (propsF) => { )} > + ( + + )} + > {/* 项目/课题列表 */} ( - + + )} + > + + {/* 课题列表 */} + ( + )} > {/* 首页 */} ( - + )} > diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index e8575d90..f9745a0b 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Button, message } from 'antd'; +import { Button, message, Tooltip } from 'antd'; import Nodata from '../../../forge/Nodata'; import { useEffect } from 'react'; import { getProjectById } from '../../api'; @@ -39,22 +39,25 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
{info.projectName} {info.projectType && {info.projectType}} -

GitLink项目地址:  {info.gitlinkUrl}

+

GitLink项目地址:  {info.gitlinkUrl}

项目简介:  {info.projectIntro}
- {info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{ - return
+ {info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{ + return
-
{item.taskName}
+
{window.location.href=`/glcc/subjects/detail/${item.id}`}}>{item.taskName}
导师姓名:   {item.tutorName}
-
邮箱地址:   {item.tutorMail}
+ {item.tutorMail &&
邮箱地址:   {item.tutorMail}
}
-
      {item.taskDesc}
-
奖金:   {item.taskReward}
- {item.taskUrl &&
课题链接:   {item.taskUrl}
} -
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )}
+
{item.taskDesc}
+ {item.taskUrl &&
课题链接:   {item.taskUrl}
} +
+ {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )} + +
+
¥{item.taskReward}
}) : }
:
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index 652de14c..c176f61f 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -1,4 +1,4 @@ -import React , { useEffect , useState } from 'react'; +import React from 'react'; import { Spin } from 'antd'; import { Route, Switch } from "react-router-dom"; import banner from "../img/studentProject.png"; @@ -6,7 +6,7 @@ import './index.scss'; import Loadable from "react-loadable"; import Loading from "../../Loading"; import { Link } from 'react-router-dom'; -import { getStudentApplyInfo } from '../api'; +import { useEffect } from 'react'; // 项目列表页面 const ProjectList = Loadable({ @@ -20,37 +20,18 @@ const TaskList = Loadable({ }); function Project(propsF) { - const {location, current_user, showLoginDialog} = propsF; + const {location, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId, setStudentInfoReset} = propsF; const {pathname} = location; - const isStudentApplyDate = Date.parse(new Date()) > 1653494400000 && Date.parse(new Date()) < 1656086400000; - const studentApplyEnd = Date.parse(new Date()) > 1656086400000; - // const studentApplyEnd = false; - // const isStudentApplyDate = true; - - // 用户已报名课题id数组 - const [applyTaskId, setApplyTaskId] = useState({}); - // 刷新用户课题报名信息 - const [studentInfoReset, setStudentInfoReset] = useState(undefined); - useEffect(()=>{ - // 获取用户课题报名信息current_user user_id - current_user && current_user.login && getStudentApplyInfo({userId: current_user.user_id}).then(response=>{ - if(response && response.message === "success"){ - // setData(response.data.rows); - const data = {}; - response.data && response.data.registrationStudentTaskList.map(item=>{ - data[item.taskId] = item.id; - }) - setApplyTaskId(data); - } - }) - },[studentInfoReset, current_user]) + window.scrollTo(0, 0); + },[]) + return(
- 课题列表 - 项目列表 + 课题列表 + 项目列表
开源夏令营 / @@ -59,15 +40,15 @@ function Project(propsF) { ( )} > ( - + )} > { if(response && response.message === "success"){ @@ -35,10 +37,10 @@ function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApply
{data && data.map((item, index)=>{ - return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false}> + return } trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false}>
-
+
{item.projectName}
{item.projectIntro}
@@ -47,6 +49,8 @@ function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApply
+ +
) } diff --git a/src/glcc/project/projectList/index.scss b/src/glcc/project/projectList/index.scss index 581af5ff..6187d422 100644 --- a/src/glcc/project/projectList/index.scss +++ b/src/glcc/project/projectList/index.scss @@ -32,14 +32,16 @@ width: 100px; height: 100px; border: 1px solid #fff; + background-color: #fff; border-radius: 50%; text-align: center; overflow: hidden; margin: 25px auto 10px; + line-height: 100px; img{ width: 100%; - height: 100%; - display: block; + // height: 100%; + // display: block; } } .title{ diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx new file mode 100644 index 00000000..39222459 --- /dev/null +++ b/src/glcc/project/taskDetail/index.jsx @@ -0,0 +1,76 @@ +import React, {useEffect, useState } from 'react'; +import { Button, message, Spin} from 'antd'; +import '../index.scss'; +import './index.scss'; +import { getTaskById } from '../../api'; +import banner from "../../img/studentProject.png"; +import bgPng from "../../img/bgPng.png"; + +// 课题列表 +function TaskDetail(props) { + const {match, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId} = props + const taskId = Number(match.params.taskId); + const [detail, setDetail] = useState(undefined); + + useEffect(()=>{ + getTaskById(taskId).then(res=>{ + if(res && res.message === "success"){ + setDetail(res.data); + } + }) + },[]) + + // 申请课题按钮点击函数 + function applyTask(id){ + // 判断用户是否已经登录 + if(current_user && current_user.login){ + // 判断用户是否已经报名两个课题 + if(applyTaskId && Object.keys(applyTaskId).length >= 2){ + message.error('最多只能同时报名两个课题'); + }else{ + // 跳转到学生报名页 + window.location.href=`/glcc/student/apply/${id}`; + } + }else{ + showLoginDialog(); + } + } + + return ( +
+ {/* */} + + {detail &&
+ +
+
+
{detail.taskName}
+
+ {detail.projectType && {detail.projectType}} + {detail.taskUrl && 课题链接: {detail.taskUrl}} +
+
+
+
所属项目{detail.projectName}
+
课题奖金¥{detail.taskReward}
+
导师信息{detail.tutorName}{detail.tutorMail &&` | ${detail.tutorMail}`}
+
+
课题简介
+
{detail.taskDesc}
+
+ {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && taskId && Object.keys(applyTaskId).includes(taskId.toString()) ? : isStudentApplyDate && )} +
+ + +
} +
+
+ ) +} +export default TaskDetail; \ No newline at end of file diff --git a/src/glcc/project/taskDetail/index.scss b/src/glcc/project/taskDetail/index.scss new file mode 100644 index 00000000..e71ffac4 --- /dev/null +++ b/src/glcc/project/taskDetail/index.scss @@ -0,0 +1,119 @@ +.taskDetailBgBox{ + text-align: center; + .glcc-banner { + width: 100%; + } + .goBackBox{ + width: 1200px; + margin: 0 auto; + padding: 25px 0 12px; + color: #202d40; + font-size: 16px; + border-bottom: 1px dashed #bec5d5; + a{ + color:#a4aabb; + } + } + .bgBox{ + text-align: left; + background-image:linear-gradient(180deg,#ebf2ff 0%,#ebf2ff 43.09%,#f3f4f8 100%); + padding-bottom: 100px; + position: relative; + .bgPng1{ + width: 146px; + position: absolute; + top: 230px; + left: 110px; + z-index: 0; + } + .bgPng2{ + width: 186px; + position: absolute; + top: 520px; + right: 310px; + z-index: 0; + } + } + .detailContent{ + position: relative; + z-index: 1; + width: 1200px; + margin: 25px auto 0; + background-image:linear-gradient(180deg,#f1f5ff 0%,#f3f8ff 100%); + border:1px solid #ffffff; + border-radius:4px; + padding: 40px 30px 30px; + .detailHead{ + border-bottom: 1px dashed #bec5d5; + .title{ + font-weight:700; + color:#3753c5; + font-size:20px; + } + .box{ + color:#465474; + font-size:15px; + margin: 15px 0; + .classify{ + padding: 0px 8px; + display: inline-block; + border:1px solid #6680bb; + border-radius: 4px; + margin-right: 25px; + } + } + .link{margin-left: 6px;} + } + } + .detailCont{ + background-color:#e9efff; + padding: 20px 15px; + color:#465474; + font-size:15px; + margin-top: 20px; + .bor{ + margin: 0 -15px 20px -15px; + border-bottom: 1px dashed #bec5d5;; + } + .smallTil{ + font-weight:500; + color:#000000; + margin-right: 15px; + } + .moneyBox{ + display: flex; + align-items: center; + } + .money{ + font-weight:700; + color:#ff8800; + font-size:20px; + } + div{ + margin-bottom: 15px; + } + .desc{ + white-space: pre-wrap; + } + } + .link{ + color:#466aff; + &:hover{ + color: #5d7cff !important; + } + &:active{ + color: #1140ff !important; + } + } + .applyBut{ + background-color:#466aff; + border-color: #466aff; + &:hover{background-color:#5d7cff;} + &:focus{background-color:#1140ff;} + } + .detailBut{ + height: 36px; + line-height: 36px; + margin-top: 25px; + } +} diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index f6d58082..13519b18 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -1,12 +1,13 @@ import React, { Fragment, useEffect, useState } from 'react'; import { Checkbox, Input, message, Modal, Table, Tooltip } from 'antd'; import './index.scss'; -import { cancelTaskApply, taskList, studentApplyList } from '../../api'; +import { cancelTaskApply, taskList } from '../../api'; import ProjectDetail from '../component/projectDetail'; +import bgPng from "../../img/bgPng.png"; const { Search } = Input; // 课题列表 -function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, studentInfoReset}) { +function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd}) { const [visible, setVisible] = useState(false); const [deleteTaskId, setDeleteTaskId] = useState(undefined); // 输入搜索框 @@ -23,7 +24,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial const columns = [ { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => {(current-1)*pageSize+index + 1} }, - { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.location.href=item.taskUrl}}>{text} }, + { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.open(`/glcc/subjects/detail/${item.id}`)}}>{text} }, { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '28%', ellipsis: true, render: (text) => {text} }, { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => {text} }, { @@ -102,12 +103,14 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial // 改变pagesize function onShowSizeChange(current, pageSize){ + window.scrollTo(0, 0); setCurrent(1); setPageSize(pageSize); } // 切换页数 function changePage(page, pageSize){ + window.scrollTo(0, 0); setCurrent(page); } @@ -124,7 +127,8 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial const params = { curPage: current, keyword, - pageSize + pageSize, + userId: apply ? current_user.user_id : '' } taskList(params).then(response => { if (response && response.message === "success") { @@ -139,28 +143,13 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial } setLoading(false); }) - }, [keyword, current, pageSize, applyTaskId]) - - useEffect(()=>{ - // if(apply){ - // // 判断用户是否已经登录 - // if(current_user && current_user.login){ - // apply && studentApplyList().then(response => { - // if (response && response.message === "success") { - // console.log(response); - // } - // }) - // }else{ - // showLoginDialog(); - // } - // } - },[apply]) + }, [keyword, current, pageSize, applyTaskId, apply]) return (
- {setApply(e.target.checked)}}>已报名 + {current_user && current_user.login ? {setCurrent(1);setApply(e.target.checked)}}>已报名 :
} { setCurrent(1); setKeyword(value) }} />
@@ -178,6 +167,8 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} />
+ + { // 进入此页面到填写页面 - setTimeout(()=>{ - let clientWidth = document.body.clientWidth; - let scrollHeight = 500 * clientWidth / 1920; - window.scrollTo(0, scrollHeight); - },200); - // window.scrollTo(0, 50); + // setTimeout(()=>{ + // let clientWidth = document.body.clientWidth; + // let scrollHeight = 500 * clientWidth / 1920; + // window.scrollTo(0, scrollHeight); + // },200); + window.scrollTo(0, 50); if (new Date().getTime() < new Date('2022-05-26').getTime()) { // 不在开源夏令营报名时间之内 - window.location.href = "/glcc/student/2"; + window.location.href = "/glcc/subjects"; } else if (current_user && current_user.login) { } else { @@ -190,20 +190,20 @@ function Apply(props) { studentApplyEdit(params).then(response => { if (response && response.message === "success") { showNotification("修改信息成功"); - // setStudentInfoReset(Math.random()); + setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); - history.push(`/glcc/student/2`) + history.push(`/glcc/subjects`) } }); } else { studentApply(params).then(response => { if (response && response.message === "success") { showNotification("报名成功"); - // setStudentInfoReset(Math.random()); + setStudentInfoReset(Math.random()); setReload(Math.random()); setLoading(false); - history.push(`/glcc/student/2`) + history.push(`/glcc/subjects`) } }); } @@ -346,12 +346,12 @@ function Apply(props) { return (
- + {/* */}
开源夏令营 - 课题及项目列表 + 课题及项目列表 学生报名 @@ -361,10 +361,10 @@ function Apply(props) {
2、本次GLCC夏令营基于GitLink代码托管平台完成编程任务,若您没有平台账户,请先注册后完成课题申请
3、每位学员最多可申请2个课题,至多有且仅有1个课题可以入选
4、建议在提交课题申请,与课题导师邮件沟通,详细了解课题描述、编码任务、技能要求&编程语言、预期产出结果等信息,以便您能够选择最适合的课题
-
5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营微信群进行咨询
+
5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营QQ群进行咨询
- 学生报名 + 学生报名
申请课题
@@ -438,7 +438,7 @@ function Apply(props) { onChange={handleChange} > {imageUrl ? avatar : userApplyInfo && userApplyInfo.proveAttachmentId ? -
:
+
:
请上传学生证明
} @@ -456,6 +456,7 @@ function Apply(props) { [{ required: true, message: "请选择课题名称" }],