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( +