From 3b5b98a9911e3231cefe5ab4f47a4c9d94e5a2f7 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 28 十一月 2023 16:15:01 +0800
Subject: [PATCH] #将错误码存入备注字段进行展示
---
src/main/webapp/views/login.html | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 51 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/views/login.html b/src/main/webapp/views/login.html
index cfa39f6..aaa7ae5 100644
--- a/src/main/webapp/views/login.html
+++ b/src/main/webapp/views/login.html
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
- <title>涓壃 鈹� login of zoneyung wcs</title>
+ <title>鍐犻缚 鈹� login of zoneyung wcs</title>
<style>
* {
padding: 0;
@@ -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;
}
@@ -187,7 +187,7 @@
<div class="form-main">
<p style="text-align: center;"><img class="loginLogoUrl" src="../static/wcs/images/logo.png" alt="" style="width: 80%">
</p>
- <p style="margin-top: -15px;"><span class="login100-form-title p-t-20 p-b-45"
+ <p style="margin-top: -10px;"><span class="login100-form-title p-t-20 p-b-45"
style="color: #868686;font-size: 24px">WCS</span></p>
<div class="inputContainer">
<svg viewBox="0 0 16 16" fill="#2e2e2e" height="16" width="16"
@@ -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>
--
Gitblit v1.9.1