| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>安阳市大数据分析</title>
- <script src="Script/Common/huayi.load.js"></script>
- <script src="Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="./css/test-1920.css">
- <script src="js/jquery.min.js"></script>
- <script src="js/jquery.md5.js"></script>
- <script src="js/crypto-js.js"></script>
- <style type="text/css">
- body {
- background-image: url(./images/login.png);
- }
- .wrap_login {
- text-align: center;
- }
- h1 {
- padding: 35px 0;
- color: #136291;
- font-size: 45px;
- }
- .info_login {
- width: 85%;
- height: 790px;
- margin: 0 auto;
- margin-top: 50px;
- text-align: center;
- background-image: url(./images/login2.png);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- position: relative;
- /* background-color: #007AFF; */
- }
- .info_login h2 {
- padding-top: 40px;
- /* font-size: 20px;
- font-weight: bold; */
- }
- .info_login div {
- position: absolute;
- top: 200px;
- right: 200px;
- text-align: center;
- font-size: 20px;
- }
- .info_login div h4 {
- margin-bottom: 40px;
- }
- .info_login input {
- width: 460px;
- height: 60px;
- border-radius: 25px;
- padding: 0 30px;
- border: none;
- outline: none;
- background-color: #f3f4f6;
- margin-bottom: 40px;
- font-size: 18px;
- }
- .info_login input::-webkit-input-placeholder {
- font-size: 16px;
- font-weight: 400;
- color: #b2b3b3;
- }
- button {
- width: 500px;
- height: 60px;
- border-radius: 25px;
- padding: 0 20px;
- border: none;
- outline: none;
- background-image: linear-gradient(#0096ff, #00deff);
- font-size: 20px;
- color: $fff;
- font-weight: 700;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <div class="wrap_login">
- <h1>安阳市12345热线大数据分析系统</h1>
- <div class="info_login">
- <h2>真实倾听群众呼声 真实反映群众意愿 真正解决群众困难</h2>
- <div>
- <h4>欢迎登录<span style="color: rgb(35,159,255);">安阳市12345热线大数据分析系统</span></h4>
- <input type="text" class="username" placeholder="请输入您的账号"><br>
- <input type="password" class="password" placeholder="请输入您的密码"><br>
- <button type="button" id="submit_btn">登陆</button>
- </div>
- </div>
- </div>
- </body>
- <script>
- $("#submit_btn").click(function() {
- var gl_psw = $('.password').val()
- var currenttime = CurentTime();
- var datatime = currenttime.split(' ')[1].split(':').join('')
- var key = CryptoJS.enc.Utf8.parse(")O[9d]6,YF}+efcaj{+8>Z'e9M" + datatime);
- var gl_psw = CryptoJS.enc.Utf8.parse($.md5(gl_psw));
- var encrypted = CryptoJS.AES.encrypt(gl_psw, key, {
- mode: CryptoJS.mode.ECB,
- padding: CryptoJS.pad.Pkcs7
- });
- if ($(".username").val() == '') {
- layer.msg('用户名不许为空');
- return;
- }
- if ($(".password").val() == '') {
- layer.msg('密码不许为空');
- return;
- }
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "/Login/login",
- dataType: 'json',
- async: true,
- data: {
- username: $(".username").val(),
- password: encrypted.toString(),
- LoginTime: currenttime
- },
- success: function(data) {
- /*验证请求*/
- if(data.state == "success") {
- localStorage.setItem('datatoken',data.data.token)
- window.location.href = "index.html";
- }
- }
- });
- })
- function CurentTime() {
- var now = new Date();
- var year = now.getFullYear(); //年
- var month = now.getMonth() + 1; //月
- var day = now.getDate(); //日
- var hh = now.getHours(); //时
- var mm = now.getMinutes(); //分
- var ss = now.getSeconds(); //秒
- var clock = year + "-";
- if (month < 10)
- clock += "0";
- clock += month + "-";
- if (day < 10)
- clock += "0";
- clock += day + " ";
- if (hh < 10)
- clock += "0";
- clock += hh + ":";
- if (mm < 10) clock += '0';
- clock += mm + ":";
- if (ss < 10) clock += '0';
- clock += ss;
- return (clock);
- }
- </script>
- </html>
|