Merge pull request '修复登陆和未登陆时,访问没有的项目返回页面不同的问题' (#50) from tongChong/forgeplus-react:feature_router into feature_router
This commit is contained in:
commit
c859a16837
|
@ -103,7 +103,7 @@ const CreateMerge = 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 keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize"];
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
@ -365,7 +365,7 @@ class App extends Component {
|
|||
return (<OrganizeIndex {...props} {...this.props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route> : pathType === '404' ? <Route path="/" component={Shixunnopage} /> :
|
||||
</Route> : pathType === '404' ? <Route component={Shixunnopage} />:
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (
|
||||
|
@ -377,6 +377,7 @@ class App extends Component {
|
|||
}
|
||||
/>
|
||||
// <Route path="/" component={Loading} />
|
||||
// <Route path="/" component={Shixunnopage} />
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ broadcastChannelOnmessage('refreshPage', () => {
|
|||
})
|
||||
|
||||
function locationurl(list) {
|
||||
// if (window.location.port !== "3007") {
|
||||
if (window.location.port !== "3007") {
|
||||
window.location.href = list
|
||||
// }
|
||||
}
|
||||
}
|
||||
// TODO 开发期多个身份切换
|
||||
let debugType = ""
|
||||
|
@ -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 ) {
|
||||
locationurl('/nopage');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue