管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-09-29 0160430ef9b03028e5d1896e17f006f8af0c7daa
src/main/resources/templates/login.html
@@ -2,6 +2,7 @@
<html>
<head>
  <title>管道基础大数据平台服务-登录</title>
  <meta charset="utf-8" />
  <meta http-equiv="pragma" content="no-cache" />
  <meta http-equiv="cache-control" content="no-cache" />
  <meta http-equiv="expires" content="0" />
@@ -12,9 +13,10 @@
  <link href="../css/cas.css" rel="stylesheet" />
  <script src="../js/jquery.min.js"></script>
  <script src="../js/zxcvbn.js"></script>
  <script src="../js/jquery-ui.min.js"></script>
  <script src="../js/jquery.cookie.min.js"></script>
  <script src="../js/jquery-ui.min.js"></script>
  <script src="../js/bootstrap.min.js"></script>
  <script src="../js/rsa.min.js"></script>
  <style>
    .errorMessage_show {
      width: 200px;
@@ -27,7 +29,6 @@
    }
    .code {
      /* background:url(code_bg.jpg); */
      font-family: Arial;
      font-style: italic;
      color: blue;
@@ -75,24 +76,10 @@
        checkCode.innerHTML = code;
      }
    }
    // 2019-03-28 去掉 by XiaoQi
    function validateCode() {
      var inputCode = document.getElementById("inputCode").value;
      if (inputCode.length <= 0) {
        alert("请输入验证码!");
      }
      else if (inputCode.toUpperCase() != code.toUpperCase()) {
        alert("验证码输入有误!");
        createCode();
      }
      else {
        alert("验证码正确!");
      }
    }
  </script>
</head>
<body style="background-color: #0059cf; overflow-y: hidden !important;">
  <form method="post" id="fm1" class="fm-v clearfix">
<form method="post" id="fm1" class="fm-v clearfix" action="/sign/login">
    <div class="loginheader" style='display: none;'>
      <span class="loginname">单点登录</span>
      <img class="devline" src="../images/login/loginline.png" /><span class="lognameE">Log in</span>
@@ -109,40 +96,37 @@
        <div class="loginid" style='width: 400px; margin-right: 50px; margin-top: 45px; border-bottom: 1px solid #fff;'>
          <label for="username"></label>
          <input class="required" id="username" placeholder="请输入用户名" size="25" tabindex="1"
            type="text" accesskey="n"
            autocomplete="off" name="username" value="" />
               type="text" accesskey="n" autocomplete="off" name="username" value="" />
        </div>
        <!-- 密码 -->
        <section>
          <div class="loginpwd" style='width: 400px; margin-right: 20px; margin-top: 30px; border-bottom: 1px solid #fff;'>
            <label for="password"></label>
            <input class="required" placeholder="请输入密码" type="password" id="password" size="25"
              tabindex="2"
              accesskey="p"
              autocomplete="off" name="password" value="" /><span id="capslock-on" style="display: none;">
                <p>
          <input class="required" placeholder="请输入密码" type="password" id="password" size="25" tabindex="2"
                 accesskey="p" autocomplete="off" name="password" value="" /><span id="capslock-on" style="display: none;">
                  <i class="fa fa-exclamation-circle"></i>
                  <span>CAPSLOCK key is turned on!</span>
                </p>
              </span>
          </div>
        </section>
        <section class="row check">
        </section>
        <!-- 验证码 -->
         <div class="loginvalifield" style="margin-top:20px;">
      <section>
        <div class="loginvalifield" style="width: 400px; margin-right: 20px; margin-top: 30px; border-bottom: 1px solid #fff;">
            <div class="loginvalicode">
                <label for="inputCode"></label>
                <input id="inputCode" name="inputCode" class="required" tabindex="3" accesskey="v" type="text" value="" size="35" autocomplete="off">
            <input id="inputCode" placeholder="请输入验证码" name="inputCode" class="required" tabindex="3" accesskey="v" type="text" value="" size="35" autocomplete="off" maxlength="6">
            </div>
            <span class="code" id="checkCode" onclick="createCode()"></span>
        </div>
      </section>
      <section>
        <div id="eMsg" style="color: red; height: 40px; line-height: 40px; font-size: 15px; margin-bottom: -20px; margin-left: 45px;"></div>
      </section>
        <!-- 登录按钮 -->
        <section>
          <input class="loginbtn" style="margin-top: 25px;" name="submit" accesskey="l" value="" tabindex="5" type="submit">
        </section>
        <section id="otherCarLink" style='font-size: 14px; display: none;'>
          <a style='color: #c1d7fd;' href="downloads/证书安装与添加信任站点.zip" download="证书安装与添加信任站点.zip">证书安装与添加信任站点</a>
        </section>
      </div>
    </div>
@@ -211,13 +195,13 @@
      var bgHeight = 1080;
      winWidht += 150;
      if (winWidht >= 1920) {
        $("#div_middle").css("background", "url(../images/NewGJXJlogin/1920/bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "800px");
      $("#div_middle").css("background", "url(../images/NewGJXJlogin/1920/2bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "800px");
        $("#div_middle").css("height", "980px");
        $(".logintable").css("margin-top", "170px");
        div_loginBox.style.left = ((fullWidth - 410) / 2 + 474) + "px";
        bgHeight = 980; //1080
      } else if (winWidht >= 1600) {
        $("#div_middle").css("background", "url(../images/NewGJXJlogin/1600/bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "800px");
      $("#div_middle").css("background", "url(../images/NewGJXJlogin/1600/2bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "800px");
        $("#loginBox_Title span").css("font-size", "40px");
        $(".loginid").css("margin-top", "35px").css("height", "45px").css("width", "350px").css("background", "url(../images/NewGJXJlogin/1600/user.png) no-repeat").css("background-position", "3% 40%");
        $(".loginid input").css("width", "306px").css("margin-left", "45px").css("font-size", "18px");
@@ -236,7 +220,7 @@
        bgHeight = 800; //900
        div_loginBox.style.left = ((fullWidth - 360) / 2 + leftoffset) + "px";
      } else if (winWidht >= 1440) {
        $("#div_middle").css("background", "url(../images/NewGJXJlogin/1440/bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "810px");
      $("#div_middle").css("background", "url(../images/NewGJXJlogin/1440/2bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "810px");
        $("#loginBox_Title").css("height", "50px").css("line-height", "50px");
        $("#loginBox_Title span").css("font-size", "36px");
        $(".loginid").css("margin-top", "20px").css("height", "45px").css("width", "320px").css("background", "url(../images/NewGJXJlogin/1440/user.png) no-repeat").css("background-position", "3% 40%");
@@ -254,7 +238,7 @@
        bgHeight = 810;
        div_loginBox.style.left = ((fullWidth - 320) / 2 + leftoffset) + "px";
      } else if (winWidht >= 1366) {
        $("#div_middle").css("background", "url(../images/NewGJXJlogin/1366/bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "668px");
      $("#div_middle").css("background", "url(../images/NewGJXJlogin/1366/2bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "668px");
        $("#loginBox_Title").css("height", "50px").css("line-height", "50px");
        $("#loginBox_Title span").css("font-size", "32px");
        $(".loginid").css("margin-top", "35px").css("height", "40px").css("width", "300px").css("background", "url(../images/NewGJXJlogin/1366/user.png) no-repeat").css("background-position", "3% 50%");
@@ -274,7 +258,7 @@
        div_loginBox.style.left = ((fullWidth - 300) / 2 + leftoffset) + "px";
      } else {
        //fullWidth = 1280;
        $("#div_middle").css("background", "url(../images/NewGJXJlogin/1280/bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "620px");
      $("#div_middle").css("background", "url(../images/NewGJXJlogin/1280/2bg.jpg) no-repeat").css("background-position", "center bottom").css("height", "620px");
        $("#loginBox_Title").css("height", "50px").css("line-height", "50px");
        $("#loginBox_Title span").css("font-size", "32px");
        $(".loginid").css("margin-top", "27px").css("height", "40px").css("width", "280px").css("background", "url(../images/NewGJXJlogin/1280/user.png) no-repeat").css("background-position", "3% 50%");
@@ -370,25 +354,30 @@
    var i = "登录中..."
    //表单提交
    $("#fm1").submit(function () {
    $("#eMsg").html("");
      //验证用户名与密码
      var theUsername = document.getElementById("username").value;
      if (theUsername.length <= 0) {
        alert("请输入用户名!");
      $("#eMsg").html("提示:请输入用户名!");
      $("#username").focus();
        return false;
      }
      var thePassword = document.getElementById("password").value;
      if (thePassword.length <= 0) {
        alert("请输入密码!");
      $("#eMsg").html("提示:请输入密码!");
      $("#password").focus();
        return false;
      }
      //验证验证码(2019-03-28去掉 by XiaoQi)
    // 验证验证码
      var inputCode = document.getElementById("inputCode").value;
      if (inputCode.length <= 0) {
        alert("请输入验证码!");
      $("#eMsg").html("提示:请输入验证码!");
      $("#inputCode").focus();
        return false;
      }
      else if (inputCode.toUpperCase() != code.toUpperCase()) {
        alert("验证码输入有误!");
      $("#eMsg").html("提示:验证码输入有误!");
      $("#inputCode").val("").focus();
        createCode();
        return false;
      }
@@ -401,7 +390,11 @@
      $("#uPwd").val(Base64.encode(thePassword));
      $(":submit").attr("disabled", true);
      $(":submit").attr("value", i);
    setTimeout(function () {
      $(":submit").attr("disabled", false);
    }, 5000);
    //$(":submit").attr("value", i);
      return true;
    });