diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js index 32b56aae1..d0e6f98bd 100644 --- a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js @@ -4,6 +4,8 @@ import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Tooltip} from import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; +import axios from 'axios'; + import TPMMDEditor from '../../tpm/challengesnew/TPMMDEditor'; const Option = Select.Option; @@ -21,7 +23,17 @@ export default class TpmQuestionEdit extends Component { componentDidMount() { } - + delecbtns=()=>{ + let url=`/shixuns/${this.props.match.params.shixunId}/challenges/${this.props.match.params.checkpointId}/destroy_challenge_choose.json`; + axios.delete((url), { data: { + choose_id:this.props.match.params.choose_id + }}) + .then((result)=>{ + if(result.data.status===1){ + window.location.href=`/shixuns/${this.props.match.params.shixunId}/challenges/${this.props.match.params.checkpointId}/editquestion`; + } + }) + } render() { @@ -202,6 +214,9 @@ export default class TpmQuestionEdit extends Component { onClick={()=>this.props.answer_subit()}>提交 取消 + + this.delecbtns()} + className="delectshixuncdbtn fr">删除 diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index 382dab93a..3aa329ec9 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -27,7 +27,6 @@ class InfosBanner extends Component{ let {pathname}=this.props.location; moduleName=pathname.split("/")[3]; - console.log(is_current) return(
diff --git a/public/stylesheets/educoder/edu-main.css b/public/stylesheets/educoder/edu-main.css index f59827f45..c66453b4c 100644 --- a/public/stylesheets/educoder/edu-main.css +++ b/public/stylesheets/educoder/edu-main.css @@ -538,6 +538,27 @@ a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B font-weight: 400; color: rgba(255,255,255,1); } + +/*删除按钮*/ +.delectshixuncdbtn{ + display: block; + border: 1px solid #CDCDCD; + background-color: #fafafa; + color: #999!important; + width: 120px; + text-align: center; + height: 30px; + line-height: 30px; + border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(77,124,254,0); + border-radius: 4px; + line-height: 40px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; +} .defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;} /*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,end-----------------------------------------*/