dev_hs
杨树林 5 years ago
parent e538d64f9a
commit 74a874f274

@ -19,8 +19,8 @@ import Trialapplicationysl from './modules/login/Trialapplicationysl';
import Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
import AccountProfile from "./modules/user/AccountProfile";
import Trialapplication from './modules/login/Trialapplication'
import Trialapplication from './modules/login/Trialapplication';
import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import NotFoundPage from './NotFoundPage'
import Loading from './Loading'
@ -247,12 +247,24 @@ const Messagerouting= Loadable({
class App extends Component {
constructor(props) {
super(props)
// this.state = {
// isRenders:false,
// }
this.state = {
mydisplay:false
}
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
Addcoursestypes:false,
mydisplay:true,
occupation:i,
})
};
ModalCancelsy=()=>{
this.setState({
mydisplay:false,
})
};
componentDidMount() {
// force an update if the URL changes
history.listen(() => {
@ -304,8 +316,8 @@ class App extends Component {
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state}/>
<AccountProfile {...this.props} {...this.state}/>
{/*<Certifiedprofessional {...this.props} {...this.state}/>*/}
<AccountProfile {...this.props} {...this.state} HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}/>
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy}/>
<Router>
<Switch>

@ -66,12 +66,12 @@ class Goldsubject extends Component {
const { datatime } = this.state;
var datatimes="";
if(datatime!==undefined){
datatimes=datatime;
datatimes=moment(datatimes, dateFormat).subtract(0, 'days');;
}else {
datatimes=datatime;
}
// if(datatime!==undefined){
// datatimes=datatime;
datatimes=moment(datatime, dateFormat);
// }else {
// datatimes=datatime;
// }
if (!startValue || !datatimes) {
return false;
}
@ -84,12 +84,12 @@ class Goldsubject extends Component {
// console.log(moment(new Date(), dateFormat).add(2, 'days'));
const { datatimetwo } = this.state;
var startvalue="";
if(datatimetwo!==undefined){
startvalue=datatimetwo;
startvalue=moment(startvalue, dateFormat).add(1, 'days');
}else {
startvalue=datatimetwo;
}
// if(datatimetwo!==undefined){
// startvalue=datatimetwo;
startvalue=moment(datatimetwo, dateFormat);
// }else {
// startvalue=datatimetwo;
// }
// console.log("结束时间");
// console.log(endValue);
// console.log(startvalue);
@ -359,9 +359,12 @@ class Goldsubject extends Component {
});
} else {
debugger
this.props.form.validateFields((err, values) => {
console.log("错误信息信息信息2");
console.log(err);
console.log("xingxixingxi");
if (err) {
return;
}
@ -384,7 +387,7 @@ class Goldsubject extends Component {
// console.log('Received values of form: ', values);
let subjectid = this.props.match.params.subjectid;
let url = "/courses.json";
axios.post(url, {
var ysldatas={
subject_id:subjectid, //这是带过来的值
name: values.classroom,
class_period: values.period,
@ -394,7 +397,12 @@ class Goldsubject extends Component {
is_public: is_public, //这是也是带过来的值
course_module_types: values.checkboxgroup,
school:values.school
}
};
console.log("提交的ysldatas数据");
console.log(ysldatas);
console.log(JSON.stringify(ysldatas));
axios.post(url,
ysldatas
).then((response) => {
if (response.status === 200) {
// this.goback

Loading…
Cancel
Save