自动化立体仓库 - WCS系统
Junjie
2023-11-28 d0554fe871d405268950cd5853755e611ea3a6a6
src/main/webapp/views/login.html
@@ -90,7 +90,7 @@
            align-items: center;
         }
         #login-button {
         .login-button {
            position: relative;
            width: 100%;
            border: 2px solid #8000ff;
@@ -106,7 +106,7 @@
            overflow: hidden;
         }
         #login-button::after {
         .login-button::after {
            content: "";
            position: absolute;
            background-color: rgba(255, 255, 255, 0.253);
@@ -120,7 +120,7 @@
            transition-duration: .5s;
         }
         #login-button:hover::after {
         .login-button:hover::after {
            transform: translateX(600px);
            transition-duration: .5s;
         }
@@ -209,7 +209,14 @@
                     <input placeholder="请输入密码" id="password" name="pass" class="inputField" type="password">
                  </div>
               
                  <input type="button" id="login-button" value="登录">
                  <input type="button" id="login-button" class="login-button" value="登录">
                  <div style="display: none;margin-top: 5px;width: 100%;" id="updateLicense">
                     <form enctype="multipart/form-data" style="display: none;">
                        <input id="license" type="file" name="file" >
                     </form>
                     <input type="button" id="submitLicense" class="login-button" style="margin: 0;" value="更新许可证">
                  </div>
               </div>
            </div>
            
@@ -287,9 +294,12 @@
                          layer.tips(res.msg, '#username', {tips: [4, '#ff0000']});
                      } else if (res.code === 10003) {
                          layer.tips(res.msg, '#password', {tips: [4, '#ff0000']});
                      } else {
                          layer.tips(res.msg, '.login-btn', {tips: [3, '#ff0000']});
                      }
                      } else if (res.code === 20001) {
                     layer.tips(res.msg, '#login-button', {tips: [3, '#ff0000']});
                     $("#updateLicense").show()
                  } else {
                     layer.tips(res.msg, '#login-button', {tips: [3, '#ff0000']});
                  }
                  }
              });
          });
@@ -307,6 +317,38 @@
         $("#copyright-img1").on("mouseout", () => {
            $("#copyright-img-large1").hide()
         })
         //更新许可证
         $("#submitLicense").on("click",() => {
            $("#license").click()
         })
         //上传并更新许可证
         $("#license").on("change",(evt) => {
            var files = evt.target.files;
            console.log(files)
            let formData = new FormData();
            formData.append("file", files[0])
            $.ajax({
               url: baseUrl+"/license/updateLicense",
               data: formData,
               method: 'POST',
               cache: false,
               processData: false,
               contentType: false,
               success: function (res) {
                  if (res.code == 200) {
                     layer.msg('更新成功', {time: 1000}, () => {
                        parent.location.reload()
                     });
                  }else{
                     layer.msg(res.msg,{time:2000},() => {
                        parent.location.reload()
                     })
                  }
               }
            })
         })
      </script>
   </body>
</html>