diff --git a/src/App.js b/src/App.js index 9ef308a9..9af51b21 100644 --- a/src/App.js +++ b/src/App.js @@ -96,10 +96,6 @@ const ProjectIndex = Loadable({ // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 const keyWord = ["explore", "settings", "setting", "CCF", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search"]; -const ProjectIndex = Loadable({ - loader: () => import("./forge/Index"), - loading: Loading, -}); class App extends Component { constructor(props) { super(props); diff --git a/src/AppConfig.js b/src/AppConfig.js index 73f3a38e..b93e7c0b 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ 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 || 'student' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { @@ -86,7 +86,7 @@ export function initAxiosInterceptors(props) { if (response.data.status === 404) { let responseURL = response.request ? response.request.responseURL:''; - if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 && responseURL.indexOf('/api/owners/') === -1) { + if (responseURL.indexOf('/api/users/') === -1 || responseURL.indexOf('/api/organizations/') === -1 || responseURL.indexOf('/api/owners/') === -1) { locationurl('/nopage'); } } diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 6791ebf0..f636975b 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -237,14 +237,12 @@ class Setting extends Component { const { getFieldDecorator } = this.props.form; const { projectsId , owner } = this.props.match.params; const { projectDetail } = this.props; - const { projectsId , owner } = this.props.match.params; const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state; let mirror = projectDetail && projectDetail.mirror; let type = projectDetail && projectDetail.type; const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id; - const { CategoryList, LanguageList, private_check ,loading , divertVisible , permission , is_transfering } = this.state; return (