登录页面
This commit is contained in:
parent
a808e46a8a
commit
2ff676bd88
@ -1,6 +1,5 @@
|
||||
package ink.wgink.gateway.filter.wg;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -30,18 +29,19 @@ import java.util.List;
|
||||
public class WebFluxFilter implements WebFilter {
|
||||
|
||||
public static final String SESSION_USER = "SESSION_USER";
|
||||
public static final String PAGE_LOGIN = "/wg/route/login.html";
|
||||
public static final String PAGE_LOGIN = "/wg/login.html";
|
||||
|
||||
private List<PathPattern> unPassPathPatterns = Arrays.asList(new PathPattern[]{
|
||||
new PathPatternParser().parse("/wg/api/user/**"),
|
||||
new PathPatternParser().parse("/wg/api/route/**"),
|
||||
new PathPatternParser().parse("/wg/route/user/**"),
|
||||
new PathPatternParser().parse("/wg/route/route/**"),
|
||||
private List<PathPattern> passPathPatterns = Arrays.asList(new PathPattern[]{
|
||||
new PathPatternParser().parse("/gw/**"),
|
||||
new PathPatternParser().parse("/wg/assets/**"),
|
||||
new PathPatternParser().parse("/wg/api/sign/**"),
|
||||
new PathPatternParser().parse("/wg/login.html"),
|
||||
new PathPatternParser().parse(PAGE_LOGIN),
|
||||
});
|
||||
|
||||
@Override
|
||||
public Mono<Void> filter(ServerWebExchange serverWebExchange, WebFilterChain webFilterChain) {
|
||||
if (this.isUnPass(serverWebExchange)) {
|
||||
if (this.isPass(serverWebExchange)) {
|
||||
return webFilterChain.filter(serverWebExchange);
|
||||
}
|
||||
return serverWebExchange.getSession().flatMap(webSession -> {
|
||||
@ -61,8 +61,8 @@ public class WebFluxFilter implements WebFilter {
|
||||
* @param serverWebExchange
|
||||
* @return
|
||||
*/
|
||||
private boolean isUnPass(ServerWebExchange serverWebExchange) {
|
||||
return unPassPathPatterns.stream().allMatch(pathPattern -> pathPattern.matches(serverWebExchange.getRequest().getPath()));
|
||||
private boolean isPass(ServerWebExchange serverWebExchange) {
|
||||
return passPathPatterns.stream().anyMatch(pathPattern -> pathPattern.matches(serverWebExchange.getRequest().getPath()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,8 @@ html {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.iframe-container .iframe-box {}
|
||||
.iframe-container .iframe-box {
|
||||
}
|
||||
|
||||
.iframe-container .iframe-box iframe {
|
||||
padding: 0;
|
||||
@ -39,4 +40,204 @@ html {
|
||||
box-shadow: rgba(0, 0, 0, 0.12) -1px 0px 4px;
|
||||
background: #FFFFFF;
|
||||
padding: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
html, body, #LAY_app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layui-layout-body {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#LAY-user-login,
|
||||
.layadmin-user-display-show {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.layadmin-user-login {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 110px 0;
|
||||
min-height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layadmin-user-login-main {
|
||||
width: 375px;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layadmin-user-login-box {
|
||||
padding: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layadmin-user-login-header h2 {
|
||||
font-weight: bold;
|
||||
font-size: 30px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.layadmin-user-login-header p {
|
||||
font-weight: 300;
|
||||
font-size: 20px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.layadmin-user-login-body .layui-form-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.layadmin-user-login-icon {
|
||||
position: absolute;
|
||||
left: 1px;
|
||||
top: 1px;
|
||||
width: 38px;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
color: #d2d2d2;
|
||||
}
|
||||
|
||||
.layadmin-user-login-body .layui-form-item .layui-input {
|
||||
padding-left: 38px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-codeimg {
|
||||
max-height: 38px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layadmin-user-login-other {
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
line-height: 38px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-other > * {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-other .layui-icon {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-other a:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.layadmin-user-jump-change {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.layadmin-user-login-footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
line-height: 30px;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
color: rgba(0, 0, 0, .5)
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
text-shadow: 1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.layadmin-user-login-footer span {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.layadmin-user-login-footer a {
|
||||
padding: 0 5px;
|
||||
color: rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
.layadmin-user-login-footer a:hover {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
/* 有背景图时 */
|
||||
.layadmin-user-login-main[bgimg] {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
/* 主题背景 */
|
||||
.ladmin-user-login-theme {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ladmin-user-login-theme ul {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ladmin-user-login-theme ul li {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 64px;
|
||||
height: 43px;
|
||||
cursor: pointer;
|
||||
transition: all .3s;
|
||||
-webkit-transition: all .3s;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.ladmin-user-login-theme ul li:hover {
|
||||
opacity: 0.9
|
||||
}
|
||||
|
||||
.layadmin-user-login-main {
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
width: 375px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -188px;
|
||||
margin-top: -158px;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.system-logo {
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.system-logo-title {
|
||||
float: right;
|
||||
width: 252px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.remember-password {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.other-login-box {
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
50
src/main/resources/static/wg/login.html
Normal file
50
src/main/resources/static/wg/login.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/wg/">
|
||||
<meta charset="UTF-8">
|
||||
<title>网关管理</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/layui-v2.6.4/layui/css/layui.css"/>
|
||||
<link rel="stylesheet" href="assets/layui-v2.6.4/layui/css/admin.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
|
||||
<div id="layadminUserLoginMain" class="layadmin-user-login-main" style="">
|
||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||
<h2>网关管理系统</h2>
|
||||
</div>
|
||||
<div id="userLoginBox" class="layadmin-user-login-box layadmin-user-login-body layui-form" lay-filter="LAY-form-signin">
|
||||
<form id="LAY-form-signin" action="userlogin" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
|
||||
<input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-item" id="passwordBox">
|
||||
<label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
|
||||
<input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" id="LAY-user-login-submit" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layui-v2.6.4/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layui-v2.6.4/layui/modules/'
|
||||
}).extend({}).use(['restajax', 'datamessage', 'dialog'], function () {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var layer = layui.layer;
|
||||
window.dialog = layui.dialog;
|
||||
window.restAjax = layui.restajax;
|
||||
window.dataMessage = layui.datamessage;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user