| | |
| | | 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()); |
| | |
| | | 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(), |
| | |
| | | </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() { |
| | |
| | | form.verify({ |
| | | checkPwd: function(val) { |
| | | if (val === ""){ |
| | | return "当前密码不能为空"; |
| | | // return "当前密码不能为空"; |
| | | } |
| | | if (parent.$('#password').val() !== val) { |
| | | return "密码不匹配"; |
| | |
| | | if (val.length < 4) { |
| | | return "不能少于4个字符"; |
| | | } |
| | | if (parent.$('#password').val() === val) { |
| | | if (parent.$('#password').val() !== hex_md5(val)) { |
| | | return "与旧密码不能相同"; |
| | | } |
| | | }, |
| | |
| | | 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", |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |