From a52819710fe93ccd4281683b1aa8d7ca34340067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 17 Aug 2019 17:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/paths/PathDetail/DetailTop.js | 11 +++++-- .../paths/PathDetail/PathDetailIndex.js | 29 +++++++++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index d7ca31867..7fd957be5 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -150,8 +150,11 @@ class DetailTop extends Component{ lineHeight: '30px', }; + console.log(this.props) + //
return( -
+ +
+ {/*
*/} { detailInfoList && -
+
{detailInfoList.name} @@ -269,7 +273,8 @@ class DetailTop extends Component{
- {this.props.courses===undefined?"":
+ {/*{this.props.courses===undefined||this.props.courses.length===0?"":
*/} + {this.props.courses===undefined?"":
  • 翻转课堂
  • 开发社区
  • 实践课程
  • diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js index 476b60f40..43128e446 100644 --- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js +++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js @@ -81,7 +81,32 @@ class PathDetailIndex extends Component{ cardsModalsave:this.cardsModalsave, user_id:undefined, loadtype:false, - courses:undefined, + courses:[ + { + course_id: 1309, + first_category_url: "/courses/1309/informs", + start_date: "2019-07-16", // 开始时间 + end_date: "2050-12-31", // 结束时间 + student_count: 112, // 学习人数 + course_identity: 5, // 当前用户在该课堂的身份 + course_status: { + status: 1, // status:0:即将开课 1:进行中 2:已结束 + time: "进行至第5周,共1642周" // time:当前进度 + } + }, + { + course_id: 1319, + first_category_url: "/courses/1319/shixun_homeworks/11549", + start_date:"2019-08-16", + end_date:"2050-12-31", + student_count: 112, + course_identity: 1, + course_status: { + status: 0, + time: "" + } + } + ], items: getItems(10) } this.onDragEnd = this.onDragEnd.bind(this); @@ -162,7 +187,7 @@ class PathDetailIndex extends Component{ if(result.data.allow_visit===true){ this.setState({ detailInfoList:result.data, - courses:result.data.courses + // courses:result.data.courses // items: getItems(result.data.members.length), }) }