dev_aliyun2
杨树明 5 years ago
parent e1d92b014f
commit c936577394

@ -51,22 +51,21 @@ class OneSelfOrderModal extends Component{
let course_groups = this.props.course_groups; let course_groups = this.props.course_groups;
course_groups.map((item, key) => { course_groups.map((item, key) => {
console.log(item)
if (item.end_time === null) { if (item.end_time === null) {
// if(this.props.starttimesend===undefined){ // if(this.props.starttimesend===undefined){
// item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); // item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
// }else{ // }else{
// item.end_time = moment(handleDateString(this.props.starttimesend)).format("YYYY-MM-DD HH:mm"); // item.end_time = moment(handleDateString(this.props.starttimesend)).format("YYYY-MM-DD HH:mm");
// } // }
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
newarr.push(item)
} else {
if(this.props.starttimesend){ if(this.props.starttimesend){
item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm");
}else{ }else{
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
} }
newarr.push(item) newarr.push(item)
} else {
newarr.push(item)
} }
}) })
this.setState({ this.setState({
@ -109,15 +108,14 @@ class OneSelfOrderModal extends Component{
course_groups.map((item,key)=>{ course_groups.map((item,key)=>{
if(item.end_time===null){ if(item.end_time===null){
// item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); // item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
newarr.push(item)
}else{
if(this.props.starttimesend){ if(this.props.starttimesend){
item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm");
}else{ }else{
item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm");
} }
newarr.push(item) newarr.push(item)
}else{
newarr.push(item)
} }
}) })
this.setState({ this.setState({

Loading…
Cancel
Save