mirror of https://gitee.com/stylefeng/guns
commit
d70adcff59
14
pom.xml
14
pom.xml
|
@ -96,6 +96,7 @@
|
|||
<artifactId>office-spring-boot-starter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>log-spring-boot-starter</artifactId>
|
||||
|
@ -108,6 +109,18 @@
|
|||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>sms-spring-boot-starter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.stylefeng.roses</groupId>
|
||||
<artifactId>message-spring-boot-starter</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
|
@ -140,7 +153,6 @@
|
|||
<artifactId>oshi-core</artifactId>
|
||||
<version>${oshi.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package cn.stylefeng.guns.modular.api;
|
||||
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.resource.api.annotation.GetResource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* API文档管理
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/14 21:05
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "API文档管理")
|
||||
public class ApiViewController {
|
||||
|
||||
/**
|
||||
* 编辑应用界面
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @date 2021/1/6 13:37
|
||||
*/
|
||||
@GetResource(name = "API文档界面", path = "/view/api")
|
||||
public String apiIndex() {
|
||||
return "/modular/api/api.html";
|
||||
}
|
||||
|
||||
}
|
|
@ -12,7 +12,6 @@ import org.springframework.stereotype.Controller;
|
|||
* @date 2020/12/28 9:28
|
||||
*/
|
||||
@Controller
|
||||
@Slf4j
|
||||
@ApiResource(name = "职位管理相关的界面渲染")
|
||||
public class PositionViewController {
|
||||
|
||||
|
|
|
@ -60,4 +60,26 @@ public class UserViewController {
|
|||
return "/modular/system/user/user_role.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户管理-注册-视图
|
||||
*
|
||||
* @author chenjinlong
|
||||
* @date 2021/1/7 19:09
|
||||
*/
|
||||
@GetResource(name = "用户管理-注册-视图", path = "/register", requiredPermission = false, requiredLogin = false)
|
||||
public String registerView() {
|
||||
return "register.html";
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户管理-找回密码-视图
|
||||
*
|
||||
* @author chenjinlong
|
||||
* @date 2021/1/7 19:09
|
||||
*/
|
||||
@GetResource(name = "用户管理-找回密码-视图", path = "/forget", requiredPermission = false, requiredLogin = false)
|
||||
public String forgetView() {
|
||||
return "forget.html";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
border-top: 3px solid #d2d6de;
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.1)
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1)
|
||||
}
|
||||
|
||||
.box-main {
|
||||
|
@ -44,5 +44,21 @@
|
|||
border: 0;
|
||||
padding-top: 2px;
|
||||
border-radius: 0;
|
||||
box-shadow: none
|
||||
box-shadow: none;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.wide-layui-form-label {
|
||||
float: left;
|
||||
display: block;
|
||||
padding: 9px 15px;
|
||||
width: 130px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.wide-layui-input-block {
|
||||
margin-left: 160px;
|
||||
min-height: 36px;
|
||||
}
|
|
@ -83,7 +83,10 @@ layui.define(['jquery', 'layer', 'admin', 'table'], function (exports) {
|
|||
param.shade = .1;
|
||||
}
|
||||
|
||||
var thisIndex = top.layui.layer.open(param);
|
||||
//ifream 内遮罩层
|
||||
//var thisIndex = top.layui.layer.open(param);
|
||||
//ifream 内遮罩层
|
||||
var thisIndex = admin.open(param);
|
||||
|
||||
//按键监听esc关闭对话框
|
||||
$(window).keydown(function (event) {
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
layui.use(['layer', 'form', 'table', 'HttpRequest', 'func', 'tree'], function () {
|
||||
var $ = layui.jquery;
|
||||
var form = layui.form;
|
||||
var table = layui.table;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var func = layui.func;
|
||||
var tree = layui.tree;
|
||||
|
||||
/**
|
||||
* Api管理的参数
|
||||
*/
|
||||
var ApiManager = {
|
||||
condition: {
|
||||
resourceCode: "",
|
||||
resourceName: ""
|
||||
}
|
||||
};
|
||||
|
||||
// 选择api树上的接口时
|
||||
ApiManager.onClickApi = function (obj) {
|
||||
ApiManager.condition.resourceCode = obj.data.id;
|
||||
|
||||
// 如果是具体接口,则查看接口详情
|
||||
if (obj.data.resourceFlag === true) {
|
||||
ApiManager.search();
|
||||
}
|
||||
};
|
||||
|
||||
// 点击查询按钮
|
||||
ApiManager.search = function () {
|
||||
var detailRequest = new HttpRequest(Feng.ctxPath + "/resource/getDetail", 'get', function (data) {
|
||||
form.val('apiDetailForm', data.data);
|
||||
}, function (data) {
|
||||
Feng.error("查询失败!" + data.message);
|
||||
});
|
||||
detailRequest.set("resourceCode", ApiManager.condition.resourceCode);
|
||||
var detailResult = detailRequest.start(false);
|
||||
|
||||
// 参数的表头
|
||||
var columns = [[
|
||||
{field: 'chineseName', title: '中文名称', width: 150},
|
||||
{field: 'fieldClassType', title: '字段类型', width: 150},
|
||||
{field: 'fieldName', title: '字段名称', width: 200},
|
||||
{
|
||||
field: 'groupAnnotations', title: '按校验组分的注解集合', templet: function (data) {
|
||||
return JSON.stringify(data.groupAnnotations);
|
||||
}
|
||||
}
|
||||
]];
|
||||
|
||||
// 渲染请求参数列表
|
||||
table.render({
|
||||
elem: '#requestParamsTable',
|
||||
cols: columns,
|
||||
data: detailResult.data.paramFieldDescriptions,
|
||||
even: true
|
||||
});
|
||||
|
||||
// 渲染请求参数列表
|
||||
table.render({
|
||||
elem: '#responseParamsTable',
|
||||
cols: columns,
|
||||
data: detailResult.data.responseFieldDescriptions,
|
||||
even: true
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// 初始化api树
|
||||
var request = new HttpRequest(Feng.ctxPath + '/resource/getTree', 'get', function (data) {
|
||||
tree.render({
|
||||
elem: '#apiTree',
|
||||
data: data.data,
|
||||
click: ApiManager.onClickApi,
|
||||
onlyIconControl: true
|
||||
});
|
||||
});
|
||||
request.start();
|
||||
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var panehHidden = false;
|
||||
if ($(this).width() < 769) {
|
||||
panehHidden = true;
|
||||
}
|
||||
$('#myContiner').layout({initClosed: panehHidden, west__size: 330});
|
||||
});
|
|
@ -0,0 +1,358 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link href="${ctxPath}/assets/expand/images/favicon.ico" rel="icon">
|
||||
<title>${constants.getSystemName()}-找回密码</title>
|
||||
<link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css"/>
|
||||
<link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=318">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
body {
|
||||
background-image: url("${ctxPath}/assets/common/images/bg-login.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body:before {
|
||||
content: "";
|
||||
background-color: rgba(0, 0, 0, .2);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.login-wrapper {
|
||||
max-width: 420px;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form {
|
||||
padding: 25px 30px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.19);
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > h2 {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item {
|
||||
margin-bottom: 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-input {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.login-wrapper .layui-input-icon-group > .layui-input {
|
||||
padding-left: 46px;
|
||||
}
|
||||
|
||||
.login-wrapper .layui-input-icon-group > .layui-icon {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
font-size: 20px;
|
||||
color: #909399;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-captcha-group {
|
||||
padding-right: 135px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-captcha-group > .login-captcha {
|
||||
height: 46px;
|
||||
width: 120px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 2px !important;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-form-checkbox {
|
||||
margin: 0 !important;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-form-checkbox > .layui-icon {
|
||||
width: 15px !important;
|
||||
height: 15px !important;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form .layui-btn-fluid {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
font-size: 16px;
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-oauth-group > a > .layui-icon {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.login-copyright {
|
||||
color: #eee;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
\@media screen and (min-height: 550px) {
|
||||
.login-wrapper {
|
||||
margin: -250px auto 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-copyright {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-btn {
|
||||
background-color: #5FB878;
|
||||
border-color: #5FB878;
|
||||
}
|
||||
|
||||
.layui-link {
|
||||
color: #5FB878 !important;
|
||||
}
|
||||
|
||||
.login-captcha-btn {
|
||||
line-height: 44px;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
color: #666;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/** 获取图形验证码弹窗 */
|
||||
.layer-get-code {
|
||||
padding: 25px 25px;
|
||||
}
|
||||
|
||||
.layer-get-code > p {
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group {
|
||||
position: relative;
|
||||
padding-right: 135px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group > .layui-input {
|
||||
border-radius: 0;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
background-color: transparent;
|
||||
border-color: rgba(111, 121, 122, 0.3);
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group > img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 46px;
|
||||
width: 120px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layer-get-code .layui-btn-fluid {
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
/** //获取图形验证码弹窗 */
|
||||
|
||||
.layui-btn-disabled {
|
||||
cursor: not-allowed !important;
|
||||
color: #999 !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
|
||||
<form class="layui-form">
|
||||
<h2>重置密码</h2>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-email"></i>
|
||||
<input class="layui-input" name="email" placeholder="请输入邮箱账号" autocomplete="off"
|
||||
lay-verType="tips" lay-verify="email" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-password"></i>
|
||||
<input class="layui-input" name="password" placeholder="请输入新的登录密码" type="password"
|
||||
lay-verType="tips" lay-verify="required" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-key"></i>
|
||||
<input class="layui-input" name="password2" placeholder="请再次输入登录密码" type="password"
|
||||
lay-verType="tips" lay-verify="equalTo" lay-equalTo="[name=password]" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group login-captcha-group">
|
||||
<i class="layui-icon layui-icon-auz"></i>
|
||||
<input class="layui-input" name="code" placeholder="请输入验证码" autocomplete="off"
|
||||
lay-verType="tips" lay-verify="required" required/>
|
||||
<button type="button" id="btnGetCode" class="login-captcha login-captcha-btn layui-input">获取验证码</button>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<a href="/" class="layui-link pull-right">返回登录</a>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||
<button class="layui-btn layui-btn-fluid" lay-filter="loginSubmit" lay-submit>修改密码</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="login-copyright">copyright © 2020 stylefeng.cn all rights reserved.</div>
|
||||
|
||||
@/* 加入contextPath属性和session超时的配置 */
|
||||
<script type="text/javascript">
|
||||
var Feng = {
|
||||
ctxPath: "${ctxPath}",
|
||||
version: '${constants.getReleaseVersion()}'
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- js部分 -->
|
||||
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=318"></script>
|
||||
<script>
|
||||
layui.use(['layer', 'form', 'formX'], function () {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var form = layui.form;
|
||||
$('.login-wrapper').removeClass('layui-hide');
|
||||
|
||||
/* 表单提交 */
|
||||
form.on('submit(loginSubmit)', function (obj) {
|
||||
// console.log(obj.field);
|
||||
layer.msg('注册成功', {icon: 1, time: 1500}, function () {
|
||||
location.href = 'login.html';
|
||||
});
|
||||
/*var loadIndex = layer.load(2);
|
||||
$.post('reg', obj.field, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code === 0) {
|
||||
layer.msg('注册成功', {icon: 1, time: 1500}, function () {
|
||||
location.href = 'login.html';
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, anim: 6});
|
||||
}
|
||||
}, 'json');*/
|
||||
return false;
|
||||
});
|
||||
|
||||
/* 获取验证码 */
|
||||
var captchaUrl = 'http://shiro.easyweb.vip/assets/captcha';
|
||||
$('#btnGetCode').click(function () {
|
||||
var $btn = $(this);
|
||||
var $inputEmail = $('input[name="email"]');
|
||||
var email = $inputEmail.val();
|
||||
if (!email) {
|
||||
layer.tips('请输入邮箱账号', $inputEmail, {tips: [1, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
var emailReg = /^([a-zA-Z]|[0-9])(\w|\-)+\@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
|
||||
if (!emailReg.test(email)) {
|
||||
layer.tips('邮箱格式不正确', $inputEmail, {tips: [1, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
var layIndex = layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
shade: .1,
|
||||
content: [
|
||||
'<div class="layer-get-code">',
|
||||
' <p>验证码将发送到您的邮箱,输入下方图形验证码点击按钮即可发送:</p>',
|
||||
' <div class="lay-code-group">',
|
||||
' <input placeholder="请输入图形验证码" class="layui-input"/>',
|
||||
' <img class="login-captcha" />',
|
||||
' </div>',
|
||||
' <div><button class="layui-btn layui-btn-fluid">立即发送</button></div>',
|
||||
'</div>'
|
||||
].join(''),
|
||||
success: function () {
|
||||
// 图形验证码
|
||||
$('.layer-get-code>.lay-code-group>img').click(function () {
|
||||
this.src = captchaUrl + '?t=' + (new Date).getTime();
|
||||
}).trigger('click');
|
||||
// 立即发送
|
||||
$('.layer-get-code .layui-btn-fluid').click(function () {
|
||||
var $input = $('.layer-get-code>.lay-code-group>input');
|
||||
var code = $input.val();
|
||||
if (!code) {
|
||||
layer.tips('请输入图形验证码', $input, {tips: [3, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
layer.close(layIndex);
|
||||
layui.formX.startTimer($btn, 30);
|
||||
/*var loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false});
|
||||
$.post('/sendEmailVer', {
|
||||
code: code,
|
||||
type: 0,
|
||||
email: email
|
||||
}, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code == 200) {
|
||||
layer.msg(res.msg, {icon: 1});
|
||||
layer.close(layIndex);
|
||||
layui.formX.startTimer($btn, 30);
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2});
|
||||
}
|
||||
}, 'json');*/
|
||||
});
|
||||
}, end: function () {
|
||||
layer.closeAll('tips');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -62,7 +62,7 @@ ${layoutContent}
|
|||
|
||||
<!--其他插件js-->
|
||||
@if(isNotEmpty(plugins)){
|
||||
@if(array.contain(plugins,"ztree")){
|
||||
@if(array.contain(plugins,"jquery-layout")){
|
||||
<script src="${ctxPath}/assets/expand/plugins/jquery-layout/jquery-2.1.4.min.js?v=${constants.getReleaseVersion()}"></script>
|
||||
<script type="text/javascript" src="${ctxPath}/assets/expand/plugins/jquery-layout/jquery.layout-latest.js?v=${constants.getReleaseVersion()}"></script>
|
||||
@}
|
||||
|
|
|
@ -161,18 +161,31 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
|
||||
<div class="layui-form">
|
||||
<form class="layui-form">
|
||||
<h2>用户登录</h2>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-username"></i>
|
||||
<input class="layui-input" id="username" name="username" placeholder="请输入登录账号" value="admin" autocomplete="off" lay-verType="tips" lay-verify="required" required/>
|
||||
<input class="layui-input" id="account" name="account" placeholder="请输入登录账号" autocomplete="off" lay-verType="tips" lay-verify="required" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-password"></i>
|
||||
<input class="layui-input" id="password" name="password" placeholder="请输入登录密码" value="123456" type="password" lay-verType="tips" lay-verify="required" required/>
|
||||
<input class="layui-input" id="password" name="password" placeholder="请输入登录密码" type="password" lay-verType="tips" lay-verify="required" required/>
|
||||
</div>
|
||||
@if(constants.getCaptchaOpen()){
|
||||
<div class="layui-form-item layui-input-icon-group login-captcha-group">
|
||||
<i class="layui-icon layui-icon-auz"></i>
|
||||
<input id="verKey" name="verKey" type="hidden"/>
|
||||
<input class="layui-input" id="verCode" name="verCode" placeholder="请输入验证码" autocomplete="off" lay-verType="tips" maxlength="5" lay-verify="required" required/>
|
||||
<img class="login-captcha" alt=""/>
|
||||
</div>
|
||||
|
||||
@}
|
||||
<div class="layui-form-item">
|
||||
<input type="checkbox" id="rememberMe" name="rememberMe" title="记住密码" lay-skin="primary" checked>
|
||||
<a href="${ctxPath}/register" class="layui-link pull-right">注册账号</a>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-fluid" id="submit">登录</button>
|
||||
<button id="loginSubmit" class="layui-btn layui-btn-fluid" lay-filter="loginSubmit" lay-submit>登录</button>
|
||||
</div>
|
||||
<div class="layui-form-item login-oauth-group text-center">
|
||||
<a href="${ctxPath}/oauth/render/qq"><i class="layui-icon layui-icon-login-qq" style="color:#3492ed;"></i></a> 
|
||||
|
@ -180,7 +193,8 @@
|
|||
<img class="layui-icon" style="height: 28px;width: 28px; margin-top: -12px !important;" src="${ctxPath}/assets/expand/images/git.png"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="login-copyright">copyright © 2020 stylefeng.cn all rights reserved.</div>
|
||||
|
||||
|
@ -196,12 +210,16 @@
|
|||
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"></script>
|
||||
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"></script>
|
||||
<script>
|
||||
layui.use(['layer', 'form', 'index', 'HttpRequest'], function () {
|
||||
layui.use(['layer', 'form', 'index', 'HttpRequest','admin','notice'], function () {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var form = layui.form;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var index = layui.index;
|
||||
var admin = layui.admin;
|
||||
var notice = layui.notice;
|
||||
|
||||
|
||||
|
||||
$('.login-wrapper').removeClass('layui-hide');
|
||||
|
||||
|
@ -210,22 +228,47 @@
|
|||
layer.msg(errorMsg, {icon: 5, anim: 6});
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
function getKaptcha(){
|
||||
var request = new HttpRequest(Feng.ctxPath + '/kaptcha'+ '?t=' + (new Date).getTime(), 'get');
|
||||
var result = request.start();
|
||||
$("#verKey").val(result.data.verKey)
|
||||
$('img.login-captcha').attr('src', result.data.verImage);
|
||||
}
|
||||
|
||||
// 点击刷新验证码
|
||||
$('img.login-captcha').click(function () {
|
||||
getKaptcha();
|
||||
});
|
||||
|
||||
// 开启验证码
|
||||
@if(constants.getCaptchaOpen()){
|
||||
getKaptcha();
|
||||
@}
|
||||
// 登录操作
|
||||
$('#submit').click(function () {
|
||||
form.on('submit(loginSubmit)', function (data){
|
||||
admin.btnLoading('#loginSubmit',"登录中");
|
||||
var request = new HttpRequest(Feng.ctxPath + "/loginAction", 'post', function (data) {
|
||||
Feng.success("登录成功!");
|
||||
// 清除顶部选择应用的缓存
|
||||
index.clearTabCache();
|
||||
// 重定向到首页
|
||||
window.location.href = Feng.ctxPath + "/";
|
||||
}, function (data) {
|
||||
Feng.error("登录失败!" + data.message);
|
||||
@if(constants.getCaptchaOpen()){
|
||||
//清空输入框
|
||||
$("#verCode").val('');
|
||||
//刷新验证码
|
||||
getKaptcha();
|
||||
@}
|
||||
//停止loading
|
||||
admin.btnLoading('#loginSubmit', false);
|
||||
notice.msg(data.message, {icon: 2});
|
||||
});
|
||||
request.set("account", $("#username").val());
|
||||
request.set("password", $("#password").val());
|
||||
data.field.rememberMe=$("#rememberMe").prop("checked");
|
||||
request.set(data.field);
|
||||
request.start(true);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
@layout("/layout/_tree_container.html", {plugins:["jquery-layout"], js:["/assets/modular/api/api.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">API接口文档</span>
|
||||
</div>
|
||||
|
||||
<div id="myContiner" style="height: 100%">
|
||||
<div class="ui-layout-west">
|
||||
<div class="box box-main">
|
||||
<div class="ui-layout-content">
|
||||
<div id="apiTree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-center" style="height: 97%;overflow: scroll">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
|
||||
<legend>接口详情</legend>
|
||||
</fieldset>
|
||||
<form class="layui-form" lay-filter="apiDetailForm">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-xs2">
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">http请求方法</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="httpMethod" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-xs10">
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">资源的请求路径</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="url" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">API名称</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="resourceName" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">控制器类名称</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="className" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">控制器中的方法名称</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="methodName" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">是否是视图类型</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="viewFlag" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">是否需要登录</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="requiredLoginFlag" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">是否需要鉴权</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="requiredPermissionFlag" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="wide-layui-form-label">参数校验分组</label>
|
||||
<div class="wide-layui-input-block">
|
||||
<input type="text" name="validateGroups" autocomplete="off" class="layui-input layui-disabled" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
|
||||
<legend>请求参数</legend>
|
||||
</fieldset>
|
||||
|
||||
<table class="layui-hide" id="requestParamsTable"></table>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
|
||||
<legend>响应参数</legend>
|
||||
</fieldset>
|
||||
|
||||
<table class="layui-hide" id="responseParamsTable"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@}
|
|
@ -1,136 +1,108 @@
|
|||
@layout("/layout/_container.html",{js:["/assets/modular/auth/resource/resource_detail.js"]}){
|
||||
@layout("/layout/_form.html",{js:["/assets/modular/auth/resource/resource_detail.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">资源管理</span>
|
||||
</div>
|
||||
<form class="layui-form" id="resourceForm" lay-filter="resourceForm">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-form-item layui-row">
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">应用标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="appCode" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="appCode" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">资源标识</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="resourceCode" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="resourceCode" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">资源名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="resourceName" placeholder="资源名称" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="resourceName" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">项目编码</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="projectCode" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="projectCode" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">控制器类名</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="className" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="className" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">方法名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="methodName" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="methodName" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">资源所属模块</label>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">所属模块</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="modularCode" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="modularCode" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">模块中文名称</label>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">模块名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="modularName" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="modularName" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">初始化地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="ipAddress" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="ipAddress" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">是否视图类型</label>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">是否视图</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="viewFlag" type="checkbox" lay-skin="switch" lay-filter="viewFlag" lay-text="是|否" disabled=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">请求路径</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="url" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="url" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">请求方法</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="httpMethod" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
<input name="httpMethod" type="text" class="layui-input"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">是否需要登录</label>
|
||||
<div class="layui-inline layui-col-md6">
|
||||
<label class="layui-form-label">是否需登录</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="requiredLoginFlag" type="checkbox" lay-skin="switch" lay-filter="requiredLoginFlag" lay-text="是|否" disabled=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">是否需要鉴权</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="requiredPermissionFlag" type="checkbox" lay-skin="switch" lay-filter="requiredPermissionFlag" lay-text="是|否" disabled=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">资源添加日期</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="createTime" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline layui-col-md12">
|
||||
<label class="layui-form-label">创建人</label>
|
||||
<div class="layui-input-block">
|
||||
<input name="createUser" type="text" disabled readonly class="layui-input layui-disabled"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group-bottom text-center">
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> 关闭 </button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group-bottom text-center" style="z-index: 200">
|
||||
<button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> 关闭 </button>
|
||||
</div>
|
||||
|
||||
@}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/dept/dept.js"]}){
|
||||
@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/dept/dept.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">部门管理</span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@layout("/layout/_form.html",{js:["/assets/modular/system/log/log_detail.js"]}){
|
||||
|
||||
<form class="layui-form" id="organizationForm" lay-filter="logForm">
|
||||
<form class="layui-form" id="logForm" lay-filter="logForm">
|
||||
<div class="layui-fluid" style="padding-bottom: 75px;">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/organization/organization.js"]}){
|
||||
@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/organization/organization.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">机构管理</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@layout("/layout/_tree_container.html",{plugins:["ztree"],js:["/assets/modular/system/user/user.js"]}){
|
||||
@layout("/layout/_tree_container.html",{plugins:["jquery-layout"],js:["/assets/modular/system/user/user.js"]}){
|
||||
|
||||
<div class="layui-body-header">
|
||||
<span class="layui-body-header-title">用户管理</span>
|
||||
|
|
|
@ -0,0 +1,380 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link href="${ctxPath}/assets/expand/images/favicon.ico" rel="icon">
|
||||
<title>${constants.getSystemName()}-用户注册</title>
|
||||
<link rel="stylesheet" href="${ctxPath}/assets/common/libs/layui/css/layui.css"/>
|
||||
<link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css?v=318">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
body {
|
||||
background-image: url("${ctxPath}/assets/common/images/bg-login.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body:before {
|
||||
content: "";
|
||||
background-color: rgba(0, 0, 0, .2);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.login-wrapper {
|
||||
max-width: 420px;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form {
|
||||
padding: 25px 30px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.19);
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > h2 {
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item {
|
||||
margin-bottom: 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-input {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.login-wrapper .layui-input-icon-group > .layui-input {
|
||||
padding-left: 46px;
|
||||
}
|
||||
|
||||
.login-wrapper .layui-input-icon-group > .layui-icon {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
font-size: 20px;
|
||||
color: #909399;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-captcha-group {
|
||||
padding-right: 135px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-captcha-group > .login-captcha {
|
||||
height: 46px;
|
||||
width: 120px;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 2px !important;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-form-checkbox {
|
||||
margin: 0 !important;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item > .layui-form-checkbox > .layui-icon {
|
||||
width: 15px !important;
|
||||
height: 15px !important;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form .layui-btn-fluid {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
font-size: 16px;
|
||||
border-radius: 2px !important;
|
||||
}
|
||||
|
||||
.login-wrapper > .layui-form > .layui-form-item.login-oauth-group > a > .layui-icon {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.login-copyright {
|
||||
color: #eee;
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
\@media screen and (min-height: 550px) {
|
||||
.login-wrapper {
|
||||
margin: -250px auto 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-copyright {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-btn {
|
||||
background-color: #5FB878;
|
||||
border-color: #5FB878;
|
||||
}
|
||||
|
||||
.layui-link {
|
||||
color: #5FB878 !important;
|
||||
}
|
||||
|
||||
.login-captcha-btn {
|
||||
line-height: 44px;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
color: #666;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/** 获取图形验证码弹窗 */
|
||||
.layer-get-code {
|
||||
padding: 25px 25px;
|
||||
}
|
||||
|
||||
.layer-get-code > p {
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group {
|
||||
position: relative;
|
||||
padding-right: 135px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group > .layui-input {
|
||||
border-radius: 0;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
background-color: transparent;
|
||||
border-color: rgba(111, 121, 122, 0.3);
|
||||
}
|
||||
|
||||
.layer-get-code > .lay-code-group > img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 46px;
|
||||
width: 120px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.layer-get-code .layui-btn-fluid {
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
/** //获取图形验证码弹窗 */
|
||||
|
||||
.layui-btn-disabled {
|
||||
cursor: not-allowed !important;
|
||||
color: #999 !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
|
||||
<form class="layui-form">
|
||||
<h2>用户注册</h2>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-cellphone-fine"></i>
|
||||
<input class="layui-input" name="phone" placeholder="请输入手机号" autocomplete="off" lay-verType="tips" lay-verify="phoneX|required" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-email"></i>
|
||||
<input class="layui-input" name="email" placeholder="请输入邮箱账号" autocomplete="off" lay-verType="tips" lay-verify="email|required" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-password"></i>
|
||||
<input class="layui-input" name="password" placeholder="请输入新的登录密码" type="password" lay-verType="tips" lay-verify="required|psw" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group">
|
||||
<i class="layui-icon layui-icon-key"></i>
|
||||
<input class="layui-input" name="password2" placeholder="请再次输入登录密码" type="password" lay-verType="tips" lay-verify="equalTo" lay-equalTo="[name=password]" required/>
|
||||
</div>
|
||||
<div class="layui-form-item layui-input-icon-group login-captcha-group">
|
||||
<i class="layui-icon layui-icon-auz"></i>
|
||||
<input class="layui-input" name="code" placeholder="请输入验证码" autocomplete="off" lay-verType="tips" lay-verify="required" required/>
|
||||
<button type="button" id="btnGetCode" class="login-captcha login-captcha-btn layui-input">获取验证码</button>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<a href="${ctxPath}/" class="layui-link">返回登录</a>
|
||||
<a href="${ctxPath}/forget" class="layui-link pull-right">忘记密码</a>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||
<button class="layui-btn layui-btn-fluid" lay-filter="loginSubmit" lay-submit>注册</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="login-copyright">copyright © 2020 stylefeng.cn all rights reserved.</div>
|
||||
|
||||
@/* 加入contextPath属性和session超时的配置 */
|
||||
<script type="text/javascript">
|
||||
var Feng = {
|
||||
ctxPath: "${ctxPath}",
|
||||
version: '${constants.getReleaseVersion()}'
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- js部分 -->
|
||||
<script type="text/javascript" src="${ctxPath}/assets/common/libs/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js?v=318"></script>
|
||||
<script>
|
||||
layui.use(['layer', 'form', 'formX', 'HttpRequest','notice'], function () {
|
||||
var $ = layui.jquery;
|
||||
var layer = layui.layer;
|
||||
var form = layui.form;
|
||||
var HttpRequest = layui.HttpRequest;
|
||||
var notice=layui.notice;
|
||||
|
||||
$('.login-wrapper').removeClass('layui-hide');
|
||||
|
||||
/* 表单提交 */
|
||||
form.on('submit(loginSubmit)', function (obj) {
|
||||
// console.log(obj.field);
|
||||
layer.msg('注册成功', {icon: 1, time: 1500}, function () {
|
||||
location.href = 'login.html';
|
||||
});
|
||||
/*var loadIndex = layer.load(2);
|
||||
$.post('reg', obj.field, function (res) {
|
||||
layer.close(loadIndex);
|
||||
if (res.code === 0) {
|
||||
layer.msg('注册成功', {icon: 1, time: 1500}, function () {
|
||||
location.href = 'login.html';
|
||||
});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, anim: 6});
|
||||
}
|
||||
}, 'json');*/
|
||||
return false;
|
||||
});
|
||||
|
||||
/* 获取验证码 */
|
||||
var captchaUrl = Feng.ctxPath + '/kaptcha';
|
||||
$('#btnGetCode').click(function () {
|
||||
var $btn = $(this);
|
||||
var $inputPhone = $('input[name="phone"]');
|
||||
var phone = $inputPhone.val();
|
||||
if(!phone){
|
||||
layer.tips('请输入手机号', $inputPhone, {tips: [1, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
var phoneReg = /^1[3456789]\d{9}$/;
|
||||
if (!phoneReg.test(phone)) {
|
||||
layer.tips('手机号格式不正确', $inputPhone, {tips: [1, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
//var $inputEmail = $('input[name="email"]');
|
||||
//var email = $inputEmail.val();
|
||||
//if (!email) {
|
||||
// layer.tips('请输入邮箱账号', $inputEmail, {tips: [1, '#ff4c4c']});
|
||||
// return;
|
||||
//}
|
||||
// var emailReg = /^([a-zA-Z]|[0-9])(\w|\-)+\@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
|
||||
// if (!emailReg.test(email)) {
|
||||
// layer.tips('邮箱格式不正确', $inputEmail, {tips: [1, '#ff4c4c']});
|
||||
// return;
|
||||
// }
|
||||
var layIndex = layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
shade: .1,
|
||||
content: [
|
||||
'<div class="layer-get-code">',
|
||||
' <p>验证码将发送到您的手机,输入下方图形验证码点击按钮即可发送:</p>',
|
||||
' <div class="lay-code-group">',
|
||||
' <input id="verCode" name="verCode" placeholder="请输入图形验证码" maxlength="5" class="layui-input"/>',
|
||||
' <img class="login-captcha" />',
|
||||
' <input id="verKey" name="verKey" type="hidden"/>',
|
||||
' </div>',
|
||||
' <div><button class="layui-btn layui-btn-fluid">立即发送</button></div>',
|
||||
'</div>'
|
||||
].join(''),
|
||||
success: function () {
|
||||
// 图形验证码
|
||||
$('.layer-get-code>.lay-code-group>img').click(function () {
|
||||
getKaptcha();
|
||||
}).trigger('click');
|
||||
// 立即发送
|
||||
$('.layer-get-code .layui-btn-fluid').click(function () {
|
||||
var $input = $('.layer-get-code>.lay-code-group>input');
|
||||
var code = $input.val();
|
||||
if (!code) {
|
||||
layer.tips('请输入图形验证码', $input, {tips: [3, '#ff4c4c']});
|
||||
return;
|
||||
}
|
||||
layer.close(layIndex);
|
||||
|
||||
var loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false});
|
||||
var request = new HttpRequest(Feng.ctxPath + "/sms/sendLoginMessage", 'post', function (data) {
|
||||
layui.formX.startTimer($btn, 60);
|
||||
notice.msg('发送成功', {icon: 1});
|
||||
layer.close(layIndex);
|
||||
},function (data) {
|
||||
notice.msg(data.message, {icon: 2});
|
||||
});
|
||||
request.set("templateCode","SMS_187746216");
|
||||
request.set("phoneNumber",phone);
|
||||
request.set("verKey",$("#verKey").val());
|
||||
request.set("verCode",$("#verCode").val());
|
||||
request.start(true);
|
||||
layer.close(loadIndex);
|
||||
});
|
||||
}, end: function () {
|
||||
layer.closeAll('tips');
|
||||
}
|
||||
})
|
||||
});
|
||||
// 获取验证码
|
||||
function getKaptcha(){
|
||||
var request = new HttpRequest(Feng.ctxPath + '/kaptcha'+ '?t=' + (new Date).getTime(), 'get');
|
||||
var result = request.start();
|
||||
$("#verKey").val(result.data.verKey)
|
||||
$('.layer-get-code>.lay-code-group>img').attr('src', result.data.verImage);
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue