未登录时:路由/不显示顶部和底部

This commit is contained in:
caishi 2021-07-13 10:42:56 +08:00
parent 876ee66a05
commit 0889ee69c5
3 changed files with 8 additions and 2 deletions

View File

@ -79,7 +79,7 @@ const Search = Loadable({
}) })
const ProjectIndex = Loadable({ const ProjectIndex = Loadable({
loader: () => import("./forge/Main/Index"), loader: () => import("./forge/Index"),
loading: Loading, loading: Loading,
}); });
class App extends Component { class App extends Component {

View File

@ -25,7 +25,7 @@ if (isDev) {
} }
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' : 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 || ''
} }
window._debugType = debugType; window._debugType = debugType;
export function initAxiosInterceptors(props) { export function initAxiosInterceptors(props) {

View File

@ -69,6 +69,12 @@ class Index extends Component {
<ProjectIndex {...this.props} {...props} /> <ProjectIndex {...this.props} {...props} />
)} )}
></Route> ></Route>
<Route
path="/"
render={(props) => (
<ProjectIndex {...this.props} {...props} />
)}
></Route>
</Switch> </Switch>
</div> </div>
); );