diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 177328dfa..a18e395dd 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -82,8 +82,8 @@ export function initAxiosInterceptors(props) { // proxy = "https://testeduplus2.educoder.net" //proxy="http://47.96.87.25:48080" proxy="https://pre-newweb.educoder.net" - proxy="https://test-newweb.educoder.net" - // proxy="https://test-jupyterweb.educoder.net" + // proxy="https://test-newweb.educoder.net" + proxy="https://test-jupyterweb.educoder.net" //proxy="http://192.168.2.63:3001" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/public/react/src/modules/question/NewMyShixunModel.js b/public/react/src/modules/question/NewMyShixunModel.js index 364dd39f5..bfb8f5690 100644 --- a/public/react/src/modules/question/NewMyShixunModel.js +++ b/public/react/src/modules/question/NewMyShixunModel.js @@ -678,34 +678,57 @@ class NewMyShixunModel extends Component { let url=""; if(this.props.exam_id===undefined){ url=`/item_baskets/${id}.json`; + axios.delete(url) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`撤销成功`); + var data = { + discipline_id:this.state.discipline_id, + sub_discipline_id:this.state.sub_discipline_id, + tag_discipline_id:this.state.tag_discipline_id, + public: this.state.defaultActiveKey, + difficulty: this.state.difficulty, + item_type: this.state.item_type, + keywords: this.state.keywords, + page: this.state.page, + per_page:10, + exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), + }; + this.getdatasy(data); + this.getbasket_listdata(); + } + }).catch((error) => { + //console.log(error); + }) }else{ - url=`/examination_banks/${id}/revoke_item.json`; + url=`/examination_banks/${this.props.exam_id}/revoke_item.json`; + axios.delete(url,{ data: { + item_id:id===undefined?"":parseInt(id), + }}) + .then((result) => { + if (result.data.status == 0) { + // this.props.showNotification(`撤销成功`); + var data = { + discipline_id:this.state.discipline_id, + sub_discipline_id:this.state.sub_discipline_id, + tag_discipline_id:this.state.tag_discipline_id, + public: this.state.defaultActiveKey, + difficulty: this.state.difficulty, + item_type: this.state.item_type, + keywords: this.state.keywords, + page: this.state.page, + per_page:10, + exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), + }; + this.getdatasy(data); + this.getbasket_listdata(); + } + }).catch((error) => { + //console.log(error); + }) } - axios.delete(url,{ data: { - exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), - }}) - .then((result) => { - if (result.data.status == 0) { - // this.props.showNotification(`撤销成功`); - var data = { - discipline_id:this.state.discipline_id, - sub_discipline_id:this.state.sub_discipline_id, - tag_discipline_id:this.state.tag_discipline_id, - public: this.state.defaultActiveKey, - difficulty: this.state.difficulty, - item_type: this.state.item_type, - keywords: this.state.keywords, - page: this.state.page, - per_page:10, - exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id), - }; - this.getdatasy(data); - this.getbasket_listdata(); - } - }).catch((error) => { - //console.log(error); - }) + } //全选试题库 selectallquestionsonthispage=()=>{