From 5e8e5d1bc70cc13291baf1c8fb033597dfcf0def Mon Sep 17 00:00:00 2001 From: zhujunjieit Date: Wed, 23 Jan 2019 00:09:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/cms/controller/CmsController.java | 6 ++++++ ruoyi-cms/src/main/resources/templates/web/index.html | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsController.java b/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsController.java index 95f15fd40..9583154c6 100644 --- a/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsController.java +++ b/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsController.java @@ -67,11 +67,17 @@ public class CmsController { Long parentId = new Long( parentIds.split( "," )[2] ); courseCategory.setParentId( parentId ); courseCategories2 = trainCourseCategoryService.selectCategoryList( courseCategory ); + + map.put( "selectCategoryId1",parentId); } if (StrUtil.isNotBlank( parentIds ) && parentIds.split( "," ).length >= 4) {//三级分类 Long parentId = new Long( parentIds.split( "," )[3] ); courseCategory.setParentId( parentId ); courseCategories3 = trainCourseCategoryService.selectCategoryList( courseCategory ); + //当前选中的分类id + map.put( "selectCategoryId2",parentId); + Long parentId1 = new Long( parentIds.split( "," )[2] ); + map.put( "selectCategoryId1",parentId1); } if (StrUtil.isNotBlank( parentIds )) { trainCourseVO.setTrainCourseCategoryId( new Integer( parentIds.split( "," )[parentIds.split( "," ).length - 1] ) ); diff --git a/ruoyi-cms/src/main/resources/templates/web/index.html b/ruoyi-cms/src/main/resources/templates/web/index.html index 7017419e3..689b94921 100644 --- a/ruoyi-cms/src/main/resources/templates/web/index.html +++ b/ruoyi-cms/src/main/resources/templates/web/index.html @@ -203,12 +203,12 @@
  • 选择分类: 不限 + th:class="${category.id==selectCategoryId||category.id==selectCategoryId1}?'curr':''">
  • 选择分类: - 不限 - 不限 - + 不限 + 不限 +
  • 选择分类: