|
|
|
@ -206,8 +206,21 @@ class CoursesNew extends Component {
|
|
|
|
|
if (response.data.status === 0) {
|
|
|
|
|
// this.goback()
|
|
|
|
|
|
|
|
|
|
window.location.href=first_category_url+"?exhibition=true";
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', true);
|
|
|
|
|
window.location.href=first_category_url;
|
|
|
|
|
var yslGuideone = window.sessionStorage.getItem('yslGuideone');
|
|
|
|
|
try {
|
|
|
|
|
if(yslGuideone=== null){
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', "true");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(yslGuideone=== undefined){
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', "true");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -251,8 +264,20 @@ class CoursesNew extends Component {
|
|
|
|
|
).then((response) => {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
// this.goback
|
|
|
|
|
window.location.href=response.data.first_category_url+"?exhibition=true";
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', true);
|
|
|
|
|
window.location.href=response.data.first_category_url;
|
|
|
|
|
var yslGuideone = window.sessionStorage.getItem('yslGuideone');
|
|
|
|
|
try {
|
|
|
|
|
if(yslGuideone=== null){
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', "true");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(yslGuideone=== undefined){
|
|
|
|
|
window.sessionStorage.setItem('yslGuideone', "true");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -405,9 +430,10 @@ class CoursesNew extends Component {
|
|
|
|
|
const propsWithoutForm = Object.assign({}, this.props)
|
|
|
|
|
delete propsWithoutForm.form
|
|
|
|
|
const options = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
|
|
|
|
|
const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
|
|
|
|
|
const optionschool = this.state.searchlistscholl===undefined?"":this.state.searchlistscholl===null?"":this.state.searchlistscholl==="[]"?"":this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
|
|
|
|
|
// console.log(this.props.current_user.user_school)
|
|
|
|
|
// form合并了
|
|
|
|
|
console.log("获取到的数据");
|
|
|
|
|
console.log(this.state);
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
console.log(this.props.current_user);
|
|
|
|
|