dev_forum
hjm 6 years ago
parent 4a392e4ba3
commit 49453d3b2a

@ -75,12 +75,6 @@ class CoursesWorkIndex extends Component{
(props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />) (props) => (<CommonWorkDetailIndex {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/new"
render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 作业问答 */} {/* 作业问答 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/question" <Route exact path="/courses/:coursesId/common_homeworks/:workId/question"
render={ render={
@ -120,7 +114,7 @@ class CoursesWorkIndex extends Component{
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/common_homeworks/new" <Route exact path="/courses/:coursesId/common_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }

@ -117,7 +117,7 @@ class CoursesWorkIndex extends Component{
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/group_homeworks/new" <Route exact path="/courses/:coursesId/group_homeworks/:categroy_id/new"
render={ render={
(props) => (<NewWork {...this.props} {...props} {...this.state} />) (props) => (<NewWork {...this.props} {...props} {...this.state} />)
} }

@ -67,9 +67,9 @@ export function RouteHOC(options = {}) {
this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`) this.props.history.push(`/courses/${_courseId}/${secondName}/${_workId}/${_studentWorkId}/appraise`)
} }
} }
toNewPage = (courseId, workId) => { toNewPage = (courseId) => {
const secondName = this.getModuleName() const secondName = this.getModuleName()
this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/new`) this.props.history.push(`/courses/${courseId.coursesId}/${secondName}/${courseId.categroy_id}/new`)
} }
toListPage = (_courseId, _workId) => { toListPage = (_courseId, _workId) => {
const secondName = this.getModuleName() const secondName = this.getModuleName()

Loading…
Cancel
Save