diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx index 47bfc21c3..ee5134d0f 100644 --- a/src/glcc/apply/index.jsx +++ b/src/glcc/apply/index.jsx @@ -6,7 +6,6 @@ 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); diff --git a/src/glcc/help/index.jsx b/src/glcc/help/index.jsx new file mode 100644 index 000000000..cea6ffa7a --- /dev/null +++ b/src/glcc/help/index.jsx @@ -0,0 +1,62 @@ +import React , { useCallback, useEffect , useState } from 'react'; +import { Breadcrumb, Button, Form, Icon, Input, Select, Upload } from 'antd'; +import {classify} from '../static'; +import { wikiPages, getWiki } from '../../forge/Wiki/api'; +import Axios from 'axios'; +import './index.scss'; +import TextArea from 'antd/lib/input/TextArea'; +const Option = Select.Option; +function Help(props) { + const [fileArrInit, setFileArrInit] = useState(null); + const [checkItem, setCheckItem] = useState({}); + const [itemDetail, setItemDetail] = useState({}); + + // 获取仓库wiki列表 + useEffect(()=>{ + wikiPages({ + owner: 'innov', + repo: 'PiggyMetrics22', + projectId: '1158' + }).then(res => { + if (res && res.message === "200" && Array.isArray(res.data)) { + setFileArrInit(res.data); + if (res.data.length) { + setCheckItem(res.data[0]); + }; + } else { + setFileArrInit([]); + } + }); + }, []) + + // 获取选择wiki详情 + useEffect(() => { + checkItem.name && getWiki({ + owner: 'innov', + repo: 'PiggyMetrics22', + pagename: checkItem.name, + projectId: '1158' + }).then(res => { + if (res && res.message === "200") { + setItemDetail(res.data); + } else { + showNotification("加载失败") + } + }); + }, [checkItem]); + + return( +
+
+
+ 帮助文档 + {fileArrInit && fileArrInit.map(item => { + // onClick={() => { setCheckItem(item) }} checkItem.name + return { setCheckItem(item) }}>{item.name}})} +
+
+
+
+ ) +} +export default Help; \ No newline at end of file diff --git a/src/glcc/help/index.scss b/src/glcc/help/index.scss new file mode 100644 index 000000000..3acb08889 --- /dev/null +++ b/src/glcc/help/index.scss @@ -0,0 +1,26 @@ +.glcc_help{ + background-image:linear-gradient(180deg,#ebf2ff 0%,#f2f4ff 100%); + padding: 30px 0 120px; + min-height: 85vh; + .help_main{ + width: 1200px; + margin: 0 auto; + display: flex; + } + .menuList{ + display: flex; + flex-direction: column; + width: 16%; + padding: 20px 0 25px 25px; + background-color:#f3f8ff; + border:1px solid; + border-color:#ffffff; + margin-right: 40px; + } + .wiki_title{ + cursor: pointer; + &:hover, &.active{ + color:#466aff; + } + } +} \ No newline at end of file diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx index 76508eb4d..8b0953d10 100644 --- a/src/glcc/index.jsx +++ b/src/glcc/index.jsx @@ -13,16 +13,21 @@ import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; -{/* 任务管理审核 */} +// 任务管理审核 const Home = Loadable({ loader: () => import("./home"), loading: Loading, }); -{/* 开源夏令营报名页面 */} +// 开源夏令营报名页面 const Apply = Loadable({ loader: () => import("./apply"), loading: Loading, }); +// 开源夏令营报名页面 +const Help = Loadable({ + loader: () => import("./help"), + loading: Loading, +}); const Glcc = (propsF) => { @@ -30,13 +35,20 @@ const Glcc = (propsF) => { return (
- + {/* 开源夏令营报名页面 */} ( )} > + {/* 帮助中心 */} + ( + + )} + > {/* 首页 */}