增加首页配置、主题

This commit is contained in:
wanggeng888 2021-01-27 09:50:42 +08:00
parent 6d6082b844
commit aa1303b210
7 changed files with 58 additions and 3 deletions

View File

@ -77,4 +77,8 @@ public interface IUserCenterConst {
* 钉钉扫码appId
*/
String DING_DING_SCAN_CODE_APP_ID = "dingDingScanCodeAppId";
/**
* 登录框位置
*/
String LOGIN_BOX_POSITION = "loginBoxPosition";
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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' // 党建红
}]
//初始的颜色索引,对应上面的配色方案数组索引

View File

@ -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;}'
, '{{# } }}'

View File

@ -187,6 +187,14 @@
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<div class="layui-form-item" style="margin: 4px 0;">
<div class="layui-form-mid layui-word-aux">登录框位置</div>
<div class="layui-input-inline" style="width: 400px;">
<input type="radio" name="loginBoxPosition" value="default" title="默认(居右)" checked>
<input type="radio" name="loginBoxPosition" value="center" title="居中">
<input type="radio" name="loginBoxPosition" value="left" title="局左">
</div>
</div>
<div class="layui-form-item" style="margin: 4px 0;">
<div class="layui-form-mid layui-word-aux">验证码</div>
<div class="layui-input-inline" style="width: 400px;">
@ -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) {

View File

@ -12,6 +12,24 @@
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="assets/css/supersized.css">
<link rel="stylesheet" href="assets/layuiadmin/style/login.css?t=2" media="all">
<style th:if="${loginBoxPosition eq 'center'}">
.layadmin-user-login-main {
left: 50%;
margin-left: -188px;
}
</style>
<style th:if="${loginBoxPosition eq 'left'}">
@media screen and (max-width: 1920px) {
.layadmin-user-login-main {
right: 68%;
}
}
@media screen and (max-width: 1366px) {
.layadmin-user-login-main {
right: 62%;
}
}
</style>
</head>
<body>
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">