admin
2024-07-27 65aaf1c05bd06cefa82ebc40cc3e01cf4ac233c0
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>福利发放</title>
        <script>
            window.onresize = function() {
                document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
            };
            window.onresize();
        </script>
        <link rel="stylesheet" type="text/css" href="../layui/css/layui.css" />
        <link rel="stylesheet" type="text/css" href="css/common.css" />
        <script src="../js/jquery.min.js"></script>
        <script src="../layui/layui.js"></script>
        
        <style>
            .icon{
                width: 2.5rem;
                height: auto;
                margin-top: 1rem;
            }
            .title{
                font-family: Microsoft YaHei;
                font-weight: 400;
                font-size: 0.48rem;
                color: #3279F3;
                margin-top: 0.2rem;
            }
            .container{
                display: flex;
                flex-direction: column;
                align-items: center;
            }
            
            .btn{
                width: 5.97rem;
                height: 0.9rem;
                border-radius: 0.45rem;
                font-size: 0.34rem;
                color: #FFFFFF;
                margin-top: 0.87rem;
            }
            
            .login_content{
                background-color: #F3F3F3;
                height: 0.9rem;
                border-radius: 0.45rem;
                width: 5.97rem;
                margin-top: 0.23rem;
                line-height: 0.9rem;
                padding-left:0.42rem ;
                
            }
            .login_content img{
                width: 0.37rem;
                margin-right: 0.2rem;
            }
            .login_content input{
                border: none;
                background-color: transparent;
                font-size: 0.34rem;
                height: 0.9rem;
                line-height: 0.9rem;
                color: #000000;
            }
        
        </style>
    </head>
    <body>
        
        <div class="container">
            <img class="icon" src="img/logo.png"/>
            
            <div class="title">登录你的账户</div>
            
            <div style="height: 0.8rem;"></div>
            
            <div class="login_content">
                <img src="img/icon_account.png"/>
                <input type="text" placeholder="请输入账号"/>
            </div>
            
            <div class="login_content">
                <img src="img/icon_pwd.png" style="width: 0.31rem;"/>
                <input type="password" placeholder="请输入密码"/>
            </div>
            
            <button class="btn-active btn" >登&nbsp;&nbsp;&nbsp;&nbsp;录</button>
            
        </div>
        
        <script>
            $(function(){
                $(".btn").click(function(){
                    var text = $(".edit").val();
                    if(text.length<=0){
                        layer.msg("请输入口令");
                        return;
                    }
                    var index = layer.load();
                    // 上传口令
                    $.post("/webapi/submitKey",{"key":text},function(response){
                        layer.close(index);
                        if(response.code==0){
                            layer.msg("提交成功");
                             $(".edit").val("");
                        }else{
                            layer.msg(response.msg);
                        }
                    },'json').fail(function(jqXHR, textStatus, errorThrown){
                        layer.close(index);
                        layer.msg("网络请求失败");
                    });
                });
                
                
            });
            
        </script>
        
    
    </body>
</html>