You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

466 lines
14 KiB

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta name=”renderer” content=”webkit|ie-comp|ie-stand” />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<link rel="icon" href="~/favicon.ico">
<title>汽车衡无人值守系统 - 登录页面</title>
</head>
<body>
@Html.AppendCssFile("/css/normalize.css")
<style>
html {
position: relative;
height: 100%;
width: 100%;
}
body {
position: relative;
height: 100%;
width: 100%;
background: #027fb5;
/*background: #F8F8F8 url("/Content/images/Login/defaultbg.png") no-repeat;*/
/*background-size: 100% 50%;*/
}
.bgImg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 50%;
z-index: 0;
}
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
-webkit-text-fill-color: #757575;
}
input:disabled {
background-color: #fff;
}
.lr-login-body {
position: absolute;
top: 50%;
left: 50%;
width: 880px;
height: 514px;
transform: translate(-50%,-50%);
}
.lr-login-logo {
position: relative;
height: 66px;
width: 100%;
text-align: center;
}
.lr-login-logo > img {
display: block;
position: absolute;
left: 50%;
top: 0;
margin-left: -419px;
margin-top: -20px;
}
.lr-login-logo .lr-login-title {
font-family: PingFangSC-Regular;
vertical-align: baseline;
font-size: 27px;
color: rgba(255,255,255,0.8);
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 100%;
letter-spacing:8px
}
.lr-login-middle {
position: absolute;
width: 41%;
left: 50%;
transform: translateX(-50%);
height: 350px;
background: rgba(255,255,255,0.1);
background-position: 36px 52px;
box-shadow: 0 0 11px 13px rgba(0,0,0,0.02);
border-radius: 5px;
}
.lr-login-middle > img {
position: absolute;
left: 0px;
top: 0px;
}
.lr-login-middle .lr-login-main {
position: absolute;
top: 0;
right: 0;
z-index: 10;
background: #FFFFFF;
width: 451px;
height: 100%;
border-radius: 10px;
}
.lr-login-middle .lr-login-main:before {
content: '';
position: absolute;
left: 0;
margin-top: 38px;
width: 1px;
height: 304px;
background: #e5e5e5;
}
.lr-login-bypsw {
position: relative;
width: 100%;
height: 100%;
padding: 45px 0 52px;
}
.lr-login-toCode {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
width: 60px;
height: 60px;
}
.lr-login-input {
position: relative;
width: 100%;
height: 40px;
margin-bottom: 20px;
}
.lr-login-input input {
display: block;
width: 320px;
text-indent: 31px;
height: 40px;
line-height: 40px;
outline: none;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #666;
opacity: 0.99;
background: #FFFFFF;
border: 1px solid #CCCCCC;
border-radius: 2px;
margin:auto;
}
.lr-login-input > .inp_icon {
position: absolute;
left: 35px;
top: 14.5px;
z-index: 10;
}
.lr-login-input input:focus {
opacity: 0.99;
background: #FFFFFF;
border: 1px solid #3298DC;
border-radius: 2px;
}
.lr-login-reg input {
width: 220px;
height: 40px;
}
.lr-login-reg .code {
width: 82px;
height: 35px;
cursor: pointer;
position: absolute;
right: 74px;
bottom: 4px;
}
.lr-login-bycode {
display: none;
}
.lr-login-bycode .lr-login-info img {
width: 191px;
height: 191px;
margin-top: 68px;
margin-left: 126px;
}
.lr-login-bycode .lr-login-info p {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-top: 20px;
color: #333333;
width: 100%;
padding-right: 5px;
text-align: center;
}
.error_info {
font-family: PingFangSC-Regular;
position: absolute;
font-size: 12px;
color: #ED3232;
top: 32px;
display: none;
}
@*.noreg {
padding-top: 90px;
}*@
.noreg .lr-login-reg {
display: none;
}
.noreg .error_info {
top: 85px;
left:30px;
}
.lr-login-btn {
display: inline-block;
cursor: pointer;
font-family: PingFangSC-Regular;
font-size: 16px;
color: #FFFFFF;
height: 36px;
line-height: 36px;
margin-top: 15px;
width:100%;
}
.lr-login-btn p {
width: 320px;
text-align: center;
background: #3298DC;
border: 1px solid #3298DC;
border-radius: 2px;
margin:auto;
}
.lr-login-btn p:hover {
background: #268fe2;
}
.lr-login-btn.active {
cursor: default;
border: 1px solid #bdbdbd;
z-index: 10;
}
.lr-login-version {
font-size: 12px;
color: rgba(255,255,255,0.45);
margin-top: 15px;
text-align: right;
padding-right: 40px;
}
.lr-login-footer {
position: absolute;
bottom: 5px;
right: 20px;
text-align: center;
line-height: 28px;
}
.lr-login-footer p {
font-family: PingFangSC-Regular;
font-size: 12px;
color: #333333;
margin:auto;
}
.logoImg{
position:absolute;
top:5px;
left:0;
}
</style>
<div id="particles-js" style="display: flex;align-items: center;justify-content: center;position:fixed;left:0;right:0;top:0;bottom:0;z-index:-1;">
</div>
<img class="logoImg" src="~/img/login/logow.png" alt="">
<div class="lr-login-body">
<div class="lr-login-middle">
@*<img src="~/img/login/default_left.png" />*@
<!--登录框 正常登录-->
@*<div class="lr-login-main lr-login-normal">*@
<!--密码登录-->
<div class="lr-login-bypsw noreg">
<div class="error_info">*&nbsp;<span>密码不正确</span></div>
<div class="lr-login-logo">
<div class="lr-login-title">
汽车衡无人值守系统
</div>
</div>
<div class="lr-login-input">
<img class="inp_icon" src="~/img/login/default_account0.png" alt=""> <input id="lr_username" type="text" placeholder="帐号">
</div>
<div class="lr-login-input">
<img class="inp_icon" src="~/img/login/default_psw0.png" alt=""><input id="lr_password" type="password" placeholder="密码">
<span id="psw_change"></span>
</div>
<div class="lr-login-btn" id="lr_login_btn">
<p>登录</p>
</div>
<div class="lr-login-version">版本号:@ConfigHelper.GetConfig().Version</div>
</div>
</div>
</div>
<div class="lr-login-footer"> <p>Copyright © 2020 广东中钰油料设备有限责任公司</p><p></p></div>
<script src="~/js/jquery-1.10.2.min.js"></script>
<script src="~/js/jquery.md5.min.js"></script>
<script src="~/js/base64.min.js"></script>
<script src="~/js/particles.js"></script>
<script src="~/js/app.js"></script>
<script>
function request(d) { for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { var b = c[a].split("="); if (b[0] == d) if ("undefined" == unescape(b[1])) break; else return unescape(b[1]) } return "" };
$.rootUrl = '@Html.GetVirtualPath()';
(function ($) {
"use strict";
var lrPage = {
init: function () {
var error = request('error');
if (error == "ip") {
lrPage.tip("登录IP限制");
if (history && history.pushState) {
history.pushState({}, '管理后台 - 登录页面', top.$.rootUrl + '/Login/Index');
}
}
else if (error == "time") {
lrPage.tip("登录时间限制");
if (history && history.pushState) {
history.pushState({}, '管理后台 - 登录页面', top.$.rootUrl + '/Login/Index');
}
}
else if (error == "other") {
lrPage.tip('当前浏览器有其他账号登录了,请重新登录!');
if (history && history.pushState) {
history.pushState({}, '管理后台 - 登录页面', top.$.rootUrl + '/Login/Index');
}
}
if (window.location.href != top.window.location.href) {
top.window.location.href = window.location.href;
}
var isIE = !!window.ActiveXObject;
var isIE6 = isIE && !window.XMLHttpRequest;
if (isIE6) {
window.location.href = $.rootUrl + "/Error/ErrorBrowser";
}
lrPage.bind();
},
bind: function () {
// 回车键
document.onkeydown = function (e) {
e = e || window.event;
if ((e.keyCode || e.which) == 13) {
$('#lr_login_btn').trigger('click');
}
}
//输入框获取焦点
$('.lr-login-input input').on('focus', function () {
var src = $(this).prev().attr('src');
$(this).prev().attr('src', src.replace(/0.png$/, '1.png'));
}).on('blur', function () {
var src = $(this).prev().attr('src');
$(this).prev().attr('src', src.replace(/1.png$/, '0.png'));
});
////登录方式点击
//$('.lr-login-toCode').click(function () {
// var _this = $(this);
// if (_this.attr('login-access') == 'psw') {
// $('.lr-login-bycode').show();
// $('.lr-login-bypsw').hide();
// } else {
// $('.lr-login-bypsw').show();//管理后台
// $('.lr-login-bycode').hide();
// }
//})
// 登录按钮事件
$("#lr_login_btn").on('click', function () {
lrPage.login();
});
},
login: function () {
lrPage.tip();
var $username = $("#lr_username"), $password = $("#lr_password");
var username = $.trim($username.val()), password = $.trim($password.val());
if (username == "") {
lrPage.tip('请输入账户');
$username.focus();
return false;
}
if (password == "") {
lrPage.tip('请输入密码');
$password.focus();
return false;
}
password = $.md5(password);
lrPage.logining(true);
$.ajax({
url: $.rootUrl + "/Login/CheckLogin",
data: { account: username, password: password },
type: "post",
dataType: "json",
success: function (res) {
if (res.code == 200) {
window.location.href = $.rootUrl + '/Home/Index?s=' + res.data; ///+username+"&t="+res.data;
}
else {
lrPage.logining(false);
lrPage.tip(res.info, true);
}
}
});
},
logining: function (isShow) {
if (isShow) {
$('input').attr('disabled', 'disabled');
$("#lr_login_btn").addClass('active').attr('disabled', 'disabled').find('span').hide();
$("#lr_login_btn").css('background', '#eeecec url(' + $.rootUrl + '/img/Login/loading.gif) no-repeat center 10px');
}
else {
$('input').removeAttr('disabled');
$("#lr_login_btn").removeClass('active').removeAttr('disabled').find('span').show();
$("#lr_login_btn").css('background', '#268fe2');
}
},
tip: function (msg) {
var $tip = $('.error_info');
$tip.hide();
if (!!msg) {
$tip.find('span').html(msg);
$tip.show();
}
}
};
$(function () {
lrPage.init();
});
})(window.jQuery);
</script>
</body>
</html>