diff --git a/src/main/java/com/cm/serviceusercenter/consts/IUserCenterConst.java b/src/main/java/com/cm/serviceusercenter/consts/IUserCenterConst.java index 3be86c1..ac7827b 100644 --- a/src/main/java/com/cm/serviceusercenter/consts/IUserCenterConst.java +++ b/src/main/java/com/cm/serviceusercenter/consts/IUserCenterConst.java @@ -77,4 +77,8 @@ public interface IUserCenterConst { * 钉钉扫码appId */ String DING_DING_SCAN_CODE_APP_ID = "dingDingScanCodeAppId"; + /** + * 登录框位置 + */ + String LOGIN_BOX_POSITION = "loginBoxPosition"; } diff --git a/src/main/java/com/cm/serviceusercenter/controller/SignController.java b/src/main/java/com/cm/serviceusercenter/controller/SignController.java index 4156e68..9d47bea 100644 --- a/src/main/java/com/cm/serviceusercenter/controller/SignController.java +++ b/src/main/java/com/cm/serviceusercenter/controller/SignController.java @@ -183,6 +183,12 @@ public class SignController { } else { mv.addObject(IUserCenterConst.SCAN_CODE_LOGIN, ISystemConstant.IS_FALSE); } + // 登录框位置 + if (!Objects.isNull(config.get(IUserCenterConst.LOGIN_BOX_POSITION))) { + mv.addObject(IUserCenterConst.LOGIN_BOX_POSITION, config.get(IUserCenterConst.LOGIN_BOX_POSITION).toString()); + } else { + mv.addObject(IUserCenterConst.LOGIN_BOX_POSITION, "default"); + } return mv; } diff --git a/src/main/java/com/cm/serviceusercenter/pojo/vos/config/ConfigVO.java b/src/main/java/com/cm/serviceusercenter/pojo/vos/config/ConfigVO.java index e2d34aa..5d8f93a 100644 --- a/src/main/java/com/cm/serviceusercenter/pojo/vos/config/ConfigVO.java +++ b/src/main/java/com/cm/serviceusercenter/pojo/vos/config/ConfigVO.java @@ -65,6 +65,8 @@ public class ConfigVO { @ApiModelProperty(name = "scanCodeLogin", value = "扫码登录") @CheckEmptyAnnotation(name = "扫码登录", types = {ISystemConstant.IS_FALSE, IUserCenterConst.DING_DING_SCAN_CODE}) private String scanCodeLogin; + @ApiModelProperty(name = "loginBoxPosition", value = "登录框位置") + private String loginBoxPosition; public String getPasswordValidity() { return passwordValidity == null ? "" : passwordValidity.trim(); @@ -209,4 +211,12 @@ public class ConfigVO { public void setScanCodeLogin(String scanCodeLogin) { this.scanCodeLogin = scanCodeLogin; } + + public String getLoginBoxPosition() { + return loginBoxPosition == null ? "" : loginBoxPosition; + } + + public void setLoginBoxPosition(String loginBoxPosition) { + this.loginBoxPosition = loginBoxPosition; + } } diff --git a/src/main/resources/static/assets/layuiadmin/config.js b/src/main/resources/static/assets/layuiadmin/config.js index 6b3fc1e..91634b5 100644 --- a/src/main/resources/static/assets/layuiadmin/config.js +++ b/src/main/resources/static/assets/layuiadmin/config.js @@ -150,6 +150,14 @@ layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) { , headerCite: 'rgba(0, 0, 0, .8)' // 头字体颜色 , headerHover: 'rgb(0, 0, 0)' // 头移入颜色 , alias: 'white-header-menu' //蓝头灰菜单 + }, { + main: '#bd3128' + , logo: '#bd3128' + , selected: '#bd3128' + , header: '#bd3128' + , headerCite: 'rgba(255, 255, 255, .8)' // 头字体颜色 + , headerHover: 'rgb(255, 255, 255)' // 头移入颜色 + , alias: 'dangjian-red-header' // 党建红 }] //初始的颜色索引,对应上面的配色方案数组索引 diff --git a/src/main/resources/static/assets/layuiadmin/lib/admin.js b/src/main/resources/static/assets/layuiadmin/lib/admin.js index f1b7b6d..c26f4e8 100644 --- a/src/main/resources/static/assets/layuiadmin/lib/admin.js +++ b/src/main/resources/static/assets/layuiadmin/lib/admin.js @@ -225,8 +225,8 @@ layui.define('view', function (exports) { , '.layui-layout-admin .layui-header a,' , '.layui-layout-admin .layui-header a cite{color:{{d.color.headerCite}};}' , '.layui-layout-admin .layui-header a:hover{color:{{d.color.headerHover}};}' - , '.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb;}' - , '.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb;}' + , '.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb; border-color: {{d.color.headerCite}} transparent transparent !important;}' + , '.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb; border-color: transparent transparent {{d.color.headerCite}} !important;}' , '.layui-layout-admin .layui-header .layui-nav .layui-this:after, .layui-layout-admin .layui-header .layui-nav-bar{background-color: #fff; background-color: rgba(255,255,255,.5);}' , '.layadmin-pagetabs .layui-tab-title li:after{display: none;}' , '{{# } }}' diff --git a/src/main/resources/static/route/config/update.html b/src/main/resources/static/route/config/update.html index 98c57f3..6cc7b41 100644 --- a/src/main/resources/static/route/config/update.html +++ b/src/main/resources/static/route/config/update.html @@ -187,6 +187,14 @@
+
+
登录框位置
+
+ + + +
+
验证码
@@ -375,7 +383,8 @@ appDeviceCount: data.appDeviceCount, verificationCode: data.verificationCode, uKeyLogin: data.uKeyLogin, - scanCodeLogin: data.scanCodeLogin + scanCodeLogin: data.scanCodeLogin, + loginBoxPosition: data.loginBoxPosition }); form.render(null, 'dataForm'); if(data.systemLogo) { diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html index c4dbd58..c5c500d 100644 --- a/src/main/resources/templates/login.html +++ b/src/main/resources/templates/login.html @@ -12,6 +12,24 @@ + +