forked from Gitlink/forgeplus-react
个人主页
This commit is contained in:
parent
326847f697
commit
73bacb789d
15
src/App.js
15
src/App.js
|
@ -67,6 +67,12 @@ const http500 = Loadable({
|
|||
loader: () => import('./modules/500/http500'),
|
||||
loading: Loading,
|
||||
})
|
||||
// 个人主页
|
||||
const InfosIndex = Loadable({
|
||||
loader: () => import('./modules/user/usersInfo/InfosIndex'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
@ -243,7 +249,16 @@ class App extends Component {
|
|||
|
||||
{/*404*/}
|
||||
<Route path="/nopage" component={Shixunnopage} />
|
||||
{/* 个人主页 */}
|
||||
<Route path="/users/:username"
|
||||
render={
|
||||
(props) => {
|
||||
|
||||
return (<InfosIndex {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}></Route>
|
||||
|
||||
|
||||
<Route exact path="/"
|
||||
render={
|
||||
(props) => (<Projects {...this.props} {...props} {...this.state}></Projects>)
|
||||
|
|
|
@ -286,7 +286,7 @@ class InfosCourse extends Component {
|
|||
<Create href={"/classrooms/new"} name={"新建课堂"} index="1"></Create> : ""
|
||||
}
|
||||
{
|
||||
(!data || (data && data.courses.length === 0)) && (category || (!category && this.props.current_user && this.props.current_user.user_identity == "学生")) && <NoneData></NoneData>
|
||||
(!data || (data && data.courses && data.courses.length === 0)) && (category || (!category && this.props.current_user && this.props.current_user.user_identity == "学生")) && <NoneData></NoneData>
|
||||
}
|
||||
{
|
||||
data && data.courses && data.courses.map((item, key) => {
|
||||
|
|
Loading…
Reference in New Issue