From dc210006de9ebe049c0dd5fcc1afcf1b23fa2de8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 22 七月 2020 15:57:55 +0800
Subject: [PATCH] #
---
src/main/webapp/views/password.html | 8 +++++---
src/main/java/com/zy/common/web/AuthController.java | 2 +-
src/main/webapp/views/user/user.html | 1 +
src/main/webapp/views/user/user_detail.html | 1 +
src/main/webapp/static/js/user/user.js | 2 +-
5 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/common/web/AuthController.java b/src/main/java/com/zy/common/web/AuthController.java
index 0623254..beb3a50 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -66,7 +66,7 @@
if (user.getStatus()!=1){
return R.parse(CodeRes.USER_10002);
}
- if (!Cools.md5(user.getPassword()).equals(password)){
+ if (!user.getPassword().equals(password)){
return R.parse(CodeRes.USER_10003);
}
String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword());
diff --git a/src/main/webapp/static/js/user/user.js b/src/main/webapp/static/js/user/user.js
index 9fd6b4b..9a908df 100644
--- a/src/main/webapp/static/js/user/user.js
+++ b/src/main/webapp/static/js/user/user.js
@@ -249,7 +249,7 @@
hostId: $('#hostId').val(),
username: $('#username').val(),
mobile: $('#mobile').val(),
- password: $('#password').val(),
+ password: hex_md5($('#password').val()),
roleId: $('#roleId').val(),
createTime: top.strToDate($('#createTime\\$').val()),
status: $('#status').val(),
diff --git a/src/main/webapp/views/password.html b/src/main/webapp/views/password.html
index d3736d1..8d20e0c 100644
--- a/src/main/webapp/views/password.html
+++ b/src/main/webapp/views/password.html
@@ -63,6 +63,8 @@
</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" src="../static/js/common.js" charset="utf-8"></script>
<script src="../static/layui/layui.js"></script>
<script>
layui.use(['form'], function() {
@@ -73,7 +75,7 @@
form.verify({
checkPwd: function(val) {
if (val === ""){
- return "褰撳墠瀵嗙爜涓嶈兘涓虹┖";
+ // return "褰撳墠瀵嗙爜涓嶈兘涓虹┖";
}
if (parent.$('#password').val() !== val) {
return "瀵嗙爜涓嶅尮閰�";
@@ -86,7 +88,7 @@
if (val.length < 4) {
return "涓嶈兘灏戜簬4涓瓧绗�";
}
- if (parent.$('#password').val() === val) {
+ if (parent.$('#password').val() !== hex_md5(val)) {
return "涓庢棫瀵嗙爜涓嶈兘鐩稿悓";
}
},
@@ -100,7 +102,7 @@
form.on('submit(savePwd)', function (data) {
var user = {
id: parent.$('#id').val(),
- password: $('#password').val(),
+ password: hex_md5($('#password').val()),
};
$.ajax({
url: baseUrl+"/user/update/auth",
diff --git a/src/main/webapp/views/user/user.html b/src/main/webapp/views/user/user.html
index 5c4c396..7ccaf20 100644
--- a/src/main/webapp/views/user/user.html
+++ b/src/main/webapp/views/user/user.html
@@ -66,6 +66,7 @@
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/tools/md5.js"></script>
<script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script>
<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>
diff --git a/src/main/webapp/views/user/user_detail.html b/src/main/webapp/views/user/user_detail.html
index f161bb0..e5213f4 100644
--- a/src/main/webapp/views/user/user_detail.html
+++ b/src/main/webapp/views/user/user_detail.html
@@ -81,6 +81,7 @@
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/tools/md5.js"></script>
<script type="text/javascript" src="../../static/js/user/user.js" charset="utf-8"></script>
</html>
--
Gitblit v1.9.1