From f63a315c282dc7d2d5707f09935c361102fc6553 Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Wed, 17 Nov 2021 17:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../route/index/CustomIndexPageRouteController.java | 4 +++- src/main/resources/application-prod.yml | 1 + src/main/resources/templates/index/index.html | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/com/tenlion/usercenter/controller/route/index/CustomIndexPageRouteController.java b/src/main/java/cn/com/tenlion/usercenter/controller/route/index/CustomIndexPageRouteController.java index e8bdbeb..6723d90 100644 --- a/src/main/java/cn/com/tenlion/usercenter/controller/route/index/CustomIndexPageRouteController.java +++ b/src/main/java/cn/com/tenlion/usercenter/controller/route/index/CustomIndexPageRouteController.java @@ -43,7 +43,9 @@ public class CustomIndexPageRouteController { @GetMapping("index") public ModelAndView index() { ModelAndView mv = new ModelAndView("index/index"); - mv.addObject("listOAuth2Client", listOAuth2ClientOfMine()); + List oAuth2ClientSimpleDTOs = listOAuth2ClientOfMine(); + mv.addObject("listOAuth2Client", oAuth2ClientSimpleDTOs); + mv.addObject("listOAuth2ClientSize", oAuth2ClientSimpleDTOs.size()); mv.addObject("systemTitle", ConfigManager.getInstance().getConfig().get("systemTitle")); return mv; } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index ef11613..3e9cba3 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -3,6 +3,7 @@ server: url: http://192.168.0.155:7011/usercenter system-title: 统一用户管理系统 system-sub-title: 智慧城市 + default-index-page: route/custom/index servlet: context-path: /usercenter diff --git a/src/main/resources/templates/index/index.html b/src/main/resources/templates/index/index.html index af75dbf..1138241 100644 --- a/src/main/resources/templates/index/index.html +++ b/src/main/resources/templates/index/index.html @@ -23,6 +23,7 @@
+ @@ -33,9 +34,9 @@ watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, - // loop: true, + loop: $('#listOAuth2ClientSize').val() > 2 ? true : false, loopedSlides: 5, - // autoplay: true, + autoplay: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev',