|
|
|
@ -327,16 +327,7 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
goback = (id) => {
|
|
|
|
|
// if(this.props.match.params.coursesId===undefined){
|
|
|
|
|
// this.props.history.push("/courses");
|
|
|
|
|
// }else{
|
|
|
|
|
// this.props.history.push(this.props.current_user.first_category_url);
|
|
|
|
|
// }
|
|
|
|
|
// window.history.go(-1)
|
|
|
|
|
// if(id===undefined){
|
|
|
|
|
// this.props.history.goBack()
|
|
|
|
|
// }else{
|
|
|
|
|
goback = () => {
|
|
|
|
|
try {
|
|
|
|
|
if(this.props.current_user.first_category_url===undefined){
|
|
|
|
|
this.props.history.push('/')
|
|
|
|
@ -347,12 +338,9 @@ class CoursesNew extends Component {
|
|
|
|
|
}catch (e) {
|
|
|
|
|
this.props.history.push('/')
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onCheckAllChange = (e) => {
|
|
|
|
|
// console.log(e.target.checked)
|
|
|
|
|
this.setState({
|
|
|
|
|
is_public: e.target.checked == true ? 1 : 0,
|
|
|
|
|
});
|
|
|
|
@ -361,13 +349,11 @@ class CoursesNew extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
Realnamecertification:e.target.checked,
|
|
|
|
|
})
|
|
|
|
|
// console.log(e.target.checked);
|
|
|
|
|
}
|
|
|
|
|
onchangess=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Professionalcertification:e.target.checked,
|
|
|
|
|
})
|
|
|
|
|
// console.log(e.target.checked);
|
|
|
|
|
}
|
|
|
|
|
Searchvalue=(value)=>{
|
|
|
|
|
|
|
|
|
@ -375,20 +361,14 @@ class CoursesNew extends Component {
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
search:value
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
// console.log(result.data)
|
|
|
|
|
if(result){
|
|
|
|
|
if (result.data.message===undefined) {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
searchlist: result.data.course_lists,
|
|
|
|
|
// course:value,
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// this.props.form.setFieldsValue({
|
|
|
|
|
// course:value
|
|
|
|
|
// })
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|