diff --git a/public/css/iconfont.css b/public/css/iconfont.css
index 62b5f94e..2aa4e5fe 100644
--- a/public/css/iconfont.css
+++ b/public/css/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
- src: url('iconfont.woff2?t=1652151013948') format('woff2'),
- url('iconfont.woff?t=1652151013948') format('woff'),
- url('iconfont.ttf?t=1652151013948') format('truetype');
+ src: url('iconfont.woff2?t=1652927945088') format('woff2'),
+ url('iconfont.woff?t=1652927945088') format('woff'),
+ url('iconfont.ttf?t=1652927945088') format('truetype');
}
.iconfont {
@@ -13,6 +13,54 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-bangzhuzhongxinicon1:before {
+ content: "\e935";
+}
+
+.icon-ketixiangqingicon:before {
+ content: "\e92b";
+}
+
+.icon-bianjiicon:before {
+ content: "\e92c";
+}
+
+.icon-baomingxiangqingicon:before {
+ content: "\e92d";
+}
+
+.icon-sousuo4:before {
+ content: "\e92e";
+}
+
+.icon-quxiaoshenqingicon:before {
+ content: "\e92f";
+}
+
+.icon-xiala3:before {
+ content: "\e930";
+}
+
+.icon-tianjia_tianchong:before {
+ content: "\e931";
+}
+
+.icon-a-shanchu2:before {
+ content: "\e932";
+}
+
+.icon-shanchuicon3:before {
+ content: "\e933";
+}
+
+.icon-shenqingketiicon:before {
+ content: "\e934";
+}
+
+.icon-weixin:before {
+ content: "\e92a";
+}
+
.icon-zanwushuju:before {
content: "\e928";
}
diff --git a/public/css/iconfont.js b/public/css/iconfont.js
index 9201e886..81842232 100644
--- a/public/css/iconfont.js
+++ b/public/css/iconfont.js
@@ -1 +1 @@
-!function(a){var l,c,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(a,l){l.parentNode.insertBefore(a,l)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}l=function(){var a,l=document.createElement("div");l.innerHTML=z,z=null,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),l()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(h=l,i=a.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
\ No newline at end of file
+!function(a){var l,c,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(a,l){l.parentNode.insertBefore(a,l)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}l=function(){var a,l=document.createElement("div");l.innerHTML=z,z=null,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),l()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(h=l,i=a.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
\ No newline at end of file
diff --git a/public/css/iconfont.json b/public/css/iconfont.json
index 0816dd21..8292425f 100644
--- a/public/css/iconfont.json
+++ b/public/css/iconfont.json
@@ -5,6 +5,90 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "29811507",
+ "name": "帮助中心icon",
+ "font_class": "bangzhuzhongxinicon1",
+ "unicode": "e935",
+ "unicode_decimal": 59701
+ },
+ {
+ "icon_id": "29701613",
+ "name": "课题详情icon",
+ "font_class": "ketixiangqingicon",
+ "unicode": "e92b",
+ "unicode_decimal": 59691
+ },
+ {
+ "icon_id": "29701614",
+ "name": "编辑icon",
+ "font_class": "bianjiicon",
+ "unicode": "e92c",
+ "unicode_decimal": 59692
+ },
+ {
+ "icon_id": "29701615",
+ "name": "报名详情icon",
+ "font_class": "baomingxiangqingicon",
+ "unicode": "e92d",
+ "unicode_decimal": 59693
+ },
+ {
+ "icon_id": "29701616",
+ "name": "搜索",
+ "font_class": "sousuo4",
+ "unicode": "e92e",
+ "unicode_decimal": 59694
+ },
+ {
+ "icon_id": "29701617",
+ "name": "取消申请icon",
+ "font_class": "quxiaoshenqingicon",
+ "unicode": "e92f",
+ "unicode_decimal": 59695
+ },
+ {
+ "icon_id": "29701618",
+ "name": "下拉",
+ "font_class": "xiala3",
+ "unicode": "e930",
+ "unicode_decimal": 59696
+ },
+ {
+ "icon_id": "29701619",
+ "name": "添加_填充",
+ "font_class": "tianjia_tianchong",
+ "unicode": "e931",
+ "unicode_decimal": 59697
+ },
+ {
+ "icon_id": "29701620",
+ "name": "删除 (2)",
+ "font_class": "a-shanchu2",
+ "unicode": "e932",
+ "unicode_decimal": 59698
+ },
+ {
+ "icon_id": "29701621",
+ "name": "删除icon",
+ "font_class": "shanchuicon3",
+ "unicode": "e933",
+ "unicode_decimal": 59699
+ },
+ {
+ "icon_id": "29701622",
+ "name": "申请课题icon",
+ "font_class": "shenqingketiicon",
+ "unicode": "e934",
+ "unicode_decimal": 59700
+ },
+ {
+ "icon_id": "29665762",
+ "name": "微信",
+ "font_class": "weixin",
+ "unicode": "e92a",
+ "unicode_decimal": 59690
+ },
{
"icon_id": "29467269",
"name": "暂无数据",
diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf
index 239d153a..aaf41b74 100644
Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ
diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff
index 16e36487..7ad90ffb 100644
Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ
diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2
index 57abfbe5..f45e4e1d 100644
Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ
diff --git a/src/App.js b/src/App.js
index d0a8cdb4..0cd7a9d4 100644
--- a/src/App.js
+++ b/src/App.js
@@ -125,7 +125,7 @@ const Glcc = Loadable({
// })
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
-const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder"];
+const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc"];
class App extends Component {
constructor(props) {
diff --git a/src/glcc/api.js b/src/glcc/api.js
index f0f99d61..71130f98 100644
--- a/src/glcc/api.js
+++ b/src/glcc/api.js
@@ -1,6 +1,6 @@
import fetch from './fetch';
-// 获取当前用户报名信息
+// 获取当前用户项目报名信息
export function getUserApplyInfo(params) {
return fetch({
url: `/api/applyInformation/getUserApplyInfo`,
@@ -16,4 +16,67 @@ export function applyGlcc(data) {
method: 'post',
data: data
});
-}
\ No newline at end of file
+}
+
+//提交报名信息(学生)
+export function studentApply(data) {
+ return fetch({
+ url: '/api/studentApply/create',
+ method: 'post',
+ data: data
+ });
+}
+
+//修改报名信息(学生)
+export function studentApplyEdit(data) {
+ return fetch({
+ url: '/api/studentApply/update',
+ method: 'post',
+ data: data
+ });
+}
+
+// 获取当前学生用户报名信息
+// 课题列表
+export function projectList(params) {
+ return fetch({
+ url: `/api/applyInformation/list`,
+ method: 'get',
+ params
+ });
+}
+
+// 课题列表
+export function taskList(params) {
+ return fetch({
+ url: `/api/applyInformation/taskList`,
+ method: 'get',
+ params
+ });
+}
+
+// 项目id查询项目详情
+export function getProjectById(id) {
+ return fetch({
+ url: `/api/applyInformation/${id}`,
+ method: 'get'
+ });
+}
+
+// 获取用户(学生)课题报名信息
+export function getStudentApplyInfo(params) {
+ return fetch({
+ url: `/api/studentApply/getUserApplyInfo`,
+ method: 'get',
+ params
+ });
+}
+
+// 用户取消课题报名
+export function cancelTaskApply(data) {
+ return fetch({
+ url: '/api/studentApply/delete',
+ method: 'post',
+ data: data
+ });
+}
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx
index a3ef69b6..359fa641 100644
--- a/src/glcc/home/index.jsx
+++ b/src/glcc/home/index.jsx
@@ -8,20 +8,23 @@ import News from './news';
import Partner from "./partner";
import Contact from "./contact";
import banner from "../img/banner.png";
+import introduce from "../img/introduce.png";
+import apply1 from "../img/apply1.png";
+import apply2 from "../img/apply2.png";
import './index.scss';
export default (props) => {
- const {current_user, isGlccApplyDate, showNotification} = props;
- function goToApply(){
- if(isGlccApplyDate){
- if(current_user && current_user.login){
- window.location.href="https://wj.qq.com/s2/10175205/e8df/";
- }else{
- window.location.href="/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
+ const { current_user, isGlccApplyDate, showNotification } = props;
+ function goToApply() {
+ if (isGlccApplyDate) {
+ if (current_user && current_user.login) {
+ window.location.href = "https://wj.qq.com/s2/10175205/e8df/";
+ } else {
+ window.location.href = "/login?go_page=https://wj.qq.com/s2/10175205/e8df/";
}
- }else{
+ } else {
showNotification("不在报名时间,报名时间为4月15日~5月20日");
- window.location.href="/glcc";
+ window.location.href = "/glcc";
}
}
@@ -30,18 +33,42 @@ export default (props) => {
{/* */}
{/*
*/}
- {/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}> */}
-
+ {/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}> */}
+ {/*
*/}
+ {/* 报名入口 */}
+
+ {/* 项目报名 */}
+
+
+

+
项目报名 >
+
项目报名已截止
+
+
项目报名开启,导师席位虚位以待
+
+ {/* 学生报名 */}
+
{window.location.href="/glcc/student/2"}}>
+
+

+
学生报名 >
+
+
选择感兴趣的课题,开启您的开源之旅
- {/* */}
- {/*
*/}
-
-
活动简介
-
GitLink编程夏令营(GLCC),是在CCF中国计算机学会指导下,由CCF开源发展委员会(CCF ODC)举办的面向全国高校学生的暑期编程活动。活动将覆盖近千所高校,并联合各大开源基金会、开源企业、开源社区、开源专家,旨在鼓励青年学生通过参加真实的开源软件开发,提升自身技术能力,为开源社区输送优秀人才。为青年学生提供开放友好的交流平台,希望进一步推动国内开源社区的繁荣发展。
-
+ {/* */}
+
+
+
活动简介
+
+
GitLink编程夏令营(GLCC),是在CCF中国计算机学会指导下,由CCF开源发展委员会(CCF ODC)举办的面向全国高校学生的暑期编程活动。活动将覆盖近千所高校,并联合各大开源基金会、开源企业、开源社区、开源专家,旨在鼓励青年学生通过参加真实的开源软件开发,提升自身技术能力,为开源社区输送优秀人才。为青年学生提供开放友好的交流平台,希望进一步推动国内开源社区的繁荣发展。
+

+
+
+
+
diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss
index 593014cc..5805d848 100644
--- a/src/glcc/home/index.scss
+++ b/src/glcc/home/index.scss
@@ -17,23 +17,69 @@
.ant-btn-primary{
background-color: #466aff;
border-color: #466aff;
-
&:hover{
opacity: .8;
}
}
- .apply-btn {
+ .applyBox {
position: absolute;
- top: 15vw;
- left: 18.8vw;
- width: 152px;
- height: 40px;
- background-color: #2e5bfe;
- border: 1px solid #466aff;
- color: #fff;
+ top: 21vw;
+ left: 17.5vw;
padding-left: 18px;
cursor: pointer;
+ display: flex;
+ .apply{
+ color:#666666;
+ font-size:15px;
+ padding: 20px 0 20px 30px;
+ background-image:linear-gradient(45deg,#C6D3F0 0%,#C9D8FF 50.63%,#E7ECFE 100%);
+ border:1px solid #ffffff;
+ border-radius:4px;
+ box-shadow:0px 0px 6px rgba(255, 255, 255, 0.73);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ width: 355px;
+ .til{
+ margin-left: 10px;
+ font-family:PingFang SC;
+ font-weight:700;
+ color:#333333;
+ font-size:18px;
+ margin-bottom: 10px;
+ }
+ &:hover, &:hover .til{
+ color:#466aff;
+ }
+ .hover-show{
+ display: none;
+ }
+ &:hover .hover-none, &:hover .pt6{
+ display: none;
+ }
+ &:hover.project{
+ background-image:linear-gradient(45deg,#EBEFFF 0%, #E0E4F9 50.63%,#F1F1F1 100%);
+ box-shadow:0px 0px 6px #466aff;
+ cursor: default;
+ .hover-show{
+ display: inline-block;
+ margin-left: 10px;
+ font-weight:700;
+ color: #999999;
+ font-size:18px;
+ }
+ }
+ }
+ .apply:last-child{
+ margin-left: 35px;
+ }
+ .applyIcon{
+ width: 30px;
+ }
+ .pt6{
+ padding-top: 10px;
+ }
}
.apply-text {
font-family: Alibaba PuHuiTi;
@@ -84,7 +130,7 @@
min-width: 62.5vw;
max-width: 98vw;
margin: 0 auto;
- padding-top: 45px;
+ padding-top: 65px;
}
// 1行省略号
@@ -109,25 +155,34 @@
}
.introduce {
- z-index: 1;
- position: relative;
- top: -45px;
- background-image: linear-gradient(
- 163.51deg,
- #e5ecff 0%,
- #e0e9ff 32.91%,
- #fbfcff 100%
- );
- background: url("../img/introduce-bg.png");
- box-shadow: 0 0 12px rgba(161, 186, 255, 0.6);
- background-size: 100% 100%;
- padding: 48px;
+ // z-index: 1;
+ // position: relative;
+ // top: -45px;
+ // background-image: linear-gradient(
+ // 163.51deg,
+ // #e5ecff 0%,
+ // #e0e9ff 32.91%,
+ // #fbfcff 100%
+ // );
+ // background: url("../img/introduce-bg.png");
+ // box-shadow: 0 0 12px rgba(161, 186, 255, 0.6);
+ // background-size: 100% 100%;
+ // padding: 48px;
+ min-height: 500px;
+ background-image:linear-gradient(132.67deg,#e5ecff 0%,#e0e9ff 53.13%,#fbfcff 100%);
.glcc-tit {
- margin-bottom: 30px !important;
+ margin-bottom: 60px !important;
}
.introduce-content {
color: #202d40;
font-size: 15px;
line-height: 30px;
}
+ .introduceBox{
+ display: flex;
+ .introduceImg{
+ width: 32vw;
+ margin-left: 3vw;
+ }
+ }
}
diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx
index c9d25532..8cfdb9ed 100644
--- a/src/glcc/home/lightspot/index.jsx
+++ b/src/glcc/home/lightspot/index.jsx
@@ -37,9 +37,16 @@ function Lightspot(props) {
有兴趣成为GLCC的导师吗?
想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣
{/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名 */}
-
立即报名
+ {/* onClick={goToApply} */}
+
项目报名项目报名已截止
-
+
+
你是开源新手,有兴趣参加GLCC吗?
+
想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。
+ {/*
{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}>立即报名 */}
+
{window.location.href="/glcc/student/2"}}>学生报名
+
+ {/*
*/}
@@ -50,19 +57,19 @@ function Lightspot(props) {
-

+
覆盖全国千所高校、万名会员
活动邀请10+全球顶尖开源基金会,100+顶级开源项目社区,致力营造专业、开放的开源社区
-

+
结识开源伙伴和技术大咖
每个项目配备一名导师,参与开源项目开发可接受一线资深开源项目专家专业指导,结识志同道合的开发伙伴
-

+
丰厚奖励&实习绿色通道
入选同学可获得丰厚奖金,并有机会进入优秀开源项目企业实习或工作,受邀参与开源大会等机会
diff --git a/src/glcc/home/lightspot/index.scss b/src/glcc/home/lightspot/index.scss
index a99e5e66..7b708f88 100644
--- a/src/glcc/home/lightspot/index.scss
+++ b/src/glcc/home/lightspot/index.scss
@@ -10,6 +10,7 @@
.info-teacher {
display: flex;
justify-content: space-between;
+ margin-bottom: 50px;
}
.teacher-text {
margin-right: 2.84%;
@@ -26,6 +27,19 @@
opacity: .8;
color: white !important;
cursor: pointer;
+ .hover-show{
+ display: inline-block;
+ }
+ .hover-none{
+ display: none;
+ }
+ }
+ &:hover.project{
+ background-color:#abafbe;
+ cursor: default;
+ }
+ .hover-show{
+ display: none;
}
}
}
diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx
index 97f13111..364ed825 100644
--- a/src/glcc/home/partner/index.jsx
+++ b/src/glcc/home/partner/index.jsx
@@ -25,6 +25,8 @@ import log65 from '../../img/65@2x.png';
import log67 from '../../img/67@2x.png';
import log69 from '../../img/69@2x.png';
import log70 from '../../img/浙江大学.png';
+import logo1 from '../../img/logo1.png';
+import logo2 from '../../img/logo2.png';
function Partner() {
return (
@@ -149,6 +151,8 @@ function Partner() {
{window.open("https://www.ecnu.edu.cn/")}}>

{window.open("http://www.csust.edu.cn/")}}>

{window.open("https://www.jnu.edu.cn/")}}>

+ {window.open("https://www.shu.edu.cn/")}}>

+ {window.open("https://www.bnu.edu.cn/")}}>

diff --git a/src/glcc/img/apply1.png b/src/glcc/img/apply1.png
new file mode 100644
index 00000000..1981aa58
Binary files /dev/null and b/src/glcc/img/apply1.png differ
diff --git a/src/glcc/img/apply2.png b/src/glcc/img/apply2.png
new file mode 100644
index 00000000..6d80273d
Binary files /dev/null and b/src/glcc/img/apply2.png differ
diff --git a/src/glcc/img/apply_bg1.png b/src/glcc/img/apply_bg1.png
new file mode 100644
index 00000000..c2b4a222
Binary files /dev/null and b/src/glcc/img/apply_bg1.png differ
diff --git a/src/glcc/img/apply_bg2.png b/src/glcc/img/apply_bg2.png
new file mode 100644
index 00000000..850ce493
Binary files /dev/null and b/src/glcc/img/apply_bg2.png differ
diff --git a/src/glcc/img/banner.png b/src/glcc/img/banner.png
index 9fa40a46..3fe2e801 100644
Binary files a/src/glcc/img/banner.png and b/src/glcc/img/banner.png differ
diff --git a/src/glcc/img/introduce.png b/src/glcc/img/introduce.png
new file mode 100644
index 00000000..43c007dd
Binary files /dev/null and b/src/glcc/img/introduce.png differ
diff --git a/src/glcc/img/logo1.png b/src/glcc/img/logo1.png
new file mode 100644
index 00000000..590e9564
Binary files /dev/null and b/src/glcc/img/logo1.png differ
diff --git a/src/glcc/img/logo2.png b/src/glcc/img/logo2.png
new file mode 100644
index 00000000..e69c4f1e
Binary files /dev/null and b/src/glcc/img/logo2.png differ
diff --git a/src/glcc/img/projectBg.png b/src/glcc/img/projectBg.png
new file mode 100644
index 00000000..7e469985
Binary files /dev/null and b/src/glcc/img/projectBg.png differ
diff --git a/src/glcc/img/projectDetailTaskBg.png b/src/glcc/img/projectDetailTaskBg.png
new file mode 100644
index 00000000..4caff1ae
Binary files /dev/null and b/src/glcc/img/projectDetailTaskBg.png differ
diff --git a/src/glcc/img/qqChat.png b/src/glcc/img/qqChat.png
new file mode 100644
index 00000000..4e2d7d66
Binary files /dev/null and b/src/glcc/img/qqChat.png differ
diff --git a/src/glcc/img/student.png b/src/glcc/img/student.png
new file mode 100644
index 00000000..ede714ea
Binary files /dev/null and b/src/glcc/img/student.png differ
diff --git a/src/glcc/img/studentProject.png b/src/glcc/img/studentProject.png
new file mode 100644
index 00000000..f72cd4a5
Binary files /dev/null and b/src/glcc/img/studentProject.png differ
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index cc621dde..9bdd9010 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -23,12 +23,22 @@ const Apply = Loadable({
loader: () => import("./apply"),
loading: Loading,
});
-// 开源夏令营报名页面
+// 开源夏令营帮助中心页面
const Help = Loadable({
loader: () => import("./help"),
loading: Loading,
});
+// 任务管理审核
+const Student = Loadable({
+ loader: () => import("./student"),
+ loading: Loading,
+});
+// 开源夏令营项目、课题列表页面
+const Project = Loadable({
+ loader: () => import("./project"),
+ loading: Loading,
+});
const Glcc = (propsF) => {
// 判断时间是否在开源夏令营报名时间内(4月15日~5月20日)
@@ -37,6 +47,13 @@ const Glcc = (propsF) => {
return (
+ {/* 学生报名 */}
+ (
+
+ )}
+ >
{/* 开源夏令营报名页面 */}
{
)}
>
+ {/* 项目/课题列表 */}
+ (
+
+ )}
+ >
{/* 首页 */}
{
+ const [info, setInfo] = useState(detail);
+
+ useEffect(()=>{
+ if(!detail && projectId){
+ // 通过项目Id查询项目详情
+ getProjectById(projectId).then(response=>{
+ if(response && response.message === 'success'){
+ setInfo(response.data)
+ }
+ })
+ }
+ },[detail])
+
+ // detail && (detail.registrationTaskList = [{
+ // id: 1,
+ // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊',
+ // tutorName: 'daoshi',
+ // tutorMail: 'email',
+ // taskDesc: 'sfdjhdf,hsldf',
+ // taskUrl: 'url',
+ // taskReward: '9000'
+ // },{
+ // id: 2,
+ // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊',
+ // tutorName: 'daoshi',
+ // tutorMail: 'email',
+ // taskDesc: 'sfdjhdf,hsldfaaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊',
+ // taskUrl: 'url',
+ // taskReward: '9000'
+ // }])
+ return (
+ info ?
+
+
{info.projectName}
+ {info.projectType &&
{info.projectType}}
+
{info.gitlinkUrl}
+
{info.officialWebsiteUrl}
+
+ {info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{
+ return
+
+
{item.taskName}
+
导师姓名: {item.tutorName}
+
邮箱地址: {item.tutorMail}
+
+
+
{item.taskDesc}
+
课题链接: {item.taskUrl}
+
{applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? : }
+
+
¥ {item.taskReward}
+
+ }) :
}
+ :
+ )
+}
\ No newline at end of file
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx
new file mode 100644
index 00000000..74b4bc62
--- /dev/null
+++ b/src/glcc/project/index.jsx
@@ -0,0 +1,74 @@
+import React , { useEffect , useState } from 'react';
+import { Spin } from 'antd';
+import { Route, Switch } from "react-router-dom";
+import banner from "../img/studentProject.png";
+import './index.scss';
+import Loadable from "react-loadable";
+import Loading from "../../Loading";
+import { Link } from 'react-router-dom';
+import { getStudentApplyInfo } from '../api';
+
+// 项目列表页面
+const ProjectList = Loadable({
+ loader: () => import("./projectList"),
+ loading: Loading,
+});
+// 课题列表页面
+const TaskList = Loadable({
+ loader: () => import("./taskList"),
+ loading: Loading,
+});
+
+function Project(propsF) {
+ const {location, current_user} = propsF;
+ const {pathname} = location;
+
+ // 用户已报名课题id数组
+ const [applyTaskId, setApplyTaskId] = useState({});
+ // 刷新用户课题报名信息
+ const [studentInfoReset, setStudentInfoReset] = useState(undefined);
+
+ useEffect(()=>{
+ // 获取用户课题报名信息current_user user_id
+ getStudentApplyInfo({userId: current_user && 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])
+ return(
+
+

+
+ 课题列表
+ 项目列表
+
+
+
+
+ (
+
+ )}
+ >
+ (
+
+ )}
+ >
+
+
+
+ )
+}
+export default Project;
\ No newline at end of file
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss
new file mode 100644
index 00000000..8dc06173
--- /dev/null
+++ b/src/glcc/project/index.scss
@@ -0,0 +1,160 @@
+.glcc_project{
+ background-color: #ebf2ff;
+ .head{
+ background-color:rgba(188, 208, 255, 0.27);
+ border:1px solid #ffffff;
+ text-align: center;
+ a{
+ padding: 18px 20px 20px;
+ display: inline-block;
+ color: #273778;
+ font-size: 18px;
+ font-weight:700;
+ line-height: 30px;
+ &.active{
+ border-bottom: 1px solid #5474df;;
+ }
+ &:last-child{
+ margin-left: 40px;
+ }
+ }
+ }
+ .gobackBox{
+ width: 1200px;
+ margin: 0 auto;
+ padding: 25px 0 12px;
+ color: #202d40;
+ font-size: 16px;
+ border-bottom: 1px dashed #bec5d5;
+ a{
+ color:#a4aabb;
+ }
+ }
+ .listBox{
+ background-image:linear-gradient(180deg,#ebf2ff 0%,#ebf2ff 43.09%,#f3f4f8 100%);
+ .list{
+ width: 1200px;
+ margin: 0 auto;
+ .search{
+ width: 40%;
+ margin: 0 auto;
+ padding: 25px 0 40px;
+ }
+ .search .ant-btn, .search .ant-input{
+ height: 48px;
+ }
+ .search .ant-btn{font-size: 30px;}
+ .search .ant-input{
+ font-size: 16px;
+ border-color: #ebf2ff;
+ &:hover{
+ border-color: #466aff;
+ }
+ }
+ }
+ .search{
+ .ant-btn-primary{
+ background-color:#466aff;
+ border-color: #466aff;
+ }
+ // .ant-input:hover{
+ // border-color: #466aff;
+ // }
+ }
+ }
+}
+.glcc-banner {
+ width: 100%;
+}
+// 项目详情框
+.projectDetailBox{
+ &.byTask{
+ background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
+ border:1px solid #ffffff;
+ border-radius:4px;
+ box-shadow:0px 0px 10px rgba(100, 141, 255, 0.2);
+ padding: 30px 30px 50px;
+ .taskItem{
+ .center{
+ width: 60%;
+ }
+ .right{padding-right: 10px;}
+ }
+ }
+ &.nodata{width: 200px;}
+ font-size:15px;
+ line-height:30px;
+ .projectDetailHead{
+ color:#465474;
+ padding-bottom: 12px;
+ border-bottom: 1px dashed #bec5d5;
+ .name{
+ font-weight:700;
+ color:#3753c5;
+ font-size:20px;
+ }
+ .type{
+ display: inline-block;
+ border:1px solid #6680bb;
+ border-radius:4px;
+ margin-left: 12px;
+ padding: 4px 6px;
+ }
+ }
+ .taskItem {
+ display: flex;
+ justify-content: space-between;
+ background-color: #ffffff;
+ box-shadow: 0px 0px 12px rgba(71, 105, 198, 0.4);
+ .left{
+ width: 250px;
+ background-image: url('../img/projectDetailTaskBg.png');
+ background-size: 100% 100%;
+ padding: 22px 20px;
+ color:#25304a;
+ .taskTitle{
+ color:#1834a7;
+ font-size:18px;
+ }
+ .email span{color:#466aff;}
+ }
+ .center{
+ width: 66%;
+ text-align: left;
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ .taskDesc{
+ color:#6b6b6b;
+ }
+ .taskUrl{
+ color:#465474;
+ font-size:16px;
+ span{color:#466aff;}
+ }
+ .applyBut{
+ background-color:#466aff;
+ border-color: #466aff;
+ &:hover{background-color:#5d7cff;}
+ &:focus{background-color:#1140ff;}
+ }
+ }
+ .right{
+ font-weight:700;
+ color:#ff8800;
+ font-size:24px;
+ padding: 30px 30px 0 0;
+ }
+ }
+}
+.projectItemPopover{width: 1200px;}
+.projectItemPopover .ant-popover-inner{
+ background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
+ border:1px solid #ffffff;
+ border-radius:4px;
+ box-shadow:0px 0px 10px rgba(100, 141, 255, 0.2);
+ .ant-popover-inner-content{
+ padding: 30px 30px 50px;
+ }
+}
\ No newline at end of file
diff --git a/src/glcc/project/projectList/index.jsx b/src/glcc/project/projectList/index.jsx
new file mode 100644
index 00000000..067873ad
--- /dev/null
+++ b/src/glcc/project/projectList/index.jsx
@@ -0,0 +1,48 @@
+import React , { useEffect , useState } from 'react';
+import { Input, Popover, Table, Tooltip } from 'antd';
+import { main_site_url } from '../../fetch';
+import './index.scss';
+import { projectList } from '../../api';
+import ProjectDetail from '../component/projectDetail';
+const {Search} = Input;
+
+// 项目列表
+function ProjectList({applyTaskId}) {
+ // 输入搜索框
+ const [keyword, setKeyword] = useState(undefined);
+ const [data, setData] = useState([]);
+
+ useEffect(()=>{
+ const params = {
+ curPage: 1,
+ keyword,
+ pageSize: 20
+ }
+ projectList(params).then(response=>{
+ if(response && response.message === "success"){
+ setData(response.data.rows);
+ }
+ })
+ },[keyword])
+
+ return(
+
+
+
{setKeyword(value)}}/>
+
+ {data && data.map((item, index)=>{
+ return
} trigger='click' overlayClassName='projectItemPopover'>
+
+
+
+
{item.projectName}
+
{item.projectIntro}
+
+
+ })}
+
+
+
+ )
+}
+export default ProjectList;
\ No newline at end of file
diff --git a/src/glcc/project/projectList/index.scss b/src/glcc/project/projectList/index.scss
new file mode 100644
index 00000000..511b1f8b
--- /dev/null
+++ b/src/glcc/project/projectList/index.scss
@@ -0,0 +1,80 @@
+.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;
+ // justify-content: space-between;
+ .projectItem{
+ width: 30%;
+ background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%);
+ border: 1px solid;
+ border-color: #ffffff;
+ border-radius: 4px;
+ box-shadow:0px 0px 8px rgba(93, 131, 255, 0.26);
+ text-align: center;
+ margin-bottom: 50px;
+ background-image: url('../../img/projectBg.png');
+ background-size: 100% 100%;
+ margin-left: 5%;
+ &.firstBox{
+ margin-left: 0;
+ }
+ &:hover{
+ cursor: pointer;
+ background-image: none;
+ // #E8EDFF—#FFFFFF(85%)
+ background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%);
+ }
+ .border{
+ height: 5px;
+ background-color:#657edf;
+ border-radius:2px 2px 0px 0px;
+ }
+ .projectLogo{
+ width: 100px;
+ height: 100px;
+ border: 1px solid #fff;
+ border-radius: 50%;
+ text-align: center;
+ overflow: hidden;
+ margin: 25px auto 10px;
+ img{
+ width: 100%;
+ height: 100%;
+ display: block;
+ }
+ }
+ .title{
+ color:#2a51bf;
+ font-size:17px;
+ line-height:30px;
+ margin-bottom: 15px;
+ padding: 0 50px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .intro{
+ color:#4f5d84;
+ font-size:15px;
+ margin-bottom: 15px;
+ display: -webkit-box;
+ overflow: hidden;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ text-overflow: ellipsis;
+ text-align: left;
+ padding: 0 14px;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx
new file mode 100644
index 00000000..df2d2202
--- /dev/null
+++ b/src/glcc/project/taskList/index.jsx
@@ -0,0 +1,136 @@
+import React, { Fragment, useEffect, useState } from 'react';
+import { Input, message, Modal, Table, Tooltip } from 'antd';
+import './index.scss';
+import { cancelTaskApply, taskList } from '../../api';
+import ProjectDetail from '../component/projectDetail';
+const { Search } = Input;
+
+// 课题列表
+function TaskList({applyTaskId, setStudentInfoReset}) {
+ const [visible, setVisible] = useState(false);
+ const [deleteTaskId, setDeleteTaskId] = useState(undefined);
+ // 输入搜索框
+ const [keyword, setKeyword] = useState(undefined);
+ const [data, setData] = useState([]);
+ // table
+ const [current, setCurrent] = useState(1);
+ const [total, setTotal] = useState(0);
+ const [pageSize, setPageSize] = useState(20);
+
+ 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: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => {
+ return (
+
+ {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)}}>申请课题}
+
+ )
+ })
+ },
+ ]
+
+ const customExpandIcon = (props) => {
+ if (props.expanded) {
+ return {
+ props.onExpand(props.record, e);
+ }}>项目详情
+ } else {
+ return {
+ props.onExpand(props.record, e);
+ }}>项目详情
+ }
+ }
+
+ const expandRow = (record) => {
+ return
+ }
+
+ // 申请课题按钮点击函数
+ function applyTask(id){
+ // 判断用户是否已经报名两个课题
+ if(applyTaskId.length >= 2){
+ message.error('最多只能同时报名两个课题');
+ }else{
+ // 跳转到学生报名页
+ window.location.href=`/glcc/student/apply/${id}`;
+ }
+ }
+
+ // 取消课题按钮点击函数
+ function cancelApply(){
+ const id = [];
+ id.push(applyTaskId[deleteTaskId]);
+ const params = {
+ ids: id
+ }
+ cancelTaskApply(params).then(response=>{
+ if(response && response.message === "success"){
+ setVisible(false);
+ setStudentInfoReset(Math.random());
+ message.success('取消成功');
+ }
+ })
+ }
+
+ // 改变pagesize
+ function onShowSizeChange(current, pageSize){
+ setPageSize(pageSize);
+ }
+
+ // 切换页数
+ function changePage(page, pageSize){
+ setCurrent(page);
+ }
+
+ useEffect(() => {
+ const params = {
+ curPage: current,
+ keyword,
+ pageSize
+ }
+ taskList(params).then(response => {
+ if (response && response.message === "success") {
+ setData(response.data.rows);
+ setTotal(response.data.total)
+ }
+ })
+ }, [keyword, current, pageSize])
+
+ return (
+
+
+
{ setKeyword(value) }} />
+
+
+
{setVisible(false)}}
+ onOk={cancelApply}
+ wrapClassName='cancelApplyTask'
+ >
+ !取消申请即删除本次报名记录,确定取消?
+ 此操作将永久删除该报名记录,请进行确认以防数据的丢失
+
+
+ )
+}
+export default TaskList;
\ No newline at end of file
diff --git a/src/glcc/project/taskList/index.scss b/src/glcc/project/taskList/index.scss
new file mode 100644
index 00000000..7520f229
--- /dev/null
+++ b/src/glcc/project/taskList/index.scss
@@ -0,0 +1,91 @@
+.taskList{
+ padding-bottom: 50px;
+ .ant-table{
+ border: 1px solid white;
+ }
+}
+.taskTableColumns span div span{
+ font-size: 16px;
+ font-weight:700;
+ color:#273778;
+}
+.taskTableColumns span{
+ font-size: 15px;
+ color: #353f5e;
+}
+.taskTableColumns.taskName a{
+ color: #2545c9;
+}
+.ant-table-thead > tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{
+ background-color:#F1F6FF;
+ border-bottom: 1px dashed #bec5d5;
+}
+.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > .taskTableColumns{
+ background-color:#fbfbfc;
+}
+.actionColumns{
+ display: flex;
+ .actionBox, .actionBox span{
+ cursor: pointer;
+ color: #466aff;
+ &:hover{color:#5d7cff !important;}
+ &:active{color:#1140ff !important;}
+ }
+ .applyTask, span.applyTask{
+ color:#eb9350;
+ &:hover{color: #FFB074 !important;}
+ &:active{color:#D66A17 !important;}
+ }
+ .cancelApply{visibility: hidden;}
+}
+tr:hover .actionColumns .cancelApply{
+ visibility: visible;
+ color: #E31E1E;
+}
+.cancelApplyTask{
+ .ant-modal-close{top: 0px !important;}
+ .ant-modal-header{
+ padding: 8px 20px;
+ background-color: #e9edff;
+ .ant-modal-title{text-align: left;}
+ }
+ .carefulIcon{
+ width: 36px;
+ height: 36px;
+ background: #ca0002;
+ display: inline-block;
+ border-radius: 50%;
+ text-align: center;
+ line-height: 36px;
+ font-size: 18px;
+ color: white;
+ margin-right: 15px;
+ }
+ .tilTask{
+ color:#333333;
+ font-size:16px;
+ margin-left: 35px;
+ }
+ .tipTask{
+ color:#666666;
+ font-size:14px;
+ margin: 30px 0 30px 86px !important;
+ }
+ .ant-modal-footer{
+ border-top: none;
+ text-align: center;
+ padding-bottom: 50px;
+ .ant-btn{
+ &.ant-btn-default{
+ color: #df0002;
+ }
+ &:hover{
+ border-color: #466aff;
+ color: #466aff;
+ &.ant-btn-default{
+ border-color: #df0002;
+ color: #df0002;}
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/glcc/siderBarHelp.js b/src/glcc/siderBarHelp.js
index c59fbafc..7079133c 100644
--- a/src/glcc/siderBarHelp.js
+++ b/src/glcc/siderBarHelp.js
@@ -1,12 +1,30 @@
import React from 'react';
+import { Popover } from 'antd';
+import qqChat from "./img/qqChat.png";
import './index.scss';
function SiderBar() {
+ const content = (
+
+
+
扫码进入QQ交流群
+
把握最新活动资讯
+
+ )
+
return (
// 开源夏令营定制帮助中心调整按钮
- window.open("/glcc/help")}>
-
- 帮助中心
+
+
+
+
+ QQ交流
+
+
+
window.open("/glcc/help")}>
+
+ 帮助中心
+
)
}
diff --git a/src/glcc/student/index.jsx b/src/glcc/student/index.jsx
new file mode 100644
index 00000000..51948a58
--- /dev/null
+++ b/src/glcc/student/index.jsx
@@ -0,0 +1,477 @@
+import React, { useCallback, useEffect, useState, Fragment } from 'react';
+import { Breadcrumb, Button, Form, Input, Select, Upload, Cascader, Spin } from 'antd';
+import { getUploadActionUrl, getUrl, appendFileSizeToUploadFileAll } from 'educoder';
+import { locData } from '../../forge/Utils/locData';
+import { getStudentApplyInfo, taskList, studentApply, studentApplyEdit } from '../api';
+import TextArea from 'antd/lib/input/TextArea';
+import { httpUrl } from '../fetch';
+import banner from "../img/banner.png";
+import studentSvg from "../img/student.png";
+import './index.scss';
+import { Link } from 'react-router-dom';
+
+const Option = Select.Option;
+const gradeList = [
+ { id: '大一', name: '大一' },
+ { id: '大二', name: '大二' },
+ { id: '大三', name: '大三' },
+ { id: '大四', name: '大四' },
+ { id: '大五', name: '大五' },
+ { id: '研一', name: '研一' },
+ { id: '研二', name: '研二' },
+ { id: '研三', name: '研三' }];
+function Apply(props) {
+ const { form, current_user, showNotification, isGlccApplyDate, match } = props;
+ const taskId = Number(match.params.taskId);
+ // 可用于开发时不同账号报名
+ // current_user && (current_user.user_id = 6)
+ // current_user && (current_user.userName = "创新使者")
+ const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
+ const [imageUrl, setImageUrl] = useState(undefined);
+ const [loading, setLoading] = useState(false);
+ const [reload, setReload] = useState();
+ const [userApplyInfo, setUserApplyInfo] = useState(undefined);
+ const [editable, setEditable] = useState(true);
+ const [files, setFiles] = useState([]);
+ const [files1, setFiles1] = useState([]);
+ const initTask = {
+ taskId,
+ memo: '',
+ memoAttachmentId: ''
+ };
+ const [myTaskList, setMyTaskList] = useState([]);
+ const [allTaskList, setAllTaskList] = useState([]);
+
+ useEffect(() => {
+ // 进入此页面置顶
+ window.scrollTo(0, 0);
+ if (!isGlccApplyDate) {
+ // 不在开源夏令营报名时间之内
+ window.location.href = "/glcc";
+ } else if (current_user && current_user.login) {
+
+ } else {
+ window.location.href = "/login?go_page=/glcc";
+ }
+ }, [])
+
+ useEffect(() => {
+ const params = {
+ curPage: 1,
+ pageSize: 10000
+ }
+ taskList(params).then(response => {
+ if (response && response.message === "success") {
+ setAllTaskList(response.data.rows);
+ }
+ })
+ }, [])
+
+
+ useEffect(() => {
+ // 获取当前用户报名信息
+ current_user && getStudentApplyInfo({ userId: current_user.user_id }).then(response => {
+ if (response && response.message === "success" && response.data) {
+ let data = response.data;
+ let applyInfo = {
+ grade: data.grade,
+ location: data.location && data.location.split(','),
+ mail: data.mail,
+ phone: data.phone,
+ proveAttachmentId: data.proveAttachmentId,
+ school: data.school,
+ studentName: data.studentName,
+ userId: current_user.user_id,
+ profession: data.profession,
+ };
+
+ if (Array.isArray(data.registrationStudentTaskList)) {
+ if (data.registrationStudentTaskList.length) {
+ let initTaskList = [];
+ for (const [i, item] of data.registrationStudentTaskList.entries()) {
+ applyInfo['memo' + i] = item.memo;
+ applyInfo['taskId' + i] = item.taskId;
+ applyInfo['memoAttachmentId' + i] = item.memoAttachmentId;
+
+ if (i == 0) {
+ setFiles([{
+ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件',
+ id: item.memoAttachmentId,
+ uid: item.memoAttachmentId
+ }]);
+ } else {
+ setFiles1([{
+ name: item.memoAttachment && item.memoAttachment.fileName || '已上传文件',
+ id: item.memoAttachmentId,
+ uid: item.memoAttachmentId,
+ }]);
+ }
+
+ initTaskList.push({
+ id: item.id,
+ memo: item.memo,
+ memoAttachmentId: item.memoAttachmentId,
+ taskId: item.taskId,
+ });
+ }
+ setMyTaskList(initTaskList);
+
+ // 如果只有一条报名数据,且课题id与当前id不一致,那么新增一条默认数据
+ if (data.registrationStudentTaskList.length === 1 && data.registrationStudentTaskList[0].taskId != taskId) {
+ addTask(data.registrationStudentTaskList);
+ }
+ } else {
+ // 先增加数据再给选择框赋默认值,否则不生效
+ new Promise((resove) => {
+ setMyTaskList(() => {
+ resove();
+ return [initTask]
+ });
+ }).then(res => setFieldsValue({ 'taskId0': taskId }))
+ }
+ }
+
+ setFieldsValue(applyInfo);
+ setUserApplyInfo(response.data);
+ } else {
+ // 先增加数据再给选择框赋默认值,否则不生效
+ new Promise((resove) => {
+ setMyTaskList(() => {
+ resove();
+ return [initTask]
+ });
+ }).then(res => setFieldsValue({ 'taskId0': taskId }))
+ }
+ })
+ }, [current_user, reload])
+
+ // 当用户输入结束时 检验用户输入是否符合规范
+ function verify(dataIndex) {
+ validateFields([dataIndex], (error, values) => {
+ if (error && error[dataIndex]) {
+ return;
+ }
+ })
+ }
+
+ // 学生报名夏令营
+ function handleSubmit(e) {
+ e.preventDefault();
+ validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ setLoading(true);
+ const params = {
+ grade: values.grade,
+ location: Array.isArray(values.location) && values.location.join(),
+ mail: values.mail,
+ phone: values.phone,
+ proveAttachmentId: values.proveAttachmentId.file ? values.proveAttachmentId.file.response.id : userApplyInfo.proveAttachmentId,
+ school: values.school,
+ profession: values.profession,
+ studentName: values.studentName,
+ userId: current_user.user_id,
+ registrationStudentTaskList: myTaskList
+ }
+
+ if (userApplyInfo) {
+ params.id = userApplyInfo.id;
+ studentApplyEdit(params).then(response => {
+ if (response && response.message === "success") {
+ showNotification("修改信息成功");
+ setReload(Math.random());
+ setLoading(false);
+ }
+ });
+ } else {
+ studentApply(params).then(response => {
+ if (response && response.message === "success") {
+ showNotification("报名成功");
+ setReload(Math.random());
+ setLoading(false);
+ }
+ });
+ }
+ }
+ });
+ };
+
+ const helper = useCallback(
+ (label, extra, name, rules, widget) => (
+
+ {getFieldDecorator(name, { rules, validateFirst: true })(widget)}
+
+ ),
+ []
+ );
+
+
+ // 检查文件上传是否符合规定
+ function beforeUpload(file) {
+ const isType = file.type === "image/png" || file.type === "image/jpg" || file.type === "image/jpeg";
+ if (!isType) {
+ showNotification("只能上传png、jpg、jpeg格式文件");
+ }
+ return isType;
+ }
+
+ function getBase64(img, callback) {
+ const reader = new FileReader();
+ reader.addEventListener('load', () => callback(reader.result));
+ reader.readAsDataURL(img);
+ reader.onload = function (e) {
+ setImageUrl(e.target.result); // 上传的图片的编码
+ }
+ }
+
+ // 图片上传完成后
+ function handleChange(info) {
+ if (info && info.file && info.file.status === "done") {
+ getBase64(info.file.originFileObj, imageUrl =>
+ setImageUrl(imageUrl)
+ );
+ }
+ }
+
+ // 自荐书上传
+ function bookChange(info, i) {
+ if (info.file.status === 'uploading' || info.file.status === "done" || info.file.status === 'removed') {
+ setLoading(true);
+ if (info.file.status === "done") {
+ changeTaskItem('memoAttachmentId', info.fileList[0].response && info.fileList[0].response.data.id, i)
+ }
+ if (info.file.status === 'removed') {
+ console.log(1111)
+ changeTaskItem('memoAttachmentId', '', i);
+ }
+ console.log(info.fileList);
+ if (i) {
+ setFiles1(appendFileSizeToUploadFileAll(info.fileList).slice(-1));
+ } else {
+ setFiles(appendFileSizeToUploadFileAll(info.fileList).slice(-1));
+ }
+ }
+
+ if (info.file.status === "done" || info.file.status === 'removed') {
+ setLoading(false);
+ }
+ }
+
+ // 支持文件下载
+ function download(file) {
+ const fileId = file.id || file.response.data.id;
+ window.open(`${httpUrl}/busiAttachments/download/${fileId}`);
+ }
+
+ function addTask(List) {
+ let taskListNew = List ? [...List] : [...myTaskList];
+ if (taskId != taskListNew[0].taskId) {
+ taskListNew.push(initTask);
+ // 先增加数据再给选择框赋默认值,否则不生效
+ new Promise((resove) => {
+ setMyTaskList(() => {
+ resove();
+ return taskListNew
+ });
+ }).then(res => setFieldsValue({ 'taskId1': taskId }))
+ } else {
+ taskListNew.push({ ...initTask, taskId: '' });
+ setMyTaskList(taskListNew);
+ }
+ }
+
+ function deleteTask(i) {
+ let taskListNew = myTaskList.slice();
+ let reWriteInfo;
+ if (i) {
+ reWriteInfo = {
+ taskId1: '',
+ memo1: '',
+ memoAttachmentId1: ''
+ }
+ setFiles1([]);
+ } else {
+ reWriteInfo = {
+ taskId0: taskListNew[1].taskId,
+ memo0: taskListNew[1].memo,
+ memoAttachmentId0: taskListNew[1].memoAttachmentId,
+ taskId1: '',
+ memo1: '',
+ memoAttachmentId1: ''
+ }
+ setFiles(files1);
+ setFiles1([]);
+ }
+
+ taskListNew.splice(i, 1);
+ setMyTaskList(taskListNew);
+ setFieldsValue(reWriteInfo);
+ }
+
+ function changeTaskItem(field, val, i) {
+ let taskListNew = [...myTaskList];
+ taskListNew[i][field] = val;
+ setMyTaskList(taskListNew);
+ }
+
+ return (
+
+

+
+
+
+ 开源夏令营
+ 查看项目
+ 学生报名
+
+
+
+
申请说明:
+
1、学生报名时间为2022年5月21日-6月19日,请在报名截止时间(北京时间2022年6月19日18点)前提交报名信息。
+
2、本次GLCC夏令营基于GitLink代码托管平台完成编程任务,若您没有平台账户,请先注册后完成课题申请
+
3、每位学员最多可申请2个课题,至多有且仅有1个课题可以入选
+
4、建议在提交课题申请,与课题导师邮件沟通,详细了解课题描述、编码任务、技能要求&编程语言、预期产出结果等信息,以便您能够选择最适合的课题
+
5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营微信群进行咨询
+
+
+
学生报名
+
+
申请课题
+
+ {getFieldDecorator("location", {
+ rules: []
+ })(
+
+ )}
+
+ {helper('所在年级',
+ '',
+ 'grade',
+ [],
+
+ )}
+ {helper('联系电话',
+ '',
+ 'phone',
+ [{ required: true, message: "请正确输入联系电话" }],
+
{ verify("phone") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} />
+ )}
+ {helper('邮箱地址',
+ '',
+ 'mail',
+ [{ required: true, message: "请正确输入邮箱地址" }],
+
{ verify("mail") }} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} />
+ )}
+
+
{helper('学生证明',
+ '请以图片的形式上传学生证明,格式为png、jpg、jpeg',
+ 'proveAttachmentId',
+ [{ required: true, message: "请正确上传学生证明" }],
+ userApplyInfo && userApplyInfo.proveAttachmentId ?
+ :
+ {imageUrl ?
: }
+
+ )}
+
+ {
+ myTaskList.map((item, i) => {
+ return (
+
+ 课题信息({i + 1}/2) {myTaskList.length > 1 && { deleteTask(i) }}>}
+ {helper('课题名称',
+ '',
+ 'taskId' + i,
+ [{ required: true, message: "请选择课题名称" }],
+
+ )}
+ {helper('自荐书',
+ '',
+ 'memo' + i,
+ [{ required: true, message: "请正确输入自荐书" },
+ { max: 500, message: '超出限制长度500位字符,请重新编辑' }],
+
+
+ {helper('附件',
+ '',
+ 'memoAttachmentId' + i,
+ [],
+
{ bookChange(info, i) }}
+ onDownload={download}
+ showUploadList={{
+ showDownloadIcon: true,
+ downloadIcon: ,
+ showRemoveIcon: true
+ }}
+ >
+ 上传自荐书
+
+ )}
+
+ )
+ })
+ }
+
+ {
+ myTaskList.length < 2 &&
+ }
+
+
+
+
+
+
+
+
+
+ )
+}
+export default Form.create()(Apply);
\ No newline at end of file
diff --git a/src/glcc/student/index.scss b/src/glcc/student/index.scss
new file mode 100644
index 00000000..be7b8ff1
--- /dev/null
+++ b/src/glcc/student/index.scss
@@ -0,0 +1,281 @@
+.glcc_student_apply {
+ font-family: PingFang SC;
+ background-image: linear-gradient(
+ 180deg,
+ #ebf2ff 0%,
+ #ebf2ff 43.09%,
+ #f3f4f8 100%
+ );
+ padding-bottom: 120px;
+
+ .has-error .ant-form-explain,
+ .has-error .ant-form-split {
+ position: absolute;
+ }
+ .ant-btn-primary{
+ background-color: #466aff;
+ border-color: #466aff;
+ &:hover {
+ background-color: #5d7cff;
+ border-color: #5d7cff;
+ }
+ &:active {
+ background-color: #1140ff;
+ border-color: #1140ff;
+ }
+ }
+ .apply {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ .glcc_breadcrumb {
+ padding: 18px 0;
+ border-bottom: 1px dashed #bec5d5;
+ margin-bottom: 30px;
+ }
+ .head_introduce {
+ background: #e4edff;
+ padding: 20px;
+ }
+ .head_tit {
+ color: #000000;
+ font-size: 15px;
+ line-height: 2;
+ }
+ .head_content {
+ color: #6c7283;
+ font-size: 14px;
+ line-height: 38px;
+ }
+ .head_bold {
+ font-weight: 700;
+ color: #333;
+ }
+ .main-tit {
+ margin: 25px 0;
+ img {
+ width: 25px;
+ margin-right: 10px;
+ }
+ .tit-text {
+ color: #333333;
+ font-size: 18px;
+ line-height: 30px;
+ }
+ }
+ .form-tit {
+ background-color: #e1e8ff;
+ color: #333333;
+ font-size: 18px;
+ line-height: 56px;
+ font-weight: 500;
+ text-align: center;
+ }
+ .item-tit {
+ width: 100%;
+ line-height: 66px;
+ color: #333333;
+ font-size: 16px;
+ border-bottom: 1px dashed #bec5d5;
+ margin-bottom: 20px !important;
+
+ &::before {
+ position: relative;
+ top: 2px;
+ content: "";
+ display: inline-block;
+ width: 5px;
+ height: 14px;
+ margin-right: 10px;
+ background-color: #466aff;
+ }
+
+ .item-tit-num{
+ color:#466aff;
+ }
+ }
+ .glcc_info_form {
+ padding: 0 15px;
+ }
+ .glcc_info_form {
+ display: flex;
+ flex-wrap: wrap;
+ .ant-row.ant-form-item {
+ margin-bottom: 20px;
+ display: flex;
+ width: 50%;
+ justify-content: flex-end;
+ }
+ .ant-form-item:nth-child(2n) {
+ .ant-form-item-control-wrapper {
+ padding-right: 3%;
+ }
+ }
+ .ant-col.ant-form-item-control-wrapper {
+ width: 85%;
+ }
+ .ant-form-item-label {
+ margin-right: 15px;
+ & > label::after {
+ content: none;
+ }
+ }
+ .ant-upload.ant-upload-select-picture-card {
+ margin-bottom: 0;
+ width: 118px;
+ height: 118px;
+ border: 1px solid;
+ }
+ .icon-tianjiadaohang:before {
+ color: #b3c3db;
+ }
+ .ant-upload-text {
+ color: #a4aabb;
+ }
+ .ant-input,
+ .ant-select-selection,
+ .ant-upload.ant-upload-select-picture-card {
+ background: none !important;
+ border-color: #b3c3db;
+ &:hover {
+ border-color: #466aff;
+ }
+ }
+ .has-error .ant-input:not([disabled]) {
+ border-color: #ef0000;
+ }
+ .disabledInput,
+ .disabledInput .ant-select-selection {
+ background-color: #e5ebf9 !important;
+ border: none;
+ color: #202d40;
+ }
+ .projectLogo {
+ width: 120px;
+ height: 120px;
+ border: 1px dashed #b3c3db;
+ border-radius: 4px;
+ line-height: 120px;
+ text-align: center;
+ img {
+ max-width: 100px;
+ max-height: 100px;
+ }
+ }
+ }
+ .ant-cascader-picker{
+ background: none;
+ &:hover{
+ .ant-cascader-input{
+ border:1px solid #466aff;
+ }
+ }
+ &:focus .ant-cascader-input {
+ box-shadow: none;
+ }
+
+ }
+ .introArea {
+ width: 100%;
+ .ant-row.ant-form-item {
+ width: auto;
+ justify-content: flex-start;
+ }
+ .ant-col.ant-form-item-control-wrapper {
+ width: 90%;
+ }
+ .ant-form-item-label {
+ width: 74px;
+ }
+ &.tips {
+ margin-left: 40px;
+ color: #e90000;
+ }
+ }
+ .update_item{
+ .ant-form-explain{
+ bottom: 17px;
+ }
+ }
+ .glcc_info_form .introArea.subInfo {
+ width: 100%;
+ text-align: center;
+ margin: 40px 0 70px -60px;
+ .sub {
+ width: 200px;
+ height: 36px;
+ background-color: #466aff;
+ border-color: #466aff;
+ &:hover {
+ background-color: #5d7cff;
+ border-color: #5d7cff;
+ }
+ &:active {
+ background-color: #1140ff;
+ border-color: #1140ff;
+ }
+ }
+ }
+ .explain {
+ background-color: #f6f9fe;
+ border: 2px solid;
+ border-color: #ffffff;
+ color: #6c7283;
+ padding: 20px 30px 30px 20px;
+ .c000 {
+ color: #000000;
+ }
+ div > .c000 {
+ font-weight: bold;
+ }
+ > div {
+ margin: 10px 0;
+ }
+ .link {
+ color: rgba(70, 106, 255, 1);
+ &:hover {
+ opacity: 0.8;
+ }
+ }
+ }
+ .applySuccess {
+ height: 45px;
+ border: 1px solid;
+ border-color: #466aff;
+ line-height: 45px;
+ padding-left: 20px;
+ color: #466aff;
+ }
+
+ .glcc_btn {
+ width: 90px;
+ height: 32px;
+ border: 1px solid;
+ border-color: #b3c3db;
+ border-radius: 4px;
+ color: #466aff;
+ font-size: 14px;
+ line-height: 30px;
+ text-align: center;
+ cursor: pointer;
+ &:hover{
+ opacity: .8;
+ }
+ }
+
+ .add_task{
+ margin-left:90px;
+ }
+
+ .icon-shanchu{
+ float: right;
+ color: #466aff;
+ cursor: pointer;
+ :hover{
+ color: #1140ff;
+ }
+ }
+}
+.glcc-banner {
+ width: 100%;
+}