无关风月
2025-03-20 2ad97245d64b65132507cab36ad89d968edb7705
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
    <title>延长壳牌(四川)营销小程序管理平台</title>
 
    <link rel="shortcut icon" href="${ctxPath}/static/favicon.ico">
    <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${ctxPath}/static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${ctxPath}/static/css/style.css?v=4.1.0" rel="stylesheet">
    <script>if (window.top !== window.self) {
        window.top.location = window.location;
    }</script>
    <script src="${ctxPath}/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctxPath}/static/js/bootstrap.min.js?v=3.3.6"></script>
</head>
 
<body class="gray-bg" style="background-image: url('${ctxPath}/static/img/backgroundImg.jpg');background-repeat: no-repeat;background-size: 100% 100%;">
 
<div class="middle-box text-center loginscreen">
    <div style="padding: 100px 0px;">
        <h3>修改密码</h3>
        <br/>
        <h4 style="color: red;" id="tips">${tips!}</h4>
        <form class="m-t" role="form" action="${ctxPath}/updatepwd" method="post">
            <div class="form-group">
                <input type="text" name="username" value="" class="form-control" placeholder="用户名" required="">
            </div>
            <div class="form-group">
                <input type="password" name="oldPassword" id="oldPassword" value="" class="form-control" placeholder="原始密码" required="">
            </div>
            <div class="form-group">
                <input type="password" name="newPassword" id="newPassword" value="" class="form-control" placeholder="新密码" required="">
            </div>
            <div class="form-group">
                <input type="password" name="rePassword" id="rePassword" value="" class="form-control" placeholder="确认密码" required="">
            </div>
            <button type="submit" id="submitUpdatePass" style="display: none;">修 改</button>
            </p>
        </form>
        <button id="submit" class="btn btn-primary block full-width m-b">修 改</button>
    </div>
</div>
 
<script>
    $(function () {
        $("#submit").on('click', function () {
            var newPassword = $('#newPassword').val();
            var rePassword = $('#rePassword').val();
            if(!newPassword == rePassword){
                alert("两次密码不一致");
                return
            }
 
            var patt = /(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^a-zA-Z0-9]).{8,30}/;
            if(!patt.test(newPassword)){
                $('#tips').text("密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符");
                return
            }
            if(!patt.test(rePassword)){
                $('#tips').text("密码中必须包含大小字母、数字、特称字符,至少8个字符,最多30个字符");
                return
            }
            $('#submitUpdatePass').click();
        });
    });
</script>
 
</body>
 
</html>