自动化立体仓库 - WMS系统
lty
7 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/views/login.html
@@ -70,15 +70,15 @@
          <img src="../static/image/logo.png" alt="" style="width: 80%">
<!--          <span class="login100-form-title p-t-20 p-b-45">中扬立库</span>-->
<!--          <span class="login100-form-title p-t-20 p-b-45" style="margin: 15px 0;color: #868686;font-size: 24px">WMS</span>-->
          <div class="wrap-input100 validate-input m-b-10" data-validate="请输入用户名">
            <input id="username" class="input100" type="text" name="username" placeholder="username" autocomplete="off">
          <div class="wrap-input100 validate-input m-b-10" data-i18n="please_enter_login_account" data-i18n-attr="data-validate">
            <input id="username" class="input100" type="text" name="username" data-i18n-placeholder="login_account" autocomplete="off">
            <span class="focus-input100"></span>
            <span class="symbol-input100">
              <i class="fa fa-user"></i>
            </span>
          </div>
          <div class="wrap-input100 validate-input m-b-10" data-validate="请输入密码">
            <input id="password" class="input100" type="password" name="pass" placeholder="password">
          <div class="wrap-input100 validate-input m-b-10" data-i18n="please_enter_password" data-i18n-attr="data-validate">
            <input id="password" class="input100" type="password" name="pass" data-i18n-placeholder="password">
            <span class="focus-input100"></span>
            <span class="symbol-input100">
              <i class="fa fa-lock"></i>
@@ -102,6 +102,7 @@
    <script type="text/javascript" src="../static/js/tools/md5.js"></script>
    <script type="text/javascript" src="../static/layer/layer.js"></script>
    <script type="text/javascript" src="../static/js/common.js"></script>
    <script type="text/javascript" src="../static/js/i18n/i18n-helper.js"></script>
    <script>
      // remember pwd
      $(function () {
@@ -120,12 +121,14 @@
      $(document).on('click','.login-btn', function () {
        let username = $("#username").val();
        if (username === "") {
          layer.tips('请输入登录账号', '#username', {tips: [4, '#ff0000']});
          var tip = typeof I18n !== 'undefined' ? I18n.t('please_enter_login_account') : '请输入登录账号';
          layer.tips(tip, '#username', {tips: [4, '#ff0000']});
          return;
        }
        let password = $("#password").val();
        if (password === "") {
          layer.tips('请输入密码', '#password', {tips: [4, '#ff0000']});
          var tip = typeof I18n !== 'undefined' ? I18n.t('please_enter_password') : '请输入密码';
          layer.tips(tip, '#password', {tips: [4, '#ff0000']});
          return;
        }
        $.ajax({
@@ -141,16 +144,21 @@
              localStorage.setItem("username", res.data.username);
              window.location.href = "index.html";
            } else if (res.code === 10001) {
              layer.tips(res.msg, '#username', {tips: [4, '#ff0000']});
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.tips(msg, '#username', {tips: [4, '#ff0000']});
            } else if (res.code === 10002) {
              layer.tips(res.msg, '#username', {tips: [4, '#ff0000']});
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.tips(msg, '#username', {tips: [4, '#ff0000']});
            } else if (res.code === 10003) {
              layer.tips(res.msg, '#password', {tips: [4, '#ff0000']});
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.tips(msg, '#password', {tips: [4, '#ff0000']});
            } else if (res.code == 20001) {
              layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']});
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.tips(msg, '.login-btn', {tips: [3, '#ff0000']});
              $("#updateLicense").show()
            } else {
              layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']});
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.tips(msg, '.login-btn', {tips: [3, '#ff0000']});
            }
          }
        });
@@ -187,7 +195,8 @@
                parent.location.reload()
              });
            }else{
              layer.msg(res.msg,{time:2000},() => {
              var msg = typeof I18n !== 'undefined' ? I18n.t(res.msg) : res.msg;
              layer.msg(msg,{time:2000},() => {
                parent.location.reload()
              })
            }