FIX build bug

This commit is contained in:
Jasder 2020-04-28 18:39:05 +08:00
parent 4bfd4234b5
commit 5e157952b4
2 changed files with 7 additions and 25 deletions

View File

@ -29,27 +29,27 @@ class CoursesIndex extends Component {
{/*课堂讨论*/}
<Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId/edit"
render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
(props) => (<BoardsNew {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/classrooms/:coursesId/boards/:boardId/messages/new"
render={
(props) => (<BoardsNew {...this.props} {...props} {...this.state} {...common} />)
(props) => (<BoardsNew {...this.props} {...props} {...this.state} />)
}
></Route>
<Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId"
render={
(props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />)
(props) => (<TopicDetail {...this.props} {...this.state} {...props} />)
}
></Route>
<Route exact path="/classrooms/:coursesId/boards/:boardId/messages/:topicId"
render={
(props) => (<TopicDetail {...this.props} {...this.state} {...props} {...common} />)
(props) => (<TopicDetail {...this.props} {...this.state} {...props} />)
}
></Route>
<Route exact path="/classrooms/:coursesId/boards/:boardId"
render={
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} {...common} />)
(props) => (<ListPageIndex {...this.props} {...props} {...this.state} />)
}
></Route>

View File

@ -19,25 +19,7 @@ function Home({ mygetHelmetapi, user }) {
updata: null
})
useEffect(() => {
async function init() {
const sys = await axios.get('/users/system_update.json')
const home = await axios.get('/home/index.json')
setResource({
...resource,
loading: false,
updata: sys.data,
data: home.data
})
}
try {
init()
} catch (error) {
console.log(error, '---in home init-----')
}
}, [])
let shixuntype = false
let pathstype = false
if (mygetHelmetapi) {
@ -94,4 +76,4 @@ function Home({ mygetHelmetapi, user }) {
)
}
export default SnackbarHOC()(TPMIndexHOC(Home))
export default SnackbarHOC()(TPMIndexHOC(Home))