@using zhengcaioa.Models;
|
@{
|
Layout = null;
|
}
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="description" content="">
|
<meta name="author" content="ThemeBucket">
|
<title>@(SiteConfig.SiteName + " - 登录")</title>
|
<link rel="shortcut icon" href="@SiteConfig.ShortcutIcon">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/login/style.css" rel="stylesheet">
|
<link href="~/css/login/style-responsive.css" rel="stylesheet">
|
<!--[if lt IE 9]>
|
<script src="/js/plugins/html5shiv.js"></script>
|
<script src="/js/plugins/respond.min.js"></script>
|
<![endif]-->
|
<style>
|
* {
|
margin: 0px;
|
padding: 0px;
|
box-sizing: border-box;
|
}
|
|
html {
|
font-size: 16px;
|
width: 100%;
|
height: 100%;
|
}
|
|
body {
|
font-size: 1rem;
|
background: #f3f3f3;
|
line-height: 2rem;
|
color: #666;
|
height: 100%;
|
}
|
|
.login-body {
|
background: #005599 url(/img/3.jpg) center bottom no-repeat fixed;
|
background-size: cover;
|
width: 100%;
|
height: 100%;
|
}
|
|
.container {
|
position: relative;
|
height: 100%;
|
}
|
|
.form-signin {
|
max-width: none;
|
margin: 0 auto;
|
background: transparent;
|
border-radius: 0px;
|
-webkit-border-radius: 0px;
|
width: 500px;
|
text-align: center;
|
left: 50%;
|
margin-left: -250px;
|
position: absolute;
|
bottom: 20%;
|
}
|
|
.login-body .login-wrap {
|
background: url(/img/images/loginbg.png) no-repeat;
|
background-size: 100%;
|
width: 450px;
|
height: 338px;
|
margin-left: 180px;
|
margin-bottom:20px;
|
padding: 40px 70px 30px;
|
}
|
|
.form-signin input[type="text"], .form-signin input[type="password"] {
|
height: 40px;
|
line-height: 40px;
|
margin: 0px;
|
border-radius: 5px;
|
padding-left: 50px;
|
background: #ecf4fb;
|
border: none;
|
width: 100%;
|
}
|
|
.form-control-feedback {
|
left: 10px;
|
color: #fff;
|
position: absolute;
|
top: 3px;
|
right: auto;
|
z-index: 2;
|
display: block;
|
width: 34px;
|
height: 34px;
|
line-height: 34px;
|
text-align: center;
|
pointer-events: none;
|
}
|
|
.form-group {
|
margin-bottom: 15px;
|
}
|
|
.has-feedback {
|
position: relative;
|
}
|
|
.row {
|
position: relative;
|
width: 100%;
|
margin: 0px;
|
}
|
|
.login-wrap .col-xs-7 {
|
float: none;
|
width: 180px;
|
padding: 0px;
|
}
|
|
.login-wrap .col-xs-4 {
|
width: 110px;
|
padding-top: 3px;
|
position: absolute;
|
height: 40px;
|
border-radius: 5px;
|
top: 0px;
|
right: 0px;
|
background: #ecf4fb;
|
}
|
|
.form-signin .btn-login {
|
background: #2460aa;
|
box-shadow: 0px 2px 0px #0d4387;
|
color: #fff;
|
border-radius: 5px;
|
border: none;
|
height: 45px;
|
line-height: 45px;
|
width: 100%;
|
font-size: 18px;
|
padding: 0px;
|
margin-top: 0px;
|
}
|
|
.form-signin .btn-login:hover {
|
background: #0d4387;
|
}
|
|
.col-xs-12 {
|
text-align: center;
|
color: #FF0;
|
font-size: 14px;
|
}
|
|
.check {
|
font-size: 12px;
|
color: #fff;
|
text-align: left;
|
margin: 5px 0px;
|
}
|
|
.check input {
|
margin-right: 5px;
|
vertical-align: middle;
|
display: inline-block;
|
width: auto;
|
margin-top: 0px;
|
}
|
|
.tel {
|
text-align: center;
|
position: absolute;
|
width: 100%;
|
bottom: 16%;
|
font-size: 16px;
|
color: #fff;
|
}
|
|
.tel img {
|
display: inline-block;
|
vertical-align: middle;
|
margin-right: 8px;
|
width: 30px;
|
}
|
|
.app {
|
text-align: center;
|
position: absolute;
|
width: 100px;
|
bottom: 10px;
|
right: 150px;
|
font-size: 12px;
|
color: #fff;
|
}
|
|
.app img {
|
width: 100px;
|
height: 100px;
|
display: block;
|
line-height: 0px;
|
}
|
|
.appios {
|
text-align: center;
|
position: absolute;
|
width: 100px;
|
bottom: 10px;
|
right: 0px;
|
font-size: 12px;
|
color: #fff;
|
}
|
|
.appios img {
|
width: 100px;
|
height: 100px;
|
display: block;
|
line-height: 0px;
|
}
|
|
.form-control-feedback {
|
color: #ccc;
|
}
|
</style>
|
</head>
|
<body class="login-body">
|
|
<div class="container">
|
<form class="form-signin" action="/Home/Login" method="post">
|
<div class="form-signin-heading text-center">
|
<img src="~/img/images/logo.png?v=3" alt="" style="height:100px;" />
|
</div>
|
<div class="login-wrap">
|
<div class="form-group has-feedback">
|
<input name="txtID" type="text" class="form-control" placeholder="登录账号" autofocus value="">
|
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
</div>
|
<div class="form-group has-feedback">
|
<input name="txtPwd" type="password" class="form-control" placeholder="登录密码" value="">
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
</div>
|
<div class="row">
|
<div class="col-xs-7">
|
<input name="verifyCode" type="text" class="form-control" placeholder="验证码">
|
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
</div>
|
<div class="col-xs-4">
|
<img class="code" title="看不清?点击换一个" alt="VerifyImage" src="">
|
</div>
|
</div>
|
<div class="row">
|
<div class="check">
|
<input name="hidIp" id="hidIp" type="hidden" class="form-control">
|
</div>
|
</div>
|
<button class="btn btn-lg btn-login btn-block" type="submit">
|
登 录
|
</button>
|
<div class="row">
|
<div class="col-xs-12" style="color: black;font-weight:500;">
|
@Html.ValidationMessage("error", new { @class = "" })
|
</div>
|
</div>
|
</div>
|
</form>
|
|
|
</div>
|
|
|
<script src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js" type="text/javascript"></script>
|
<script type="text/javascript">
|
$(function () {
|
//获取url中的参数
|
function getUrlParam(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
if (r != null) return unescape(r[2]); return null; //返回参数值
|
}
|
|
var urlParam = getUrlParam("m");
|
if (urlParam != null && urlParam.length > 0) {
|
$(".text-red").html(urlParam);
|
}
|
|
$('.code').attr('src', '/Home/VerifyImage?r=' + Math.random());
|
|
$('.code').click(function () {
|
$(this).attr('src', '/Home/VerifyImage?r=' + Math.random());
|
});
|
});
|
var RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
|
if (RTCPeerConnection) (function () {
|
var rtc = new RTCPeerConnection({ iceServers: [] });
|
if (1 || window.mozRTCPeerConnection) {
|
rtc.createDataChannel('', { reliable: false });
|
};
|
|
rtc.onicecandidate = function (evt) {
|
if (evt.candidate) grepSDP("a=" + evt.candidate.candidate);
|
};
|
rtc.createOffer(function (offerDesc) {
|
grepSDP(offerDesc.sdp);
|
rtc.setLocalDescription(offerDesc);
|
}, function (e) { console.warn("offer failed", e); });
|
|
|
var addrs = Object.create(null);
|
addrs["0.0.0.0"] = false;
|
function updateDisplay(newAddr) {
|
if (newAddr in addrs) return;
|
else addrs[newAddr] = true;
|
var displayAddrs = Object.keys(addrs).filter(function (k) { return addrs[k]; });
|
for (var i = 0; i < displayAddrs.length; i++) {
|
if (displayAddrs[i].length > 16) {
|
displayAddrs.splice(i, 1);
|
i--;
|
}
|
}
|
console.log(displayAddrs[0]); //打印出内网ip
|
$("#hidIp").val(displayAddrs[0]);
|
}
|
|
function grepSDP(sdp) {
|
var hosts = [];
|
sdp.split('\r\n').forEach(function (line, index, arr) {
|
if (~line.indexOf("a=candidate")) {
|
var parts = line.split(' '),
|
addr = parts[4],
|
type = parts[7];
|
if (type === 'host') updateDisplay(addr);
|
} else if (~line.indexOf("c=")) {
|
var parts = line.split(' '),
|
addr = parts[2];
|
updateDisplay(addr);
|
}
|
});
|
}
|
})();
|
else {
|
console.log("请使用主流浏览器:chrome,firefox,opera,safari");
|
}
|
</script>
|
</body>
|
</html>
|