diff --git a/src/glcc/help/index.jsx b/src/glcc/help/index.jsx index 3f269833..f135501e 100644 --- a/src/glcc/help/index.jsx +++ b/src/glcc/help/index.jsx @@ -1,4 +1,5 @@ import React , { useEffect , useState } from 'react'; +import NodataPanel from '../../components/nodata-panel'; import { wikiPages, getWiki } from '../../forge/Wiki/api'; import bg from '../img/help_bg.png'; import './index.scss'; @@ -7,13 +8,15 @@ function Help(props) { const [fileArrInit, setFileArrInit] = useState(null); const [checkItem, setCheckItem] = useState({}); const [itemDetail, setItemDetail] = useState({}); + // locationStatus true 正式环境 false 测试环境或者开发环境 + const locationStatus = window.location.host.indexOf("50008") !== -1 || window.location.host.indexOf("gitlink") !== -1; // 获取仓库wiki列表 useEffect(()=>{ wikiPages({ - owner: 'forgetest2', - repo: 'wiki1', - projectId: '546103' + owner: locationStatus ? 'GLCC' : 'forgetest2', + repo: locationStatus ? 'glcc2022' : 'wiki1', + projectId: locationStatus ? '1403785' : '546103' }).then(res => { if (res && res.message === "200" && Array.isArray(res.data)) { setFileArrInit(res.data); @@ -29,10 +32,10 @@ function Help(props) { // 获取选择wiki详情 useEffect(() => { checkItem.name && getWiki({ - owner: 'forgetest2', - repo: 'wiki1', + owner: locationStatus ? 'GLCC' : 'forgetest2', + repo: locationStatus ? 'glcc2022' : 'wiki1', pagename: checkItem.name, - projectId: '546103' + projectId: locationStatus ? '1403785' : '546103' }).then(res => { if (res && res.message === "200") { setItemDetail(res.data); @@ -41,10 +44,10 @@ function Help(props) { } }); }, [checkItem]); - + return(
-
+ {fileArrInit && fileArrInit.length === 0 ? :
帮助文档 {fileArrInit && fileArrInit.map(item => { @@ -52,9 +55,9 @@ function Help(props) {
- + bg
-
+
}
) } diff --git a/src/glcc/home/contact/index.jsx b/src/glcc/home/contact/index.jsx index 5f422497..0f0841ec 100644 --- a/src/glcc/home/contact/index.jsx +++ b/src/glcc/home/contact/index.jsx @@ -21,12 +21,12 @@ function Contact() {
-
+
gitlink1

加入GitLink

社区QQ群

-
+
gitlink2

关注GitLink

微信公众号

@@ -34,7 +34,7 @@ function Contact() {
{/* 帮助中心 */}
- + help 帮助中心     查看GitLink编程夏令营活动信息及热点问题