From f293a2eb26f9f8db537387815d42f2fadbd767c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 25 Mar 2020 15:52:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/OneSelfOrderModal.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js index 56eaab65a..3ef957042 100644 --- a/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js +++ b/public/react/src/modules/courses/coursesPublic/OneSelfOrderModal.js @@ -51,20 +51,21 @@ class OneSelfOrderModal extends Component{ let course_groups = this.props.course_groups; course_groups.map((item, key) => { + console.log(item) if (item.end_time === null) { // if(this.props.starttimesend===undefined){ // item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); // }else{ // 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){ item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); }else{ item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); } - - newarr.push(item) - } else { newarr.push(item) } }) @@ -108,14 +109,15 @@ class OneSelfOrderModal extends Component{ course_groups.map((item,key)=>{ 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"); + newarr.push(item) + }else{ if(this.props.starttimesend){ item.end_time = moment(moment(handleDateString(this.props.starttimesend))).format("YYYY-MM-DD HH:mm"); }else{ item.end_time = moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"); } newarr.push(item) - }else{ - newarr.push(item) } }) this.setState({ @@ -399,7 +401,7 @@ class OneSelfOrderModal extends Component{ {/*{this.props.starttime}*/} {this.props.modaltype===undefined||this.props.modaltype===2? {/*{this.props.endtime}*/} - 截止时间 + 截止时间1
  • 分班名称 - 截止时间 + 截止时间2
  • } {this.props.modaltype===undefined||this.props.modaltype===2 From e1d92b014fb38958b41bbcd9aa2cd82ba76c8567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 25 Mar 2020 15:57:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/poll/PollDetailTabFirst.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 2da0924ed..4f625b856 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -60,8 +60,11 @@ class PollDetailTabFirst extends Component{ }) } searchInfo=()=>{ - let {order, search, commit_status, poll_group_id, page, order_type} = this.state - this.getTableList(order, search, commit_status, poll_group_id, page, order_type); + let {order, search, commit_status, poll_group_id, page, order_type} = this.state; + this.setState({ + page:1 + }) + this.getTableList(order, search, commit_status, poll_group_id, 1, order_type); } // 获取接口数据