|
|
|
@ -51,6 +51,7 @@ export default class TPMUpdatepropaede extends Component {
|
|
|
|
|
|
|
|
|
|
updatepropaedeuticsvalue=()=>{
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let {shixunId} = this.state;
|
|
|
|
|
let url="/shixuns/"+id+"/update_propaedeutics.json";
|
|
|
|
|
const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim();
|
|
|
|
|
axios.post(url,{
|
|
|
|
@ -60,7 +61,10 @@ export default class TPMUpdatepropaede extends Component {
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
if(response.data.status===1){
|
|
|
|
|
this.props.history.replace("/shixuns/"+shixunId+"/propaedeutics");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -73,9 +77,9 @@ export default class TPMUpdatepropaede extends Component {
|
|
|
|
|
<div className="educontent">
|
|
|
|
|
|
|
|
|
|
<div className="edu-back-white mt30">
|
|
|
|
|
<div className="font-16 pt30 pl20 pr20 pb40 bor-bottom-greyE clearfix">
|
|
|
|
|
<div className="font-16 pt20 pl20 pr20 pb20 bor-bottom-greyE clearfix">
|
|
|
|
|
<span className="fl">背景知识</span>
|
|
|
|
|
<a href={"/shixuns/"+shixunId+"/propaedeutics"}className="color-grey-9 fr">返回</a>
|
|
|
|
|
<Link to={"/shixuns/"+shixunId+"/propaedeutics"}className="color-grey-9 fr">返回</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="padding40-20">
|
|
|
|
@ -87,8 +91,8 @@ export default class TPMUpdatepropaede extends Component {
|
|
|
|
|
<div className="clearfix mb30 mt30">
|
|
|
|
|
<a className="defalutSubmitbtn fl mr20"
|
|
|
|
|
onClick={this.updatepropaedeuticsvalue}>保存</a>
|
|
|
|
|
<a href={"/shixuns/"+shixunId+"/propaedeutics"} className="defalutCancelbtn fl"
|
|
|
|
|
>取消</a>
|
|
|
|
|
<Link to={"/shixuns/"+shixunId+"/propaedeutics"} className="defalutCancelbtn fl"
|
|
|
|
|
>取消</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|