From 30c71007f951d02e3f5c63b2d10a17850359f8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 10:08:53 +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/courses/Resource/index.js | 50 +++++++++++++------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index f26d97ad3..06531d142 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -37,7 +37,8 @@ class Fileslists extends Component{ course_modules:undefined, has_course_groups:false, course_is_public:undefined, - isSpin:false + isSpin:false, + course_second_categories:[] } } componentDidMount=()=>{ @@ -115,12 +116,22 @@ class Fileslists extends Component{ axios.get(url, { }).then((response) => { if(response!=undefined){ + if(response.data&&response.data){ + let list=response.data.course_modules; + let course_second_categoriess; + list.map((item,key)=>{ + course_second_categoriess=item.course_second_categories + }) + debugger this.setState({ course_modules:response.data, - has_course_groups:response.data.has_course_groups + has_course_groups:response.data.has_course_groups, + course_second_categories:course_second_categoriess }) } + + } }) @@ -647,7 +658,8 @@ class Fileslists extends Component{ discussMessageid, course_modules, shixunmodal, - course_is_public + course_is_public, + filesId } = this.state; let category_id= this.props.match.params.category_id; @@ -797,31 +809,37 @@ class Fileslists extends Component{ overflow-y: auto; } .drop_down_menu li { - overflow: visible; - } + overflow: visible; + } + .courseSecond{ + margin-left: 10px; + padding: 10px; + } `} -