Merge branch 'topic_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into topic_bank
commit
77d18e78d0
@ -0,0 +1,54 @@
|
||||
import React, { Component } from 'react';
|
||||
import axios from 'axios'
|
||||
|
||||
import ExerciseDisplay from '../../../courses/exercise/ExerciseDisplay'
|
||||
|
||||
class ExerciseBanksDetail extends Component{
|
||||
constructor(props){
|
||||
super(props);
|
||||
this.state={
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount = () =>{
|
||||
|
||||
}
|
||||
detailFetchCallback = (result) => {
|
||||
let Id=this.props.match.params.Id;
|
||||
|
||||
const crumbData={
|
||||
title: result.data.exercise && result.data.exercise.name,
|
||||
is_public: result.data.exercise && result.data.exercise.is_public,
|
||||
crumbArray:[
|
||||
{content:'详情'},
|
||||
]
|
||||
}
|
||||
const menuData={
|
||||
tab:'0',//tab选中的index
|
||||
menuArray:[//tab以及tab路由
|
||||
{to:`/banks/exercise/${Id}`,content:'内容详情'}
|
||||
],
|
||||
category:'exercise',//
|
||||
tos: `/banks/exercise/${Id}/edit`,
|
||||
id: Id,
|
||||
|
||||
}
|
||||
this.props.initPublic(crumbData,menuData);
|
||||
}
|
||||
|
||||
render(){
|
||||
let { pollDetail } = this.state
|
||||
|
||||
return(
|
||||
<div>
|
||||
<ExerciseDisplay {...this.props} {...this.state}
|
||||
urlPath = {'exercise_banks'}
|
||||
detailFetchCallback={this.detailFetchCallback}
|
||||
>
|
||||
</ExerciseDisplay>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default ExerciseBanksDetail
|
Loading…
Reference in new issue