diff --git a/src/AppConfig.js b/src/AppConfig.js index ca941733..82a5cb78 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -27,14 +27,14 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '15243705227' } function clearAllCookie() { cookie.remove('_educoder_session', { path: '/' }); cookie.remove('autologin_trustie', { path: '/' }); setpostcookie() } -clearAllCookie(); +// clearAllCookie(); function setpostcookie() { const str = window.location.pathname; if (str.indexOf("/wxcode") !== -1) { diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 6b3d3564..9b4d5191 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -6,12 +6,12 @@ const { Search } = Input; const $ = window.$; const isDev = window.location.port == 3007; const isdev2= window.location.hostname ==='www.educoder.net' -export const TEST_HOST = "https://testforgeplus.trustie.net/" +export const TEST_HOST = "http://39.105.176.215:49999" export function getImageUrl(path) { // https://www.educoder.net // https://testbdweb.trustie.net // const local = 'http://localhost:3000' - const local = 'https://testforgeplus.trustie.net'; + const local = 'http://39.105.176.215:49999'; if (isDev) { return `${local}/${path}` } @@ -22,7 +22,7 @@ export function getImage(path) { // https://www.educoder.net // https://testbdweb.trustie.net // const local = 'http://localhost:3000' - const local = 'https://testforgeplus.trustie.net/'; + const local = 'http://39.105.176.215:49999'; if(path.indexOf("http://")===-1){ if (isDev) { return `${local}/images/${path}` @@ -93,7 +93,7 @@ export function setImagesUrl(path){ } export function getUrl(path, goTest) { - const local = 'https://testforgeplus.trustie.net' + const local = 'http://39.105.176.215:49999' if (isDev) { return `${local}${path?path:''}` } diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 6ea90526..1ddef304 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -181,6 +181,7 @@ class Detail extends Component { } getProject = (num) => { + const {user} = this.props; const { projectsId , owner } = this.props.match.params; const url = `/${owner}/${projectsId}/simple.json`; axios.get(url).then((result) => { @@ -191,7 +192,7 @@ class Detail extends Component { platform:result.data.platform && result.data.platform !== 'educoder' }) let signa = result.data.user_apply_signatures && result.data.user_apply_signatures[0]; - if(result.data.is_secret && (signa && signa.status !== "passed")){ + if(result.data.is_secret && (!signa || (signa && signa.status !== "passed")) && user.login !== owner){ this.setState({ visible:true, is_secret:result.data.is_secret, diff --git a/src/forge/Settings/Index.js b/src/forge/Settings/Index.js index 4a22b3d3..2196018e 100644 --- a/src/forge/Settings/Index.js +++ b/src/forge/Settings/Index.js @@ -28,6 +28,10 @@ const Tags = Loadable({ loader: () => import("./new_tags"), loading: Loading, }); +const Special = Loadable({ + loader: () => import("./SpecialProject"), + loading: Loading, +}); const Manage = Loadable({ loader: () => import("./ManageWeb"), loading: Loading, @@ -39,6 +43,7 @@ const ManageNew = Loadable({ class Index extends Component { render() { const { projectsId , owner } = this.props.match.params; + const { user } = this.props; const { pathname } = this.props.history.location; const flag = pathname === `/projects/${owner}/${projectsId}/setting`; @@ -87,6 +92,20 @@ class Index extends Component {
+ { + user && user.login === owner ? ++ + + 特殊开源许可证项目管理 + +
+