diff --git a/Routes.js b/Routes.js index 576a879b..baf10f6b 100644 --- a/Routes.js +++ b/Routes.js @@ -56,4 +56,4 @@ export const deepRoutes = [ ] // 不进行组织或个人判断 -export const specialRoute = ["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","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions", "hiagent","sf", "development", "governance"] \ No newline at end of file +export const specialRoute = ["ossRepo", "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","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions", "hiagent","sf", "development", "governance","explore"] \ No newline at end of file diff --git a/src/App.js b/src/App.js index 03a70745..11986449 100644 --- a/src/App.js +++ b/src/App.js @@ -236,6 +236,11 @@ const GovernanceIframe = Loadable({ loading: Loading, }); +const OssRepoIframe = Loadable({ + loader: () => import("./forge/ossRepoIframe"), + loading: Loading, +}); + const Forums = Loadable({ loader: () => import("./forums"), loading: Loading, @@ -252,7 +257,7 @@ const AI = 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", "glcc","bindlogin", "softbot","zone", "hiagent","sf", "development", "governance", "forums", "news", "exploreStore", "factory", "zoneAdmin", "ai"]; +const keyWord = ["ossRepo", "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","bindlogin", "softbot","zone", "hiagent","sf", "development", "governance", "explore","forums", "news", "exploreStore", "factory", "zoneAdmin", "ai"]; class App extends Component { constructor(props) { @@ -636,7 +641,7 @@ class App extends Component { {/* 项目标签列表页 */} - + )} > - ( @@ -745,6 +750,15 @@ class App extends Component { }> + { + return () + } + }> + + ( )} diff --git a/src/forge/ossRepoIframe.jsx b/src/forge/ossRepoIframe.jsx new file mode 100644 index 00000000..2b865973 --- /dev/null +++ b/src/forge/ossRepoIframe.jsx @@ -0,0 +1,31 @@ +import React, { useEffect, useState } from "react"; +import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC"; +import loadingGIf from "./Images/loading.gif"; +function OssRepo(props) { + const {current_user, mygetHelmetapi} = props; + const {admin, user_id} = current_user || {} + const {common} = mygetHelmetapi || {}; + const {ossRepo="http://27.122.114.160:3001"} = common || {}; + const [loading, setLoading] = useState(true); + + useEffect(()=>{ + document.title = '开源软件仓库'; + // document.body.style.background = '#fff'; + return () => { + document.body.style.background = ''; + } + }, []) + + const url = `${ossRepo}/?uid=${user_id === 2 ? undefined : user_id}` + // const url = "http://localhost:3007/" + + return
+ {loading &&
+ +
加载中,请耐心等待
+
} + +
+} + +export default TPMIndexHOC(OssRepo); \ No newline at end of file