dev_local_2
杨树林 6 years ago
parent 199f1b9294
commit 4449a50e03

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

Loading…
Cancel
Save