From d91446dc120379f191b987c32a84dcc2cc6af4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Thu, 7 Apr 2022 09:47:38 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96glcc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 12 ++ src/glcc/home/award/index.jsx | 14 +++ src/glcc/home/award/index.scss | 3 + src/glcc/home/banner/index.jsx | 70 +++++++++++ src/glcc/home/banner/index.scss | 174 ++++++++++++++++++++++++++++ src/glcc/home/contact/index.jsx | 14 +++ src/glcc/home/contact/index.scss | 3 + src/glcc/home/index.jsx | 23 ++++ src/glcc/home/index.scss | 5 + src/glcc/home/lightspot/index.jsx | 14 +++ src/glcc/home/lightspot/index.scss | 3 + src/glcc/home/news/index.jsx | 14 +++ src/glcc/home/news/index.scss | 3 + src/glcc/home/partner/index.jsx | 14 +++ src/glcc/home/partner/index.scss | 3 + src/glcc/home/timerShaft/index.jsx | 14 +++ src/glcc/home/timerShaft/index.scss | 3 + src/glcc/index.jsx | 46 ++++++++ src/glcc/index.scss | 0 19 files changed, 432 insertions(+) create mode 100644 src/glcc/home/award/index.jsx create mode 100644 src/glcc/home/award/index.scss create mode 100644 src/glcc/home/banner/index.jsx create mode 100644 src/glcc/home/banner/index.scss create mode 100644 src/glcc/home/contact/index.jsx create mode 100644 src/glcc/home/contact/index.scss create mode 100644 src/glcc/home/index.jsx create mode 100644 src/glcc/home/index.scss create mode 100644 src/glcc/home/lightspot/index.jsx create mode 100644 src/glcc/home/lightspot/index.scss create mode 100644 src/glcc/home/news/index.jsx create mode 100644 src/glcc/home/news/index.scss create mode 100644 src/glcc/home/partner/index.jsx create mode 100644 src/glcc/home/partner/index.scss create mode 100644 src/glcc/home/timerShaft/index.jsx create mode 100644 src/glcc/home/timerShaft/index.scss create mode 100644 src/glcc/index.jsx create mode 100644 src/glcc/index.scss diff --git a/src/App.js b/src/App.js index 718017d6..608f87e8 100644 --- a/src/App.js +++ b/src/App.js @@ -112,6 +112,12 @@ const Teaching = Loadable({ loader : () => import("./forge/TeachingPractice/Teaching"), loading: Loading, }) + +const Glcc = Loadable({ + loader : () => import("./glcc"), + loading: Loading, +}) + // const CreateMerge = Loadable({ // loader: () => import('./forge/Merge/NewMerge'), // loading: Loading, @@ -376,6 +382,12 @@ class App extends Component { render={(props) => } > + {/*glcc */} + } + > + {/* 组织 */} +

奖金与奖励

+
+ + ) +} +export default Award; \ No newline at end of file diff --git a/src/glcc/home/award/index.scss b/src/glcc/home/award/index.scss new file mode 100644 index 00000000..f9dda361 --- /dev/null +++ b/src/glcc/home/award/index.scss @@ -0,0 +1,3 @@ +.award{ + +} \ No newline at end of file diff --git a/src/glcc/home/banner/index.jsx b/src/glcc/home/banner/index.jsx new file mode 100644 index 00000000..baa9d84e --- /dev/null +++ b/src/glcc/home/banner/index.jsx @@ -0,0 +1,70 @@ +import React , { useEffect , useState } from 'react'; +import Slider from 'react-slick'; +import axios from 'axios'; +import { getImageUrl } from 'educoder'; +import './index.scss'; +// import Left from './Img/left.png'; +// import Right from './Img/right.png'; + + +let setting={ + dots:true, + infinite: true, + speed: 2000, + slidesToShow: 1, + slidesToScroll: 1, + pauseOnDotsHover:true, + autoplaySpeed:5000, + pauseOnFocus:true, + autoplay:true, + arrows:true, + className:'glcc-banner' +// prevArrow:, +// nextArrow: +} +function Banner({register,current_user}) { + + const [ bannerList , setBannerList ] = useState(undefined); + + useEffect(()=>{ + getBanner(); + },[]) + + function getBanner() { + const url = `/topics.json?topic_type=banner`; + axios.get(url,{ + params:{ + limit:4 + } + }).then(result=>{ + if(result){ + setBannerList(result.data.topics); + } + }).catch(error=>{}) + } + return( + + { + bannerList && bannerList.length > 0 ? + bannerList.map((i,k)=>{ + return( +
+ {/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */} +
+ + { + k +1 === bannerList.length && (!(current_user && current_user.login)) ? +

立即注册

+ :"" + } +
+
+ ) + }) + : + "" + } +
+ ) +} +export default Banner; \ No newline at end of file diff --git a/src/glcc/home/banner/index.scss b/src/glcc/home/banner/index.scss new file mode 100644 index 00000000..8500e95f --- /dev/null +++ b/src/glcc/home/banner/index.scss @@ -0,0 +1,174 @@ +.glcc { + .glcc-banner { + position: relative; + background-image: linear-gradient(to right, #081843, #000a1d); + margin-bottom: 159px; + } + .slick-track { + height: 679px; + display: flex; + .slick-slide { + position: relative; + height: 100%; + div { + height: 100%; + .regform { + & > div { + overflow: hidden; + img { + height: 100%; + width: 1920px; + position: relative; + left: 50%; + margin-left: -960px; + } + } + } + .regPrg { + position: absolute; + z-index: 2; + width: 1200px; + left: 50%; + margin-left: -600px; + top: 54%; + margin-top: -23px; + a { + color: #fff !important; + display: inline-block; + background-color: #466aff; + border-radius: 5px; + height: 46px; + line-height: 46px; + width: 98px; + text-align: center; + font-size: 18px; + letter-spacing: 2px; + &:hover { + color: #ffffff !important; + background-color: #355cff; + } + } + } + } + + // img{ + // position: absolute; + // width: 100%; + // height: 100%; + // top:0px; + // left: 0px; + // z-index: 1; + // } + } + } + .slick-slider { + min-width: 1200px; + position: relative; + &:hover { + .slick-arrow { + display: block !important; + cursor: pointer; + z-index: 2; + } + } + .slick-arrow { + position: absolute; + top: 50%; + z-index: 1000; + background: transparent; + border: none; + margin-top: -50px; + display: none !important; + &:hover { + i { + color: rgba(225, 225, 225, 0.8); + } + } + i { + font-size: 50px !important; + color: rgba(225, 225, 225, 0.3); + transition: 0.3s; + } + &.slick-prev { + left: 50px; + } + &.slick-next { + right: 50px; + } + } + .slick-dots { + width: 1200px; + text-align: left; + left: 50%; + margin-left: -600px; + bottom: 25%; + position: absolute; + display: flex !important; + z-index: 2; + li { + background-color: rgba(225, 225, 225, 0.5); + position: relative; + height: 3px; + width: 46px; + margin-right: 15px; + &::after { + position: absolute; + left: 0px; + width: 0px; + top: 0px; + height: 100%; + content: ""; + transition: 5.2s; + transition-property: width; + } + &.slick-active::after { + background-color: #fff; + width: 100%; + } + button { + position: absolute; + width: 100%; + height: 10px; + left: 0px; + background-color: transparent !important; + border: none; + cursor: pointer; + color: transparent; + } + } + } + } + .topEditionUl { + position: absolute; + width: 1244px; + // background-image: url('./Img/top-bg.png'); + height: 244px; + bottom: -139px; + left: 50%; + margin-left: -622px; + display: flex; + align-items: center; + justify-content: center; + z-index: 3; + a { + // background-image: url('./Img/top-2.png'); + height: 139px; + width: 353px; + padding: 15px 24px; + color: #fff; + margin: 0px 17px; + border-radius: 11px; + background-size: 100% 100%; + color: #fff !important; + &:hover { + box-shadow: 0px 2px 7px rgba(225, 225, 225, 0.85); + } + // &:first-child{ + // background-image: url('./Img/top-1.png'); + // } + // &:last-child{ + // background-image: url('./Img/top-3.png'); + // } + } + } +} diff --git a/src/glcc/home/contact/index.jsx b/src/glcc/home/contact/index.jsx new file mode 100644 index 00000000..0710704f --- /dev/null +++ b/src/glcc/home/contact/index.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './index.scss'; + + +function Contact() { + + return( +
+

新闻中心

+
+
+ ) +} +export default Contact; \ No newline at end of file diff --git a/src/glcc/home/contact/index.scss b/src/glcc/home/contact/index.scss new file mode 100644 index 00000000..b97f9fa4 --- /dev/null +++ b/src/glcc/home/contact/index.scss @@ -0,0 +1,3 @@ +.contact{ + +} \ No newline at end of file diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx new file mode 100644 index 00000000..19651fb4 --- /dev/null +++ b/src/glcc/home/index.jsx @@ -0,0 +1,23 @@ +import React from "react"; +import Banner from "./banner"; +import Lightspot from './lightspot'; +import TimerShaft from './timerShaft'; +import Award from "./award"; +import News from './news'; +import Partner from "./partner"; + +import './index.scss'; + +export default ()=>{ + + return ( +
+ + + + + + +
+ ) +} \ No newline at end of file diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss new file mode 100644 index 00000000..a699f180 --- /dev/null +++ b/src/glcc/home/index.scss @@ -0,0 +1,5 @@ +.glcc{ + .glcc-tit{ + text-align: center; + } +} \ No newline at end of file diff --git a/src/glcc/home/lightspot/index.jsx b/src/glcc/home/lightspot/index.jsx new file mode 100644 index 00000000..8b3b1b1a --- /dev/null +++ b/src/glcc/home/lightspot/index.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './index.scss'; + + +function Lightspot() { + + return( +
+

活动亮点

+
+
+ ) +} +export default Lightspot; \ No newline at end of file diff --git a/src/glcc/home/lightspot/index.scss b/src/glcc/home/lightspot/index.scss new file mode 100644 index 00000000..3092b88f --- /dev/null +++ b/src/glcc/home/lightspot/index.scss @@ -0,0 +1,3 @@ +.lightspot{ + +} \ No newline at end of file diff --git a/src/glcc/home/news/index.jsx b/src/glcc/home/news/index.jsx new file mode 100644 index 00000000..33d4c247 --- /dev/null +++ b/src/glcc/home/news/index.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './index.scss'; + + +function News() { + + return( +
+

新闻中心

+
+
+ ) +} +export default News; \ No newline at end of file diff --git a/src/glcc/home/news/index.scss b/src/glcc/home/news/index.scss new file mode 100644 index 00000000..3b952147 --- /dev/null +++ b/src/glcc/home/news/index.scss @@ -0,0 +1,3 @@ +.news{ + +} \ No newline at end of file diff --git a/src/glcc/home/partner/index.jsx b/src/glcc/home/partner/index.jsx new file mode 100644 index 00000000..13d7aa5d --- /dev/null +++ b/src/glcc/home/partner/index.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './index.scss'; + + +function Partner() { + + return( +
+

组织方及合作伙伴

+
+
+ ) +} +export default Partner; \ No newline at end of file diff --git a/src/glcc/home/partner/index.scss b/src/glcc/home/partner/index.scss new file mode 100644 index 00000000..af6dd8c0 --- /dev/null +++ b/src/glcc/home/partner/index.scss @@ -0,0 +1,3 @@ +.partner{ + +} \ No newline at end of file diff --git a/src/glcc/home/timerShaft/index.jsx b/src/glcc/home/timerShaft/index.jsx new file mode 100644 index 00000000..bd3ed191 --- /dev/null +++ b/src/glcc/home/timerShaft/index.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import './index.scss'; + + +function TimerShaft() { + + return( +
+

时间规划

+
+
+ ) +} +export default TimerShaft; \ No newline at end of file diff --git a/src/glcc/home/timerShaft/index.scss b/src/glcc/home/timerShaft/index.scss new file mode 100644 index 00000000..88b3a05d --- /dev/null +++ b/src/glcc/home/timerShaft/index.scss @@ -0,0 +1,3 @@ +.timerShaft{ + +} \ No newline at end of file diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx new file mode 100644 index 00000000..fad006c5 --- /dev/null +++ b/src/glcc/index.jsx @@ -0,0 +1,46 @@ +import React from "react"; + +import { Route, Switch } from "react-router-dom"; +import { withRouter } from "react-router"; + +import { SnackbarHOC } from "educoder"; +import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC"; +import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC"; +import "./index.scss"; + +import Loadable from "react-loadable"; +import Loading from "../Loading"; +import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; + + +{/* 任务管理审核 */} +const Home = Loadable({ + loader: () => import("./home"), + loading: Loading, +}); + + +const Glcc = (propsF) => { + + return ( +
+ + {/* 首页 */} + ( + + )} + > + + +
+ ); +} + +export default withRouter( + ImageLayerOfCommentHOC({ + imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget", + parentSelector: ".newMain", + })(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Glcc)))) +); diff --git a/src/glcc/index.scss b/src/glcc/index.scss new file mode 100644 index 00000000..e69de29b From 5edf45988e84d064c7ae7f5a44d6da1fb76b41ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 8 Apr 2022 13:47:44 +0800 Subject: [PATCH 02/24] =?UTF-8?q?=E5=BC=80=E6=BA=90=E5=A4=8F=E4=BB=A4?= =?UTF-8?q?=E8=90=A5=E6=8A=A5=E5=90=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/glcc/apply/index.jsx | 117 ++++++++++++++++++++++++++++++++++++++ src/glcc/apply/index.scss | 69 ++++++++++++++++++++++ src/glcc/index.jsx | 12 ++++ src/glcc/static.js | 6 ++ 4 files changed, 204 insertions(+) create mode 100644 src/glcc/apply/index.jsx create mode 100644 src/glcc/apply/index.scss create mode 100644 src/glcc/static.js diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx new file mode 100644 index 00000000..47bfc21c --- /dev/null +++ b/src/glcc/apply/index.jsx @@ -0,0 +1,117 @@ +import React , { useCallback, useEffect , useState } from 'react'; +import { Breadcrumb, Button, Form, Icon, Input, Select, Upload } from 'antd'; +import {classify} from '../static'; +import Axios from 'axios'; +import './index.scss'; +import TextArea from 'antd/lib/input/TextArea'; +const Option = Select.Option; +function Apply(props) { + console.log(props); + const {form, qzDetail, enrollStatus, setReload, current_user, history} = props; + const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; + const [imageUrl, setImageUrl] = useState(undefined); + const [loading, setLoading] = useState(false); + + const helper = useCallback( + (label, extra, name, rules, widget) => ( + + {getFieldDecorator(name, { rules, validateFirst: true })(widget)} + + ), + [] + ); + + // 当用户输入结束时 检验用户输入是否符合规范 + function verify(dataIndex){ + validateFields([dataIndex],(error, values)=>{ + if(error && error[dataIndex]){ + return; + } + }) + } + + function handleSubmit(e){ + e.preventDefault(); + validateFieldsAndScroll((err, values) => { + if (!err) { + console.log('Received values of form: ', values); + } + }); + }; + return( +
+
+ + 开源夏令营 + 项目报名 + +
+ {helper('项目名称', + '', + 'name', + [{ required: true, message: "请正确输入项目名称" }, + { max: 32, message: '超出限制长度32位字符,请重新编辑' }], + {verify("name")}}/> + )} + {helper('项目分类', + '', + 'classify', + [], + + )} + {helper('官网地址', + '', + 'area', + [], + + )} + {helper('GitLink地址', + '', + 'gitlink', + [{ required: true, message: "请正确输入GitLink地址" }], + {verify("gitlink")}}/> + )} +
{helper('项目简介', + '', + 'intro', + [{ required: true, message: "请正确输入项目简介" }, + { max: 200, message: '超出限制长度200位字符,请重新编辑' }], +