Explorar el Código

大同职教中心定制版登录页面

中职版本
liangkun hace 3 años
padre
commit
03065264b3
Se han modificado 12 ficheros con 1019 adiciones y 3 borrados
  1. +304
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/login9.css
  2. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/key.png
  3. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/loginBg9.jpg
  4. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/logo9.png
  5. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/person.png
  6. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/variCode.png
  7. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +147
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml
  9. +215
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js
  10. +203
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js
  11. +137
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSevenWxLogin.cshtml
  12. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml

+ 304
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/login9.css Ver fichero

@@ -0,0 +1,304 @@
* {
box-sizing: border-box;
}

.commonClear:after,
.commonClear:before {
content: '';
display: block;
width: 100%;
clear: both;
}

.login_box {
width: 84%;
min-width: 1100px;
margin: 0 auto;
position: relative;
}

.loginHead {
line-height: 0;
padding: 30px 0;
position: relative;
}

.loginHead img {
width: 48%;
}
.login_span{
color: #a0a0a0;
font-size: 12px;
position: absolute;
left: 49%;
bottom: 43%;
}
.loginBox {
padding: 140px 0 0 0;
background-image: url(../../images/Login/loginBg9.jpg);
background-size: 100% 100%;
-moz-background-size: 100% 100%;
-webkit-background-size: 100% 100%;
-o-background-size: 100% 100%;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../images/Login/loginBg6.jpg', sizingMethod='scale');
min-height: 444px;
}

.loginCon {
float: right;
margin-right: 9%;
width: 320px;
background-color: #FBFCFC;
}

.loginInput {
height: 38px;
position: relative;
margin-top: 25px;
}

.loginInput img {
position: absolute;
top: 0;
bottom: 0;
left: 12px;
margin: auto;
height: 20px;
}

.loginInput input {
padding: 5px 10px 5px 40px;
height: 100%;
width: 100%;
font-size: 14px;
color: #1a1a1a;
line-height: 28px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0);
border: 1px solid #EDEDEC;
/*border-radius: 3px;*/
transition: border-color 0.3s;
-moz-transition: border-color 0.3s;
-ms-transition: border-color 0.3s;
-o-transition: border-color 0.3s;
-webkit-transition: border-color 0.3s;
}

.loginInput input:focus {
/*background: transparent;*/
border-color: #64B2F4;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0);
}

.loginTabCon {
display: none;
}

.loginTabCon:first-child {
display: block;
}

.loginBtn {
background: #0094de;
overflow: hidden;
height: 38px;
line-height: 38px;
border-radius: 5px;
color: #fff;
margin-top: 35px;
}
.loginBtn_box{
margin-top: 15px;
height: 26px;
}
.bbh_bs{
border:1px solid #0073cc;
color: #0073cc;
font-size: 12px;
border-radius: 20px;
padding: 1px 8px ;
float: left;
}
.bbh_sdow{
float: right;
}
.bbh_sdow img{
width: 10px;
height: 10px;
}
.loginBtn input {
width: 100%;
height: 100%;
cursor: pointer;
border-radius: 5px;
background: #0073cc;
font-size: 16px;
color: #fff;
line-height: 28px;
border: 1px solid #0073cc;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0) inset !important;
}
.loginBtn2{
margin-top:20px;
}
.loginBtn2 input{
background: #fff;
color: #0073cc;
}
.bbh {
margin-top: 10px;
font-size: 12px;
}
.bbh img{
width: 20px;
height: 20px;
float: left;
margin-right: 5px;
}
.bbh_span1 {
color: #0094de;
padding-top: 8px;
}


.bbh_span2 {
float: right;
/* color: #a0a0a0; */
color: #0094de;
}

.loginTab>li {
cursor: pointer;
width: 50%;
float: left;
text-align: center;
line-height: 48px;
height: 48px;
font-size: 16px;
color: #666666;
background-color: #DEE9F3;
}

.loginTab .active {
background-color: #1189C9;
color: #fff;
}

.loginTabBox {
margin: 30px 30px;
/*height: 264px;*/
}

#code {
width: 128px;
}

.variCode {
position: absolute;
right: 0;
top: 1px;
bottom: 1px;
width: 90px;
line-height: 0;
}

.variCode img {
width: 100%;
height: 100%;
left: 0;
}

#qrCode {
margin: 30px auto 10px;
width: 200px;
}

.qrCodeTxt {
text-align: center;
margin: 20px 0 30px;

}

.loginFooter {
height: 60px;
text-align: center;
line-height: 60px;
font-size: 12px;
color: #777777;
}

@media(max-width:1600px) {
.loginHead {
padding: 20px 0;
}

.loginHead img {
width: 28%;
}
.login_span{
left: 29%;
}

.loginInput {
margin-top: 20px;
}

.loginBtn {
margin-top: 25px;
}

.loginTabBox {
height: 274px;
}

.loginCon {
width: 300px;
}
}


@media(max-width:1366px) {
.loginTab>li {
line-height: 40px;
height: 40px;
}

.loginInput {
margin-top: 15px;
}

.loginInput input {
line-height: 24px;
}

.loginInput {
height: 34px;
}

.loginTabBox {
margin: 20px 20px;
height: 264px;
}

.loginCon {
width: 260px;
}

.loginFooter {
height: 40px;
line-height: 40px;
}

.loginHead {
padding: 15px 0;
}

.loginHead img {
width: 25%;
}
.login_span{
left: 26%;
}
}

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/key.png Ver fichero

Antes Después
Anchura: 25  |  Altura: 24  |  Tamaño: 609 B

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/loginBg9.jpg Ver fichero

Antes Después
Anchura: 2560  |  Altura: 1153  |  Tamaño: 1.8 MiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/logo9.png Ver fichero

Antes Después
Anchura: 1091  |  Altura: 108  |  Tamaño: 26 KiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/person.png Ver fichero

Antes Después
Anchura: 23  |  Altura: 25  |  Tamaño: 598 B

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/variCode.png Ver fichero

Antes Después
Anchura: 13  |  Altura: 15  |  Tamaño: 1.9 KiB

+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver fichero

@@ -1423,6 +1423,7 @@
<Content Include="Content\css\DragSSO\login5.css" />
<Content Include="Content\css\DragSSO\red.css" />
<Content Include="Content\css\LoginModel\login8.css" />
<Content Include="Content\css\LoginModel\login9.css" />
<Content Include="Content\css\OnlineRegistrate\Footer.html" />
<Content Include="Content\css\OnlineRegistrate\Header.html" />
<Content Include="Content\css\OnlineRegistrate\login.css" />
@@ -1986,6 +1987,7 @@
<Content Include="Content\images\LoginPage\wxLogin.png" />
<Content Include="Content\images\LoginPage\xxlogo.png" />
<Content Include="Content\images\LoginPage\zuo.png" />
<Content Include="Content\images\Login\key.png" />
<Content Include="Content\images\Login\login8-1.png" />
<Content Include="Content\images\Login\login8-2.png" />
<Content Include="Content\images\Login\login8-3.png" />
@@ -1995,12 +1997,16 @@
<Content Include="Content\images\Login\login8-7.png" />
<Content Include="Content\images\Login\login8-8.png" />
<Content Include="Content\images\Login\loginBg8.jpg" />
<Content Include="Content\images\Login\loginBg9.jpg" />
<Content Include="Content\images\Login\logo8.png" />
<Content Include="Content\images\Login\logo9.png" />
<Content Include="Content\images\Login\person.png" />
<Content Include="Content\images\Login\user1.jpg" />
<Content Include="Content\images\Login\user2.jpg" />
<Content Include="Content\images\Login\user3.jpg" />
<Content Include="Content\images\Login\user4.png" />
<Content Include="Content\images\Login\user5.png" />
<Content Include="Content\images\Login\variCode.png" />
<Content Include="Content\images\Login\verCode.png" />
<Content Include="Content\images\OnlineRegistrate\bj1.png" />
<Content Include="Content\images\OnlineRegistrate\error.png" />
@@ -3983,6 +3989,8 @@
<Content Include="Views\Login\PageFive\IndexWxLogin.js" />
<Content Include="Views\Login\PageFour\IndexWxLogin.js" />
<Content Include="Views\Login\PageOne\IndexWxLogin.js" />
<Content Include="Views\Login\PageSeven\Index.js" />
<Content Include="Views\Login\PageSeven\IndexWxLogin.js" />
<Content Include="Views\Login\PageSix\IndexWxLogin.js" />
<Content Include="Views\Login\PageSix\Index.js" />
<Content Include="Views\Login\PageFive\Index.js" />
@@ -7235,6 +7243,8 @@
<Content Include="Views\SSOSystem\DragNoLogin.cshtml" />
<Content Include="Views\SSOSystem\DragNoWxLogin.cshtml" />
<Content Include="Views\SSOSystem\_LayoutSSODrag.cshtml" />
<Content Include="Views\Login\PageSeven.cshtml" />
<Content Include="Views\Login\PageSevenWxLogin.cshtml" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />


+ 147
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml Ver fichero

@@ -0,0 +1,147 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<title>数字化智慧校园</title>
<meta name="keywords" content="登陆页面" />
<meta name="description" content="登陆页面" />
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/common.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/login9.css" rel="stylesheet" />
<link href="~/Content/css/process.css" rel="stylesheet" />
<!--自适应-->
<!--自适应-->

</head>

<body>
<div class="loginHead">
<div class="login_box">
<img src="~/Content/images/Login/logo9.png" alt="" />
<span class="login_span">
@if (ViewBag.Version)
{@ViewBag.VersionNum}
</span>
</div>
</div>
<div class="loginBox">
<div class="login_box commonClear">
<div class="loginCon">
<ul class="loginTab commonClear">
<li class="active">PC端登录</li>
<li>移动端登录</li>
</ul>
<input id="errornum" type="hidden" value="@ViewBag.errornum" />
<div class="error_info" hidden="hidden">*&nbsp;<span>密码不正确</span></div>
<div class="loginTabBox">
<div class="loginTabCon">
<form id="loginForm" role="form" method="post" novalidate="novalidate">
<div class="loginInput">
<input type="text" placeholder="请输用户名" id="lr_username" name="username" class="form-control required" />
<img src="~/Content/images/Login/person.png" alt="" />
</div>
<div class="loginInput">
<input type="password" placeholder="请输入登录密码" id="lr_password" name="password" class="form-control required" />
<img src="~/Content/images/Login/key.png" alt="" />
</div>
<div class="loginInput loginInputCode" hidden="hidden">
<input type="code" placeholder="请输入验证码" id="verifycode" name="code" class="form-control required" />
<div class="variCode"><img class="code" id="lr_verifycode_img" src="~/Login/VerifyCode" alt="点击切换验证码" title="点击切换验证码" /></div>
<img src="~/Content/images/Login/variCode.png" alt="" />
</div>
<div class="loginBtn">
<input type="button" id="lr_login_btn" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="登 录" style="cursor: pointer" />
</div>
<div class="loginBtn_box">
<!-- <input type="button" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="教师注册" style="cursor:pointer"> -->
@if (ViewBag.SSOSystemSwitch)
{
<a href="/SSOSystem/Index"><span class="bbh_bs">网上办大事大厅</span></a>
}
@if (ViewBag.FeixinSwitch)
{
<a href="/feixin.exe"><span class="bbh_bs bbh_sdow"><img src="~/Content/images/Login/login8-5.png" />飞星下载</span></a>
}
</div>
<div class="bbh">
@if (ViewBag.WeixinLoginSwitch)
{
<a href="/Login/LoginForWeixin?login=one"><img src="~/Content/images/LoginPage/icon.png" /><span class="bbh_span1">微信登陆</span></a>
}
@if (ViewBag.TeachSwitch)
{
<a href="/EducationalAdministration/EmpInfoEnternal/FormAdd" target="_blank"><span class="bbh_span2">教师注册</span></a>
}
</div>
</form>
</div>
<div class="loginTabCon">
<div id="qrCode"></div>
<div class="qrCodeTxt">智慧校园移动端</div>
</div>
</div>

</div>
</div>
</div>
<div class="loginFooter">
数字化智慧校园 版权所有 <span></span>
<!--京ICP备13045367号-->
</div>
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script>
<script src="~/Content/jquery/jquery.md5.min.js"></script>
<script src="~/Content/jquery/qrcode.min.js"></script>
<script src="~/Content/jquery/plugin/layer/layer.js"></script>
<script>
var h = $(window).height() - $('.loginHead').outerHeight() - $('.loginFooter').outerHeight();
$('.loginBox').outerHeight(h).css('paddingTop', (h - $('.login_box').height()) * 0.2);
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 = '@Url.Content("~")'.substr(0, '@Url.Content("~")'.length - 1);
$.lrToken = $('@Html.AntiForgeryToken()').val();
var DigitalschoolMisLoginurl = "@ViewBag.DigitalschoolMisLoginurl";
var Returnurl = "@ViewBag.Returnurl";
var Ip = "@ViewBag.Ip";
var ACIp = "@ViewBag.ACIp";
var ACIp2 = "@ViewBag.ACIp2";
var qrCodeBox = $('.qrCodeBox');
var loginForm = $('#loginForm');
var qrcode = new QRCode(document.getElementById("qrCode"),
{
width: 200,
height: 200
});
makeCode('@ViewBag.QRCodeUrl');
$('.loginTab li').click(function() {
var flag = $(this).hasClass('active');
if (!flag) {
var ind = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$('.loginTabCon').css('display', 'none').eq(ind).fadeIn();
} else {
return
}
})

function makeCode(urls) {
qrcode.makeCode(urls);
}
</script>
@Html.AppendJsFile("/Views/Login/PageSeven/Index.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")
</body>

</html>

+ 215
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js Ver fichero

@@ -0,0 +1,215 @@
/*!
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.03.08
* 描 述:登录页面前端脚本
*/
(function ($) {
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
if (isBindAccountLogin == 1) {
$("#lr_username").val(bindUserName);
$("#lr_password").val(bindUserPassword);
lrPage.login();
}

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'
});

var error = request('error');
if (error == "ip") {
lrPage.tip("登录IP限制");
}
else if (error == "time") {
lrPage.tip("登录时间限制");
}

if (!keyValue) {

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_verifycode_img").click(function () {
$("#verifycode").val('');
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random());
});
var errornum = $('#errornum').val();
if (errornum >= 3) {

$(".loginInputCode").show();
$("#lr_verifycode_img").trigger('click');
}

//点击密码icon 显示/隐藏
$('#psw_change').click(function (event) {
var event = event || window.event;
event.stopPropagation();
var $this = $(this);
$this.toggleClass('psw_show');
//如果当前隐藏 变显示
if ($this.hasClass('psw_show')) {
$this.css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw1.png) no-repeat center center'
});
$this.prev().attr('type', 'text');
} else {
$this.css(
'background', 'url(/Content/images/Login/psw0.png) no-repeat center center'
);
$this.prev().attr('type', 'password');
}
});

//登录方式点击
$('.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();
});
//java的统一身份认证
var javaName = request("u");
if (javaName) {
$("#lr_username").val(javaName);
$("#lr_password").val('123456');
lrPage.login();
}
},
login: function () {
lrPage.tip();

var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#verifycode");
var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val());

if (username == "") {
lrPage.tip('请输入账户');
$username.focus();
return false;
}
if (password == "") {
lrPage.tip('请输入密码');
$password.focus();
return false;
}

if ($("#verifycode").is(":visible") && verifycode == "") {
lrPage.tip('请输入验证码');
$verifycode.focus();
return false;
}
if (ACIp != null && ACIp != "") {
//Ip上网
sendToAc(ACIp, 'logon', Ip, username, '');
}
if (ACIp2 != null && ACIp2 != "") {
//Ip上网
sendToAc(ACIp2, 'logon', Ip, username, '');
}
password = $.md5(password);
lrPage.logining(true);
$.ajax({
url: $.rootUrl + "/Login/CheckLogin",
headers: { __RequestVerificationToken: $.lrToken },
data: { username: username, password: password, verifycode: verifycode },
type: "post",
dataType: "json",
success: function (res) {
if (res.code == 200) {
if (source == "noLogin") {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index";
} else if (source == "DragNoLogin") {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne";
} else {

window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
}
}
else if (res.code == 400) {
lrPage.logining(false);
lrPage.tip(res.info, true);
$('#errornum').val(res.data);
if (res.data >= 3) {
$(".loginInputCode").show();
$("#lr_verifycode_img").trigger('click');
}
}
else if (res.code == 500) {
lrPage.logining(false);
lrPage.tip('服务端异常,请联系管理员', 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(/Content/images/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', '#0094de');

}
},
tip: function (msg) {
var $tip = $('.error_info');
$tip.hide();
if (!!msg) {
$tip.find('span').html(msg);
$tip.show();
}
}
};
$(function () {
lrPage.init();
});
})(window.jQuery)

+ 203
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js Ver fichero

@@ -0,0 +1,203 @@
/*!
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.03.08
* 描 述:登录页面前端脚本
*/
(function ($) {
"use strict";
var source = request('source');
var keyValue = request('keyValue');
var lrPage = {
init: function () {

$('#psw_change').css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center'
});

var error = request('error');
if (error == "ip") {
lrPage.tip("登录IP限制");
}
else if (error == "time") {
lrPage.tip("登录时间限制");
}

if (!keyValue) {

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_verifycode_img").click(function () {
$("#verifycode").val('');
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random());
});
var errornum = $('#errornum').val();
if (errornum >= 3) {

$(".loginInputCode").show();
$("#lr_verifycode_img").trigger('click');
}

//点击密码icon 显示/隐藏
$('#psw_change').click(function (event) {
var event = event || window.event;
event.stopPropagation();
var $this = $(this);
$this.toggleClass('psw_show');
//如果当前隐藏 变显示
if ($this.hasClass('psw_show')) {
$this.css({
'background': 'url(' + $.rootUrl + '/Content/images/Login/psw1.png) no-repeat center center'
});
$this.prev().attr('type', 'text');
} else {
$this.css(
'background', 'url(/Content/images/Login/psw0.png) no-repeat center center'
);
$this.prev().attr('type', 'password');
}
});

//登录方式点击
$('.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"), $verifycode = $("#lr_verifycode_input"), $WeixinOpenId = $("#WeixinOpenId");
var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val()), WeixinOpenId = $.trim($WeixinOpenId.val());
var up = true;

if (username == "") {
lrPage.tip('请输入账户');
$username.focus();
return false;
}
if (password == "") {
lrPage.tip('请输入密码');
$password.focus();
return false;
}
var reg = /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\.])[0-9a-zA-Z!@#$%^&*,\.]{8,20}$/;
if (!reg.test(password)) {
up = false;
}

if ($("#lr_verifycode_input").is(":visible") && verifycode == "") {
lrPage.tip('请输入验证码');
$verifycode.focus();
return false;
}

if (ACIp != null && ACIp != "") {
//Ip上网
sendToAc(ACIp, 'logon', Ip, username, '');
}
if (ACIp2 != null && ACIp2 != "") {
//Ip上网
sendToAc(ACIp2, 'logon', Ip, username, '');
}
password = $.md5(password);
lrPage.logining(true);
$.ajax({
url: $.rootUrl + "/Login/CheckLoginBind",
headers: { __RequestVerificationToken: $.lrToken },
data: { username: username, pwd: password, WeixinOpenId: WeixinOpenId, up: up },
type: "post",
dataType: "json",
success: function (res) {
if (res.code == 200) {
if (source == "noLogin") {
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index";
} else {

window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
}
}
else if (res.code == 400) {
lrPage.logining(false);
lrPage.tip(res.info, true);
$('#errornum').val(res.data);
if (res.data >= 3) {
$(".loginInputCode").show();
$("#lr_verifycode_img").trigger('click');
}
}
else if (res.code == 500) {
lrPage.logining(false);
lrPage.tip('服务端异常,请联系管理员', 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(/Content/images/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', '#0094de');

}
},
tip: function (msg) {
var $tip = $('.error_info');
$tip.hide();
if (!!msg) {
$tip.find('span').html(msg);
$tip.show();
}
}
};
$(function () {
lrPage.init();
});
})(window.jQuery)

+ 137
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSevenWxLogin.cshtml Ver fichero

@@ -0,0 +1,137 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<title>数字化智慧校园</title>
<meta name="keywords" content="登陆页面" />
<meta name="description" content="登陆页面" />
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/common.css" rel="stylesheet" />
<link href="~/Content/css/LoginModel/login9.css" rel="stylesheet" />
<!--自适应-->
<!--自适应-->

</head>

<body>
<div class="loginHead">
<div class="login_box">
<img src="~/Content/images/Login/logo9.png" alt="" />
</div>
</div>
<div class="loginBox">
<div class="login_box commonClear">
<div class="loginCon">
<ul class="loginTab commonClear">
<li class="active">绑定</li>
</ul>
@{
if (!string.IsNullOrEmpty(ViewBag.QQOpenId))
{
<div class="wcImg">
<img src="~/Content/images/qq.png" alt="" /> 快捷登录账号绑定
</div>
}
else
{
<div class="wcImg">
<img src="~/Content/images/LoginPage/wxLogin.png" alt="" /> 快捷登录账号绑定
</div>
}
}
<input type="hidden" name="QQOpenId" id="QQOpenId" value="@ViewBag.QQOpenId" />
<input type="hidden" name="WeixinOpenId" id="WeixinOpenId" value="@ViewBag.WeixinOpenId" />
<input id="errornum" type="hidden" value="@ViewBag.errornum" />
<div class="error_info" hidden="hidden" style="top:88px;margin-left: 31px;">*&nbsp;<span>密码不正确</span></div>
<div class="loginTabBox">
<div class="loginTabCon">
<form id="loginForm" role="form" method="post" novalidate="novalidate">
<div class="loginInput">
<input type="text" placeholder="请输用户名" id="lr_username" name="username" class="form-control required" />
<img src="~/Content/images/Login/person.png" alt="" />
</div>
<div class="loginInput">
<input type="password" placeholder="请输入登录密码" id="lr_password" name="password" class="form-control required" />
<img src="~/Content/images/Login/key.png" alt="" />
</div>
<div class="loginInput loginInputCode" hidden="hidden">
<input type="code" placeholder="请输入验证码" id="verifycode" name="code" class="form-control required" />
<div class="variCode"><img class="code" id="lr_verifycode_img" src="~/Login/VerifyCode" alt="点击切换验证码" title="点击切换验证码" /></div>
<img src="~/Content/images/Login/variCode.png" alt="" />
</div>
<div class="loginBtn">
<input type="button" id="lr_login_btn" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="绑 定" style="cursor: pointer" />
</div>
</form>
</div>
<div class="loginTabCon">
<div id="qrCode"></div>
<div class="qrCodeTxt">智慧校园移动端</div>
</div>
</div>

</div>
</div>
</div>
<div class="loginFooter">
数字化智慧校园 版权所有 <span></span>
<!--京ICP备13045367号-->
</div>
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script>
<script src="~/Content/jquery/jquery.md5.min.js"></script>
<script src="~/Content/jquery/qrcode.min.js"></script>
<script src="~/Content/jquery/plugin/layer/layer.js"></script>
<script>
var h = $(window).height() - $('.loginHead').outerHeight() - $('.loginFooter').outerHeight();
$('.loginBox').outerHeight(h).css('paddingTop', (h - $('.login_box').height()) * 0.2);
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 = '@Url.Content("~")'.substr(0, '@Url.Content("~")'.length - 1);
$.lrToken = $('@Html.AntiForgeryToken()').val();
var DigitalschoolMisLoginurl = "@ViewBag.DigitalschoolMisLoginurl";
var Returnurl = "@ViewBag.Returnurl";
var Ip = "@ViewBag.Ip";
var ACIp = "@ViewBag.ACIp";
var ACIp2 = "@ViewBag.ACIp2";
var qrCodeBox = $('.qrCodeBox');
var loginForm = $('#loginForm');
var qrcode = new QRCode(document.getElementById("qrCode"),
{
width: 200,
height: 200
});
makeCode('@ViewBag.QRCodeUrl');
$('.loginTab li').click(function() {
var flag = $(this).hasClass('active');
if (!flag) {
var ind = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$('.loginTabCon').css('display', 'none').eq(ind).fadeIn();
} else {
return;
}
});

function makeCode(urls) {
qrcode.makeCode(urls);
}
</script>
@Html.AppendJsFile("/Views/Login/PageSeven/IndexWxLogin.js")
@Html.AppendJsFile("/Views/Login/ACLogon.js")

</body>

</html>

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml Ver fichero

@@ -108,7 +108,7 @@
width: 200,
height: 200
});
makeCode('@ViewBag.QRCodeUrl')
makeCode('@ViewBag.QRCodeUrl');
$('.loginTab li').click(function() {
var flag = $(this).hasClass('active');
if (!flag) {
@@ -116,9 +116,9 @@
$(this).addClass('active').siblings().removeClass('active');
$('.loginTabCon').css('display', 'none').eq(ind).fadeIn();
} else {
return
return;
}
})
});

function makeCode(urls) {
qrcode.makeCode(urls);


Cargando…
Cancelar
Guardar