dev_aliyun_beta
hjm 5 years ago
parent be557489d2
commit 1525511e18

@ -436,6 +436,7 @@ class ExerciseNewCommon extends Component{
getAddQuestionUrl: this.getAddQuestionUrl, getAddQuestionUrl: this.getAddQuestionUrl,
getEditQuestionUrl: this.getEditQuestionUrl, getEditQuestionUrl: this.getEditQuestionUrl,
exercise_url: this.props.exercise_url,
} }
return( return(
<React.Fragment> <React.Fragment>

@ -156,10 +156,10 @@ class ShixunEditor extends Component{
this.props.onEditorCancel() this.props.onEditorCancel()
} }
componentDidMount = () => { componentDidMount = () => {
const { shixun_id } = this.props; const { shixun_id, exercise_url } = this.props;
// shixun_id // shixun_id
const Id = this.props.match.params.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, { axios.get(url, {
params: { params: {
shixun_id shixun_id

Loading…
Cancel
Save