|
|
|
@ -156,10 +156,10 @@ class ShixunEditor extends Component{
|
|
|
|
|
this.props.onEditorCancel()
|
|
|
|
|
}
|
|
|
|
|
componentDidMount = () => {
|
|
|
|
|
const { shixun_id } = this.props;
|
|
|
|
|
const { shixun_id, exercise_url } = this.props;
|
|
|
|
|
// shixun_id
|
|
|
|
|
const Id = this.props.match.params.Id
|
|
|
|
|
const url = `/exercises/${Id}/commit_shixun.json`
|
|
|
|
|
const url = `/${exercise_url || 'exercises'}/${Id}/commit_shixun.json`
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
params: {
|
|
|
|
|
shixun_id
|
|
|
|
|