diff --git a/src/glcc/home/award/index.jsx b/src/glcc/home/award/index.jsx
index ffa1c758..4e8c1e47 100644
--- a/src/glcc/home/award/index.jsx
+++ b/src/glcc/home/award/index.jsx
@@ -10,7 +10,7 @@ function Award() {
丰厚现金奖励
-
根据项目难度设置高、中、低三个阶梯课题,对应奖金为12000 元、9000 元和 6000 元
+
根据课题开发耗时,对应奖金从6000元至12000元不等。详细可以课题详情中具体奖金标准
@@ -28,7 +28,7 @@ function Award() {
夏令营大礼包
-
夏令营纪念文化衫、帆布包、鼠标垫,开源系列图书,社区周边等。此外,还会评选出若干优秀社区、明星导师、最佳课题、开源之星等单项奖。
+
夏令营纪念文化衫、帆布包、鼠标垫,开源系列图书,社区周边等。此外,还会评选出若干优秀社区、明星导师、最佳课题、开源之星等单项奖
diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx
index 98b51944..a4f6b12a 100644
--- a/src/glcc/home/timerShaft/index.jsx
+++ b/src/glcc/home/timerShaft/index.jsx
@@ -5,32 +5,32 @@ import './index.scss';
const stepArr = [{
title: "Step1",
date: "4.15",
- content: "GLCC发布"
+ content: "GLCC夏令营活动发布"
},
{
title: "Step2",
- date: "4.15-5.20",
- content: "社区启动报名"
+ date: "4.15-5.19",
+ content: "社区项目报名,提交课题"
},
{
title: "Step2",
- date: "5.20",
- content: "公示社区名单"
+ date: "5.20-5.25",
+ content: "公示社区项目名单"
},
{
title: "Step2",
- date: "5.21-6.19",
- content: "学生提交proposal"
+ date: "5.26-6.24",
+ content: "学生报名,提交Proposal"
},
{
title: "Step2",
date: "7.1",
- content: "公示项目申请审核结果",
+ content: "公示入选学生名单",
noArrow: true,
},
{
title: "Step2",
- date: "7.4-8.12",
+ date: "7.1-8.12",
content: "项目开发第一阶段",
},
{
@@ -40,13 +40,13 @@ const stepArr = [{
},
{
title: "Step2",
- date: "10.1-10.14",
- content: "结项审核",
+ date: "10.1-10.21",
+ content: "结项审核,并公示考核结果",
},
{
title: "Step2",
- date: "11.11",
- content: "公布优秀项目&学员",
+ date: "10.21-11.11",
+ content: "评选公布优秀项目和学员&学员",
noArrow: true,
}
]
diff --git a/src/glcc/img/banner.png b/src/glcc/img/banner.png
index 3fe2e801..3806f08b 100644
Binary files a/src/glcc/img/banner.png and b/src/glcc/img/banner.png differ
diff --git a/src/glcc/img/studentProject.png b/src/glcc/img/studentProject.png
index f72cd4a5..45539509 100644
Binary files a/src/glcc/img/studentProject.png and b/src/glcc/img/studentProject.png differ
diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx
index d6e7cf94..b52ebe06 100644
--- a/src/glcc/project/component/projectDetail.jsx
+++ b/src/glcc/project/component/projectDetail.jsx
@@ -1,12 +1,28 @@
import React, { useState } from 'react';
-import { Button } from 'antd';
+import { Button, message } from 'antd';
import Nodata from '../../../forge/Nodata';
import { useEffect } from 'react';
import { getProjectById } from '../../api';
-export default ({ detail, projectId, applyTaskId }) => {
+export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd }) => {
const [info, setInfo] = useState(detail);
+ // 申请课题按钮点击函数
+ 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();
+ }
+ }
+
useEffect(()=>{
if(!detail && projectId){
// 通过项目Id查询项目详情
@@ -40,22 +56,22 @@ export default ({ detail, projectId, applyTaskId }) => {
{info.projectName}
{info.projectType &&
{info.projectType}}
-
{info.gitlinkUrl}
-
{info.officialWebsiteUrl}
+
GitLink项目地址: {info.gitlinkUrl}
+
项目简介: {info.projectIntro}
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{
return
{item.taskName}
-
导师姓名: {item.tutorName}
-
邮箱地址: {item.tutorMail}
+
导师姓名: {item.tutorName}
+
邮箱地址: {item.tutorMail}
{item.taskDesc}
课题链接: {item.taskUrl}
-
{applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : }
+
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : isStudentApplyDate && )}
-
¥ {item.taskReward}
+
¥ {item.taskReward}
}) : }
:
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx
index 74b4bc62..29024186 100644
--- a/src/glcc/project/index.jsx
+++ b/src/glcc/project/index.jsx
@@ -20,8 +20,12 @@ const TaskList = Loadable({
});
function Project(propsF) {
- const {location, current_user} = propsF;
+ const {location, current_user, showLoginDialog} = 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({});
@@ -57,13 +61,13 @@ function Project(propsF) {
(
-
+
)}
>
(
-
+
)}
>
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss
index 8dc06173..5055fd42 100644
--- a/src/glcc/project/index.scss
+++ b/src/glcc/project/index.scss
@@ -76,7 +76,7 @@
padding: 30px 30px 50px;
.taskItem{
.center{
- width: 60%;
+ // width: 60%;
}
.right{padding-right: 10px;}
}
@@ -104,10 +104,15 @@
.taskItem {
display: flex;
justify-content: space-between;
- background-color: #ffffff;
- box-shadow: 0px 0px 12px rgba(71, 105, 198, 0.4);
+ border:1px solid #ffffff;
+ &:hover{ box-shadow: 0px 0px 12px rgba(71, 105, 198, 0.4);}
+ .oneLine{
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
.left{
- width: 250px;
+ width: 316px;
background-image: url('../img/projectDetailTaskBg.png');
background-size: 100% 100%;
padding: 22px 20px;
@@ -117,9 +122,10 @@
font-size:18px;
}
.email span{color:#466aff;}
+ .leftWidth{width: 270px;}
}
.center{
- width: 66%;
+ width: 650px;
text-align: left;
padding: 20px;
display: flex;
@@ -141,6 +147,7 @@
}
}
.right{
+ min-width: 150px;
font-weight:700;
color:#ff8800;
font-size:24px;
@@ -157,4 +164,8 @@
.ant-popover-inner-content{
padding: 30px 30px 50px;
}
+}
+.lookDetail:hover, .lookDetail:focus{
+ border-color: #466aff;
+ color: #466aff;
}
\ No newline at end of file
diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx
index 067873ad..5f130a6e 100644
--- a/src/glcc/project/projectList/index.jsx
+++ b/src/glcc/project/projectList/index.jsx
@@ -1,5 +1,5 @@
import React , { useEffect , useState } from 'react';
-import { Input, Popover, Table, Tooltip } from 'antd';
+import { Input, Popover, Spin, Table, Tooltip } from 'antd';
import { main_site_url } from '../../fetch';
import './index.scss';
import { projectList } from '../../api';
@@ -7,12 +7,14 @@ import ProjectDetail from '../component/projectDetail';
const {Search} = Input;
// 项目列表
-function ProjectList({applyTaskId}) {
+function ProjectList({applyTaskId, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd}) {
// 输入搜索框
const [keyword, setKeyword] = useState(undefined);
const [data, setData] = useState([]);
+ const [loading, setLoading] = useState(false);
useEffect(()=>{
+ setLoading(true);
const params = {
curPage: 1,
keyword,
@@ -22,6 +24,7 @@ function ProjectList({applyTaskId}) {
if(response && response.message === "success"){
setData(response.data.rows);
}
+ setLoading(false);
})
},[keyword])
@@ -29,18 +32,20 @@ function ProjectList({applyTaskId}) {
{setKeyword(value)}}/>
-
- {data && data.map((item, index)=>{
- return
} trigger='click' overlayClassName='projectItemPopover'>
-
-
-
-
{item.projectName}
-
{item.projectIntro}
-
-
- })}
-
+
+
+ {data && data.map((item, index)=>{
+ return
} trigger='click' overlayClassName='projectItemPopover' autoAdjustOverflow={false} isStudentApplyDate={isStudentApplyDate} studentApplyEnd={studentApplyEnd}>
+
+
+
+
{item.projectName}
+
{item.projectIntro}
+
+
+ })}
+
+
)
diff --git a/src/glcc/project/projectList/index.scss b/src/glcc/project/projectList/index.scss
index 511b1f8b..581af5ff 100644
--- a/src/glcc/project/projectList/index.scss
+++ b/src/glcc/project/projectList/index.scss
@@ -1,15 +1,3 @@
-.actionBox{
- display: flex;
- align-items: center;
- color: #466aff;
- cursor: pointer;
- .iconfont{
- margin: 0 10px 0 14px;
- }
- .applyTask{
- color:#eb9350;
- }
-}
.projectListBox{
display: flex;
flex-wrap: wrap;
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx
index fdf5a280..687b2341 100644
--- a/src/glcc/project/taskList/index.jsx
+++ b/src/glcc/project/taskList/index.jsx
@@ -6,7 +6,7 @@ import ProjectDetail from '../component/projectDetail';
const { Search } = Input;
// 课题列表
-function TaskList({applyTaskId, setStudentInfoReset}) {
+function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd}) {
const [visible, setVisible] = useState(false);
const [deleteTaskId, setDeleteTaskId] = useState(undefined);
// 输入搜索框
@@ -16,21 +16,22 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
const [current, setCurrent] = useState(1);
const [total, setTotal] = useState(0);
const [pageSize, setPageSize] = useState(20);
+ const [loading, setLoading] = useState(false);
const columns = [
- { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", render: (text, item, index) => index + 1 },
- { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', render: (text, item) => {window.location.href=item.taskUrl}}>{text} },
- { title: '项目名称', dataIndex: 'tutorName', className:"taskTableColumns", width: '28%', render: (text) => {text} },
- { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", render: (text) => ¥ {text} },
+ { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => index + 1 },
+ { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.location.href=item.taskUrl}}>{text} },
+ { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '28%', ellipsis: true, render: (text) => {text} },
+ { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => ¥ {text} },
{
title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => {
return (
- {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ?
+ {(isStudentApplyDate || studentApplyEnd) && (applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ?
{window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情
{setDeleteTaskId(item.id);setVisible(true)}}>
- :
- {window.location.href=`/glcc/student/apply/${item.id}`}}>{applyTask(item.id)}}>申请课题}
+ :isStudentApplyDate &&
+ {applyTask(item.id)}}>申请课题)}
)
})
@@ -50,17 +51,22 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
}
const expandRow = (record) => {
- return
+ return
}
// 申请课题按钮点击函数
function applyTask(id){
- // 判断用户是否已经报名两个课题
- if(applyTaskId.length >= 2){
- message.error('最多只能同时报名两个课题');
+ // 判断用户是否已经登录
+ if(current_user && current_user.login){
+ // 判断用户是否已经报名两个课题
+ if(applyTaskId && Object.keys(applyTaskId).length >= 2){
+ message.error('最多只能同时报名两个课题');
+ }else{
+ // 跳转到学生报名页
+ window.location.href=`/glcc/student/apply/${id}`;
+ }
}else{
- // 跳转到学生报名页
- window.location.href=`/glcc/student/apply/${id}`;
+ showLoginDialog();
}
}
@@ -90,7 +96,15 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
setCurrent(page);
}
+ // 数组元素置顶方法
+ function toFirst(data, index){
+ if(index != 0){
+ data.unshift(data.splice(index,1)[0]);
+ }
+ }
+
useEffect(() => {
+ setLoading(true);
const params = {
curPage: current,
keyword,
@@ -98,9 +112,16 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
}
taskList(params).then(response => {
if (response && response.message === "success") {
+ // 将已报名task任务置顶
+ const ids = Object.keys(applyTaskId);
+ const data = response.data.rows;
+ data.map((item, index)=>{
+ ids.includes(item.id.toString()) && toFirst(data, index);
+ })
setData(response.data.rows);
setTotal(response.data.total)
}
+ setLoading(false);
})
}, [keyword, current, pageSize])
@@ -109,6 +130,7 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
{ setKeyword(value) }} />
开源夏令营
- 查看项目
+ 课题及项目列表
学生报名