From aa7c4ba35f1201615c18e47e54899a873eea28d3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 27 六月 2020 08:44:28 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/web/RouterController.java | 10 ++
src/main/webapp/views/pda/index.html | 10 ++
src/main/webapp/views/pda/login.html | 177 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 197 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/common/web/RouterController.java b/src/main/java/com/zy/common/web/RouterController.java
index 4112db7..5077891 100644
--- a/src/main/java/com/zy/common/web/RouterController.java
+++ b/src/main/java/com/zy/common/web/RouterController.java
@@ -36,4 +36,14 @@
}
}
+ @RequestMapping("/pda")
+ public void pda(HttpServletResponse response) {
+ try{
+ String redirect = Cools.isEmpty(applicationName)?"/views/pda/login.html":"/"+applicationName+"/views/pda/login.html";
+ response.sendRedirect(redirect);
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
}
diff --git a/src/main/webapp/views/pda/index.html b/src/main/webapp/views/pda/index.html
new file mode 100644
index 0000000..ee9f937
--- /dev/null
+++ b/src/main/webapp/views/pda/index.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>PDA棣栭〉</title>
+</head>
+<body>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/views/pda/login.html b/src/main/webapp/views/pda/login.html
new file mode 100644
index 0000000..9d0ef64
--- /dev/null
+++ b/src/main/webapp/views/pda/login.html
@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>绯荤粺鐧诲綍</title>
+ <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+ <script type="text/javascript" src="../../static/layui/layui.js"></script>
+ <script type="text/javascript" src="../../static/js/common.js"></script>
+ <style>
+ html{
+ height: 100%;
+ }
+ body.login-bg {
+ color: #777;
+ height: 100%;
+ background-image: linear-gradient(-90deg, #29bdd9 0%, #276ace 100%);
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: top center;
+ }
+
+ #login-wrapper {
+ box-sizing:border-box;
+ background: #fff;
+ position: absolute;
+ top: 45%;
+ left: 50%;
+ margin-top: -210px;
+ margin-left: -220px;
+ width: 440px;
+ min-height: 420px;
+ padding: 50px;
+ text-align: center;
+ border-radius: 5px;
+
+ transform-origin: 50% 50%;
+ animation: loading 1s 0s forwards;
+ transform: rotateX(0deg);
+ }
+
+ #login-wrapper h2 {
+ font-size: 26px;
+ margin-bottom: 30px;
+ }
+
+ .layadmin-user-login-body .layui-form-item {
+ margin-bottom: 20px;
+ position: relative;
+ }
+ .layadmin-user-login-body .layui-form-item .layui-input {
+ height: 42px;
+ padding-left: 40px;
+ font-size: 16px;
+ border: 1px solid #c8cccf;
+ color: inherit;
+ }
+ .login-submit {
+ margin-top: 30px;
+ }
+ .layadmin-user-login-icon {
+ position: absolute;
+ left: 1px;
+ top: 1px;
+ width: 38px;
+ line-height: 40px;
+ text-align: center;
+ color: #B2B2B2;
+ font-size: 18px;
+ }
+ .layui-btn-normal {
+ background-color: #0767aa;
+ font-size: 20px;
+ border-radius: 4px;
+ height: 52px;
+ }
+ #code-box {
+ position: relative;
+ height: 42px;
+ }
+ #code-label {
+ z-index: 999;
+ }
+ #code {
+ position: absolute;
+ left: 0;
+ top: 0;
+ display: inline-block;
+ width: 60%;
+ }
+ #codeImg {
+ border: 1px solid rgba(0,0,0,0.1);
+ position: absolute;
+ right: 5%;
+ top: 0;
+ width: 30%;
+ height: 90%;
+ }
+ </style>
+</head>
+<body class="login-bg">
+
+<div id="login-wrapper">
+ <header>
+ <h2>绯荤粺鐧诲綍</h2>
+ </header>
+ <div class="layui-form layadmin-user-login-body">
+ <div class="layui-form-item">
+ <label class="layui-icon layui-icon-cellphone layadmin-user-login-icon"></label>
+ <input id="mobile" class="layui-input" type="text" name="mobile" lay-verify="mobile" placeholder="鐢ㄦ埛鍚�">
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-icon layui-icon-password layadmin-user-login-icon"></label>
+ <input id="password" class="layui-input" type="password" name="password" lay-verify="password" placeholder="瀵嗙爜">
+ </div>
+ <!--<div class="layui-form-item">-->
+ <!--<input id="rememberPwd" style="vertical-align: middle" type="checkbox" lay-filter="remPwd" lay-skin="switch" lay-text="寮�鍚瘄鍏抽棴" title="璁颁綇瀵嗙爜" checked="checked">-->
+ <!--<span style="vertical-align: middle;font-size: 15px">璁颁綇瀵嗙爜</span>-->
+ <!--</div>-->
+ </div>
+ <div class="layui-form-item login-submit">
+ <button id="login-button" class="layui-btn layui-btn-fluid layui-btn-normal" lay-submit="" lay-filter="login">鐧� 褰�</button>
+ </div>
+</div>
+
+</body>
+<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script type="text/javascript" src="../../static/js/tools/md5.js"></script>
+<script type="text/javascript">
+
+
+ layui.use(['form','layer'],function () {
+ var form = layui.form,
+ layer = layui.layer,
+ $ = layui.jquery;
+
+ form.on('submit(login)', function (data) {
+ var mobile = $("#mobile").val();
+ if (mobile === "") {
+ layer.msg("璇疯緭鍏ユ墜鏈哄彿", {offset: '150px'});
+ return;
+ }
+ var password = $("#password").val();
+ if (password === "") {
+ layer.msg("璇疯緭鍏ュ瘑鐮�", {offset: '150px'});
+ return;
+ }
+
+ var user = {
+ mobile: mobile,
+ password: hex_md5(password)
+ };
+ $.ajax({
+ url: baseUrl+"/login.action",
+ data: user,
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ localStorage.setItem("token", res.data.token);
+ localStorage.setItem("username", res.data.username);
+ window.location.href = "index.html";
+ } else {
+ layer.msg(res.msg, {offset: '150px'});
+ }
+ }
+ });
+ return false;
+ });
+
+ $('body').keydown(function () {
+ if (event.keyCode === 13) {
+ $("#login-button").click();
+ }
+ });
+
+ });
+</script>
+</html>
\ No newline at end of file
--
Gitblit v1.9.1