diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 9d50426e8..2a395200c 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -358,6 +358,7 @@ class Coursesleftnav extends Component{ navid:undefined, sandiantype:undefined, twosandiantype:undefined, + ModalsType:false }) let url="/course_modules/"+id+"/hidden_module.json" @@ -379,12 +380,25 @@ class Coursesleftnav extends Component{ edithidden=(e,id)=>{ e.stopPropagation();//阻止冒泡 - this.setState({ - ModalsType:true, - Modalstopval:"隐藏后将不再显示此模块,", - ModalsBottomval:"后续可通过添加模块恢复显示", - ModalSave:()=>this.edithiddens(id), - }) + let {course_modules}=this.props; + + if(course_modules.length>1){ + this.setState({ + ModalsType:true, + Modalstopval:"隐藏后将不再显示此模块,", + ModalsBottomval:"后续可通过添加模块恢复显示", + ModalSave:()=>this.edithiddens(id), + }) + }else{ + this.setState({ + ModalsType:true, + Modalstopval:"您不能隐藏所有课堂模块,请至少保留", + ModalsBottomval:"其中一个模块。", + loadtype:true, + ModalSave:()=>this.cannerNavmoda(), + }) + } + } Navmodalnames=(e,id,type,setnavid,name)=>{ diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js index 14b1f71e1..9019fe7a1 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js @@ -135,7 +135,7 @@ class AccessoryModal2 extends Component{ description:description, attachment_ids:newfileList }).then((result)=>{ - console.log(result) + // console.log(result) if(result.data.status===0){ this.props.setupdate() this.setState({ diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index 6a7f1c505..fb03835f6 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -42,7 +42,7 @@ class Exercisestatisticalresult extends Component { limit:limit } }).then((result) => { - console.log(result) + // console.log(result) this.setState({ data:result.data @@ -85,6 +85,10 @@ class Exercisestatisticalresult extends Component { page:pageNumber }) + debugger + $('html').animate({ + scrollTop: 10 + }, 1000); this.updatefun(sort,exercise_group_id,pageNumber,limit) } @@ -109,10 +113,10 @@ class Exercisestatisticalresult extends Component {