@@ -10,10 +10,10 @@ form { | |||
body { | |||
background: url('../../images/LoginPage/bj.jpg'); | |||
background-size: cover; | |||
-moz-background-size: cover; | |||
-webkit-background-size: cover; | |||
-o-background-size: cover; | |||
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/LoginPage/loginBg.jpg', sizingMethod='scale'); | |||
padding: 1px; | |||
} | |||
@@ -357,10 +357,7 @@ li.color-picker i { | |||
} | |||
.tips { | |||
position: absolute; | |||
left: 50%; | |||
bottom: 35px; | |||
color: #0094DE; | |||
display: inline-block; | |||
font-size: 13px; | |||
} | |||
@@ -372,3 +369,30 @@ li.color-picker i { | |||
.tips img { | |||
margin-right: 8px | |||
} | |||
.wxLogin{ | |||
border: 0; | |||
right: 310px; | |||
} | |||
.wxLogin img{ | |||
width: 24px; | |||
top: -2px; | |||
} | |||
.wcImg{ | |||
font-size: 18px; | |||
margin-bottom: 50px; | |||
text-align: center; | |||
} | |||
.wcImg img{ | |||
width: 35px; | |||
position: relative; | |||
top: 7px; | |||
margin-right: 10px; | |||
} | |||
.loginBtn2{ | |||
margin-top: 15px; | |||
border: 1px solid #0094de; | |||
} | |||
.loginBtn2 input{ | |||
background: #fff; | |||
color: #0094de; | |||
} |
@@ -2,6 +2,7 @@ body { | |||
background-image: url('../../images/LoginPage/loginBg.jpg'); | |||
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../images/LoginPage/loginBg.jpg',sizingMethod='scale'); | |||
height: 100%; | |||
} | |||
.error_info { | |||
@@ -83,7 +84,7 @@ body { | |||
} | |||
#loginForm { | |||
margin-top: 122px; | |||
margin-top: 82px; | |||
} | |||
.loginInput { | |||
@@ -137,6 +138,7 @@ body { | |||
color: #fff; | |||
margin-top: 32px; | |||
width: 310px; | |||
} | |||
.loginBtn input { | |||
@@ -196,3 +198,18 @@ body { | |||
color: #fff; | |||
margin-bottom: 30px; | |||
} | |||
.wxLogin{ | |||
float: left; | |||
} | |||
.wxLogin img{ | |||
top: -2px; | |||
} | |||
.loginBtn2 input { | |||
background: #fff; | |||
color: #0094de; | |||
} | |||
.loginBtn2{ | |||
margin-top: 15px; | |||
border: 1px solid #0094de; | |||
} |
@@ -23,8 +23,8 @@ body { | |||
height: 30px; | |||
line-height: 28px; | |||
padding: 0 20px; | |||
color: #0094DE; | |||
border: 1px solid #0094DE; | |||
color: #C02222; | |||
border: 1px solid #C02222; | |||
border-radius: 15px; | |||
font-size: 12px; | |||
margin-top: 15px | |||
@@ -193,3 +193,11 @@ body { | |||
color: #C02222; | |||
font-size: 13px; | |||
} | |||
.wxLogin{ | |||
position: absolute; | |||
right: 0; | |||
left: 0; | |||
bottom: -53px; | |||
color: #333; | |||
font-size: 13px; | |||
} |
@@ -22,8 +22,8 @@ body { | |||
height: 30px; | |||
line-height: 28px; | |||
padding: 0 20px; | |||
color: #0094DE; | |||
border: 1px solid #0094DE; | |||
color: #02B081; | |||
border: 1px solid #02B081; | |||
border-radius: 15px; | |||
font-size: 12px; | |||
margin-top: 15px; | |||
@@ -227,3 +227,14 @@ body { | |||
color: #fff; | |||
font-size: 13px; | |||
} | |||
.wxLogin{ | |||
position: absolute; | |||
right: 220px; | |||
bottom: -53px; | |||
color: #fff; | |||
font-size: 13px; | |||
} | |||
.wcImg{ | |||
text-align: center; | |||
margin: 40px 0 70px; | |||
} |
@@ -23,8 +23,8 @@ body { | |||
height: 30px; | |||
line-height: 28px; | |||
padding: 0 20px; | |||
color: #0094DE; | |||
border: 1px solid #0094DE; | |||
color: #5D5AE0; | |||
border: 1px solid #5D5AE0; | |||
border-radius: 15px; | |||
font-size: 12px; | |||
margin-top: 15px; | |||
@@ -222,8 +222,18 @@ body { | |||
.tips { | |||
position: absolute; | |||
left: 32px; | |||
left: 202px; | |||
bottom: -50px; | |||
color: #5D5AE0; | |||
font-size: 13px; | |||
} | |||
.wxLogin{ | |||
position: absolute; | |||
left: 32px; | |||
bottom: -53px; | |||
color: #5D5AE0; | |||
font-size: 13px; | |||
} | |||
.wcImg{ | |||
margin: 20px 0 50px; | |||
} |
@@ -233,7 +233,16 @@ body { | |||
color: #0082DF; | |||
font-size: 13px; | |||
} | |||
.wxLogin{ | |||
position: absolute; | |||
left: 230px; | |||
bottom: -53px; | |||
color: #0082DF; | |||
font-size: 13px; | |||
} | |||
.wcImg{ | |||
margin-top: 30px; | |||
} | |||
@media(max-width:1600px) { | |||
.loginT { | |||
font-size: 26px; | |||
@@ -14,10 +14,10 @@ html { | |||
} | |||
body { | |||
background-size: cover; | |||
-moz-background-size: cover; | |||
-webkit-background-size: cover; | |||
-o-background-size: cover; | |||
background-size: 100% 100%; | |||
-moz-background-size: 100% 100%; | |||
-webkit-background-size: 100% 100%; | |||
-o-background-size: 100% 100%; | |||
} | |||
.loginType { | |||
@@ -53,3 +53,20 @@ body { | |||
.tips img { | |||
margin-right: 8px | |||
} | |||
.wxLogin img{ | |||
width: 24px; | |||
top: -2px; | |||
position: relative; | |||
vertical-align: middle; | |||
margin-right: 6px; | |||
} | |||
.wcImg{ | |||
font-size: 18px; | |||
margin-bottom: 30px; | |||
} | |||
.wcImg img{ | |||
width: 35px; | |||
position: relative; | |||
top: 7px; | |||
margin-right: 10px; | |||
} |
@@ -37,7 +37,7 @@ namespace Learun.Application.Web.Controllers | |||
private TeachSwitchIBLL teachSwitchIBLL = new TeachSwitchBLL(); | |||
private LoginModelIBLL loginModelIbll = new LoginModelBLL(); | |||
private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); | |||
WeChatDevelopIBLL weChatDevelopIbll=new WeChatDevelopBLL(); | |||
WeChatDevelopIBLL weChatDevelopIbll = new WeChatDevelopBLL(); | |||
#endregion | |||
#region 视图功能 | |||
@@ -182,6 +182,7 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
return Content("<script>alert('" + lc.Message + "');location.href='/ShowRegister/Index';</script>"); | |||
} | |||
//获取错误次数 | |||
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); | |||
//获取高职版跳转地址 | |||
ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"]; | |||
@@ -229,6 +230,7 @@ namespace Learun.Application.Web.Controllers | |||
ViewBag.Ip = GetIP(); | |||
ViewBag.ACIp = ConfigurationManager.AppSettings["ACIp"] ?? ""; | |||
ViewBag.ACIp2 = ConfigurationManager.AppSettings["ACIp2"] ?? ""; | |||
//获取登录页风格 | |||
var pageEntity = loginModelIbll.FindEnablePage(); | |||
if (string.IsNullOrEmpty(pageEntity?.Name)) | |||
{ | |||
@@ -800,7 +802,78 @@ namespace Learun.Application.Web.Controllers | |||
string WeixinOpenId = Request["WeixinOpenId"]; | |||
ViewBag.WeixinOpenId = WeixinOpenId; | |||
ViewBag.QQOpenId = QQOpenId; | |||
return View(); | |||
//获取错误次数 | |||
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); | |||
//获取高职版跳转地址 | |||
ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"]; | |||
ViewBag.Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port; | |||
//获取登录页二维码配置信息 | |||
ViewBag.HasQRCode = false; | |||
var qrcodelist = sys_QRCodeInLoginIBLL.GetList().ToList().Where(x => x.EnabledMark == 1).OrderByDescending(x => x.CreateTime); | |||
if (qrcodelist.Any()) | |||
{ | |||
ViewBag.HasQRCode = true; | |||
ViewBag.QRCodeUrl = qrcodelist.FirstOrDefault().QRCodeUrl; | |||
ViewBag.QRCodeText = qrcodelist.FirstOrDefault().Title; | |||
ViewBag.Title = qrcodelist.FirstOrDefault().Title; | |||
} | |||
//获取登录页面版本号 | |||
ViewBag.Version = false; | |||
var versionlist = sys_UpdateRecordIBLL.GetList().OrderByDescending(x => x.UpdateTime); | |||
if (versionlist.Any()) | |||
{ | |||
ViewBag.Version = true; | |||
ViewBag.VersionNum = versionlist.FirstOrDefault().VersionNum; | |||
ViewBag.VersionList = JsonConvert.SerializeObject(versionlist); | |||
} | |||
var result = teachSwitchIBLL.FindFirst("js"); | |||
ViewBag.TeachSwitch = result; | |||
var result2 = teachSwitchIBLL.FindFirst("fx"); | |||
ViewBag.FeiXinSwitch = result2; | |||
//网上办事大厅 | |||
var result3 = teachSwitchIBLL.FindFirst("ssosystem"); | |||
ViewBag.SSOSystemSwitch = result3; | |||
//微信快捷登录 | |||
var result4 = teachSwitchIBLL.FindFirst("wxloginforpc"); | |||
ViewBag.WeixinLoginSwitch = result4; | |||
//获取在线用户人数 | |||
ViewBag.OnlineUserNum = 0; | |||
var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | |||
if (onlineUserResult != null) | |||
{ | |||
ViewBag.OnlineUserNum = onlineUserResult.OnlineUserNum; | |||
} | |||
//获取本机ip | |||
ViewBag.Ip = GetIP(); | |||
ViewBag.ACIp = ConfigurationManager.AppSettings["ACIp"] ?? ""; | |||
ViewBag.ACIp2 = ConfigurationManager.AppSettings["ACIp2"] ?? ""; | |||
//获取登录页风格 | |||
var pageEntity = loginModelIbll.FindEnablePage(); | |||
if (pageEntity == null) | |||
{ | |||
ViewBag.LoGo = "/Content/images/logins/login4.png"; | |||
return View("DefaultWxLogin"); | |||
} | |||
else | |||
{ | |||
var logoUrl = annexesFileIbll.GetEntityByFolderId(pageEntity.Logo)?.F_FilePath; | |||
if (string.IsNullOrEmpty(logoUrl)) | |||
{ | |||
logoUrl = "/Content/images/logins/login4.png"; | |||
ViewBag.LoGo = logoUrl; | |||
} | |||
else | |||
{ | |||
ViewBag.LoGo = "/" + logoUrl.Substring(logoUrl.IndexOf("Resource")); | |||
} | |||
return View(pageEntity.Name + "WxLogin"); | |||
} | |||
//return View(); | |||
} | |||
[HttpPost] | |||
@@ -831,7 +904,7 @@ namespace Learun.Application.Web.Controllers | |||
else | |||
{ | |||
//更新openid | |||
userBll.UpdateWeixinOpenIdPC(userEntity.F_UserId,WeixinOpenId); | |||
userBll.UpdateWeixinOpenIdPC(userEntity.F_UserId, WeixinOpenId); | |||
//记录ip | |||
userBll.UpdateIp(GetIP(), userEntity.F_UserId); | |||
OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_PC", null); //写入缓存信息 | |||
@@ -1720,6 +1720,7 @@ | |||
<Content Include="Content\images\LoginPage\del2.png" /> | |||
<Content Include="Content\images\LoginPage\del3.png" /> | |||
<Content Include="Content\images\LoginPage\download.png" /> | |||
<Content Include="Content\images\LoginPage\icon.png" /> | |||
<Content Include="Content\images\LoginPage\iphoneLogin.png" /> | |||
<Content Include="Content\images\LoginPage\iphoneLogin3.png" /> | |||
<Content Include="Content\images\LoginPage\jiao2.png" /> | |||
@@ -1762,6 +1763,7 @@ | |||
<Content Include="Content\images\LoginPage\true2.png" /> | |||
<Content Include="Content\images\LoginPage\variCode.png" /> | |||
<Content Include="Content\images\LoginPage\verCode.png" /> | |||
<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\login8-1.png" /> | |||
@@ -3743,16 +3745,23 @@ | |||
<Content Include="Views\Login\Accordion\Index.js" /> | |||
<Content Include="Views\Login\ACLogon.js" /> | |||
<Content Include="Views\Login\Default.cshtml" /> | |||
<Content Include="Views\Login\Default\IndexWxLogin.js" /> | |||
<Content Include="Views\Login\Default\Index.css" /> | |||
<Content Include="Views\Login\Default\Index.js" /> | |||
<Content Include="Views\Login\Default\qrcode.min.js" /> | |||
<Content Include="Views\Login\images\login1.png" /> | |||
<Content Include="Views\Login\images\loginBg.jpg" /> | |||
<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\PageSix\IndexWxLogin.js" /> | |||
<Content Include="Views\Login\PageSix\Index.js" /> | |||
<Content Include="Views\Login\PageFive\Index.js" /> | |||
<Content Include="Views\Login\PageFour\Index.js" /> | |||
<Content Include="Views\Login\PageOne\Index.js" /> | |||
<Content Include="Views\Login\PageThree\IndexWxLogin.js" /> | |||
<Content Include="Views\Login\PageThree\Index.js" /> | |||
<Content Include="Views\Login\PageTwo\IndexWxLogin.js" /> | |||
<Content Include="Views\Login\PageTwo\Index.js" /> | |||
<Content Include="Views\Login\Top\Index.css" /> | |||
<Content Include="Views\Login\Top\Index.js" /> | |||
@@ -6888,6 +6897,13 @@ | |||
<Content Include="Views\UserCenter\LanguageForm.cshtml" /> | |||
<Content Include="Views\Login\LoginForWeixin.cshtml" /> | |||
<Content Include="Views\Login\RegisterBind.cshtml" /> | |||
<Content Include="Views\Login\DefaultWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageFiveWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageFourWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageOneWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageSixWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageThreeWxLogin.cshtml" /> | |||
<Content Include="Views\Login\PageTwoWxLogin.cshtml" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<WCFMetadata Include="Connected Services\" /> | |||
@@ -57,6 +57,12 @@ | |||
</div> | |||
</div> | |||
<div class="lr-login-middle"> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin down" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
@if (ViewBag.FeixinSwitch) | |||
{ | |||
<a href="/feixin.exe" class="down"> | |||
@@ -97,10 +103,6 @@ | |||
{ | |||
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;" href="/EducationalAdministration/EmpInfoEnternal/FormAdd">教师注册</a> | |||
} | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;" href="LoginForWeixin?login=one" title="微信登录">微信登录</a> | |||
} | |||
@if (ViewBag.Version) | |||
{ | |||
<span class="versionBtn" style="cursor:pointer;">版本号:<span>@ViewBag.VersionNum</span></span> | |||
@@ -36,11 +36,27 @@ html { | |||
vertical-align: middle; | |||
top: -1px; | |||
} | |||
.wxLogin{ | |||
border: 0; | |||
right: 310px; | |||
} | |||
.wxLogin img{ | |||
width: 24px; | |||
top: -2px; | |||
} | |||
.downsso { | |||
right: 170px; | |||
} | |||
.wcImg{ | |||
font-size: 18px; | |||
margin-bottom: 30px; | |||
} | |||
.wcImg img{ | |||
width: 35px; | |||
position: relative; | |||
top: 7px; | |||
margin-right: 10px; | |||
} | |||
body { | |||
margin: 0 | |||
} | |||
@@ -693,3 +709,4 @@ body { | |||
-o-background-position: center 15px !important; | |||
background-position: center 15px !important; | |||
} | |||
@@ -0,0 +1,206 @@ | |||
/*! | |||
* 版 本 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 () { | |||
$("#lr_verifycode_input").val(''); | |||
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random()); | |||
}); | |||
var errornum = $('#errornum').val(); | |||
if (errornum >= 3) { | |||
$('.lr-login-bypsw').removeClass('noreg'); | |||
$("#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 { | |||
if (res.data.pwd == true) { | |||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true"; | |||
} | |||
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) { | |||
$('#lr_verifycode_input').parent().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', '#268fe2'); | |||
} | |||
}, | |||
tip: function (msg) { | |||
var $tip = $('.error_info'); | |||
$tip.hide(); | |||
if (!!msg) { | |||
$tip.find('span').html(msg); | |||
$tip.show(); | |||
} | |||
} | |||
}; | |||
$(function () { | |||
lrPage.init(); | |||
}); | |||
})(window.jQuery) |
@@ -0,0 +1,182 @@ | |||
<!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> | |||
<style> | |||
/* for Chrome */ | |||
body::-webkit-scrollbar { | |||
display: none; | |||
} | |||
.lr-login-logo .lr-login-title:before { | |||
background-color: transparent !important | |||
} | |||
.lr-login-footer .OnlineUserNumBox { | |||
float: right; | |||
} | |||
.lr-login-footer > p { | |||
width: 880px; | |||
margin: auto; | |||
} | |||
.tips{ | |||
position: absolute; | |||
left: 50%; | |||
bottom: 35px; | |||
color: #fff; | |||
font-size: 13px; | |||
margin-left: -91px; | |||
} | |||
.tips > *{ | |||
display: inline-block; | |||
vertical-align: middle; | |||
} | |||
.tips img{ | |||
margin-right: 8px | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
@Html.AppendCssFile("/Views/Login/Default/Index.css") | |||
<link href="~/Content/css/process.css" rel="stylesheet" /> | |||
<!-- <img src="~/Content/images/Logins/loginBg.jpg" /> --> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="lr-login-body"> | |||
<div class="lr-login-logo"> | |||
<div class="lr-login-title" style="left: 0%;margin-left: 0;width: 100%;text-align: center;"> | |||
<img src="@ViewBag.LoGo" alt=""> | |||
</div> | |||
</div> | |||
<div class="lr-login-middle"> | |||
<img src="~/Content/images/logins/login2.png" /> | |||
<!--登录框 正常登录--> | |||
<div class="lr-login-main lr-login-normal"> | |||
<!--密码登录--> | |||
<div class="lr-login-bypsw noreg"> | |||
@{ | |||
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" /> | |||
<div class="error_info">* <span>密码不正确</span></div> | |||
<div class="lr-login-input"> | |||
<img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="lr_username" type="text" placeholder="手机号/帐号"> | |||
</div> | |||
<div class="lr-login-input"> | |||
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="lr_password" type="password" placeholder="密码"> | |||
<span id="psw_change"></span> | |||
</div> | |||
<div class="lr-login-input lr-login-reg"> | |||
<img class="inp_icon" src="~/Content/images/Login/default_reg0.png" alt=""><input id="lr_verifycode_input" type="text" placeholder="验证码"> | |||
<img class="code" id="lr_verifycode_img" src="~/Login/VerifyCode" alt="点击切换验证码" title="点击切换验证码" /> | |||
</div> | |||
<div class="lr-login-btn" id="lr_login_btn"><span>绑定</span></div> | |||
<br /> | |||
</div> | |||
<div class="loginCode"> | |||
<div class="lCodeImg" id="qrcode"> | |||
<!-- <img src="~/Content/images/logins/loginCode.jpg" alt=""> --> | |||
</div> | |||
<div class="lCodeTxt"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-login-footer" style="font-size: 12px;color: #fff;width: 880px;right:0;margin: auto;"> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips3.png" alt=""> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
<div style="position: relative;"> | |||
Copyright © 2019 数字化智慧校园 版权所有 <span class="OnlineUserNumBox" style="position: absolute;right: 0;top: 0;">在线用户数:<span class="OnlineUserNum">@ViewBag.OnlineUserNum</span>人</span> | |||
</div> | |||
</div> | |||
<img id="loginFoot" src="~/Content/images/logins/login1.png" alt=""> | |||
<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> | |||
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"; | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginImg').show(); | |||
$('.lCodeTxt').html("@ViewBag.Title"); | |||
} else { | |||
$('.loginImg').hide(); | |||
} | |||
//密码登录与扫码登录切换 | |||
$('.loginImg').click(function(){ | |||
var that = $(this); | |||
if(that.hasClass('active')){ | |||
that.removeClass('active'); | |||
$('.loginCode').css({display:'none'}).siblings('.noreg').stop().fadeIn(); | |||
}else{ | |||
that.addClass('active'); | |||
$('.noreg').css({display:'none'}).siblings('.loginCode').stop().fadeIn(); | |||
} | |||
}) | |||
var qrcode = new QRCode(document.getElementById("qrcode"), { | |||
width : 200, | |||
height : 200 | |||
}); | |||
qrcode.makeCode("@ViewBag.QRCodeUrl"); | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/Default/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.versionBtn').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</body> | |||
</html> |
@@ -9,7 +9,7 @@ | |||
<title>LoginForWeixin</title> | |||
</head> | |||
<body> | |||
<input id="access_token" type="hidden" value="@ViewBag.access_token"/> | |||
<input id="access_token" type="hidden" value="@ViewBag.access_token" /> | |||
</body> | |||
</html> | |||
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> | |||
@@ -31,16 +31,16 @@ | |||
location.href = result.data.returnurl; | |||
} | |||
else { | |||
location.href = "/CGPI/Index"; | |||
location.href = "/Home/Index"; | |||
} | |||
} | |||
else | |||
{ | |||
location.href = "/CGPI/Index"; | |||
location.href = "/Home/Index"; | |||
} | |||
} | |||
else { | |||
location.href = "/CGPI/Login"; | |||
location.href = "/Login/Index"; | |||
} | |||
}, | |||
error: function (msg) { | |||
@@ -29,6 +29,12 @@ | |||
{ | |||
<a href="/SSOSystem/Index" class="down downsso">网上办事大厅</a> | |||
} | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin down" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="loginR" style=""> | |||
<div class="loginType"> | |||
@@ -68,7 +74,7 @@ | |||
{ | |||
<a href="#"><span class="bbh_span2">版本号:<span>@ViewBag.VersionNum</span></span></a> | |||
} | |||
<br /> | |||
</div> | |||
</form> | |||
@@ -80,12 +86,15 @@ | |||
<div class="loginL"> | |||
<img src="~/Content/images/LoginPage/zuo.png" alt="" /> | |||
</div> | |||
<div class="tips"> | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
在线用户人数 : @ViewBag.OnlineUserNum 人 <br />北京金隅科技学校 <span></span> 数字化智慧校园 版权所有 <span></span> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips1.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter">在线用户人数 : @ViewBag.OnlineUserNum 人 <br />北京金隅科技学校 <span></span> 数字化智慧校园 版权所有 <span></span> </div> | |||
@@ -0,0 +1,202 @@ | |||
/*! | |||
* 版 本 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) { | |||
$(".codeInput").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 ($("#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/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) { | |||
$(".codeInput").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) |
@@ -0,0 +1,159 @@ | |||
<!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" /> | |||
<link rel="shortcut icon" href="~/Content/images/LoginPage/dzlogo.ico" /> | |||
<title>数字化智慧校园</title> | |||
<meta name="keywords" content="登陆页面" /> | |||
<meta name="description" content="登陆页面" /> | |||
<link href="~/Content/css/LoginModel/common.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/index.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body id="" class="" style=""> | |||
<div class="loginBox"> | |||
<div class="loginCon"> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="loginR" style=""> | |||
<div class="loginLogo"> | |||
<img src="~/Content/images/LoginPage/xxlogo.png" alt="" /> | |||
</div> | |||
<form id="loginForm" role="form" action="/a/login" method="post" novalidate="novalidate"> | |||
@{ | |||
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" /> | |||
<div class="error_info" hidden="hidden">* <span>密码不正确</span></div> | |||
<div class="loginInput"> | |||
<input type="text" placeholder="用户名" id="lr_username" name="username" class="form-control required" aria-required="true" /> | |||
<img src="~/Content/images/LoginPage/person.png" alt="" /> | |||
</div> | |||
<div class="loginInput"> | |||
<input type="password" placeholder="密码" id="lr_password" name="password" class="form-control required" aria-required="true" /> | |||
<img src="~/Content/images/LoginPage/key.png" alt="" /> | |||
</div> | |||
<div class="loginInput codeInput" 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/LoginPage/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 loginBtn2"> | |||
<input type="button" onclick="javascript:location.href = 'Index'" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="返回登录" style="cursor: pointer" /> | |||
</div> | |||
</form> | |||
<div class="qrCodeBox"> | |||
<div id="qrCode"></div> | |||
<div>@ViewBag.QRCodeText</div> | |||
</div> | |||
</div> | |||
<div class="loginL"> | |||
<img src="~/Content/images/LoginPage/zuo.png" alt="" /> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
在线用户人数 : @ViewBag.OnlineUserNum 人 <br />北京金隅科技学校 <span></span> 数字化智慧校园 版权所有 <span></span> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips1.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</body> | |||
<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> | |||
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') | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginType').show(); | |||
} else { | |||
$('.loginType').hide(); | |||
} | |||
$('.loginBox').on('click','.loginType',function () { | |||
var flag = $(this).hasClass('active'); | |||
if (flag) { | |||
$(this).removeClass('active').find('img').attr('src', '/Content/images/LoginPage/iphoneLogin.png'); | |||
qrCodeBox.css('display', 'none'); | |||
loginForm.stop().fadeIn(); | |||
} else { | |||
$(this).addClass('active').find('img').attr('src', '/Content/images/LoginPage/login5.png'); | |||
loginForm.css('display', 'none'); | |||
qrCodeBox.stop().fadeIn(); | |||
} | |||
}) | |||
function makeCode(urls) { | |||
qrcode.makeCode(urls); | |||
} | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/PageFive/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</html> |
@@ -87,6 +87,12 @@ | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips4.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
</div> | |||
</div> | |||
<div class="loginFooter">在线用户人数 : @ViewBag.OnlineUserNum 人 <br /> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
@@ -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) { | |||
$(".codeInput").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 ($("#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/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) { | |||
$(".codeInput").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', '#5D5AE0'); | |||
} | |||
}, | |||
tip: function (msg) { | |||
var $tip = $('.error_info'); | |||
$tip.hide(); | |||
if (!!msg) { | |||
$tip.find('span').html(msg); | |||
$tip.show(); | |||
} | |||
} | |||
}; | |||
$(function () { | |||
lrPage.init(); | |||
}); | |||
})(window.jQuery) |
@@ -0,0 +1,155 @@ | |||
<!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/common.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/login5.css" rel="stylesheet" /> | |||
<link href="~/Content/css/process.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body id="" class="" style=""> | |||
<div class="loginBox"> | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;">@ViewBag.VersionNum</div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="login commonClear"> | |||
<div class="loginCon"> | |||
<form id="loginForm" role="form" action="/a/login" method="post" novalidate="novalidate"> | |||
@{ | |||
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" /> | |||
<div class="error_info" hidden="hidden">* <span>密码不正确</span></div> | |||
<div class="loginInput"> | |||
<div class="loginInputTxt">用户名</div> | |||
<input type="text" placeholder="用户名" id="lr_username" name="username" class="form-control required" /> | |||
</div> | |||
<div class="loginInput"> | |||
<div class="loginInputTxt">用户名</div> | |||
<input type="password" placeholder="密码" id="lr_password" name="password" class="form-control required" /> | |||
</div> | |||
<div class="loginInput codeInput" hidden="hidden"> | |||
<div class="loginInputTxt">验证码</div> | |||
<div class="codeBox"> | |||
<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> | |||
</div> | |||
</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 loginBtn2"> | |||
<input type="button" onclick="javascript:location.href = 'Index'" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="返回登录" style="cursor: pointer" /> | |||
</div> | |||
</form> | |||
<div class="qrCodeBox"> | |||
<div class="loginTitle">@ViewBag.QRCodeText</div> | |||
<div id="qrCode"></div> | |||
</div> | |||
</div> | |||
<div class="tips" style="left: 32px;"> | |||
<img src="~/Content/images/LoginPage/tips4.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter">在线用户人数 : @ViewBag.OnlineUserNum 人 <br /> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
</body> | |||
<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> | |||
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') | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginType').show(); | |||
@*alert("@ViewBag.Title"); | |||
//$('.lCodeTxt').html("@ViewBag.Title");*@ | |||
} else { | |||
$('.loginType').hide(); | |||
} | |||
$('.loginTab > div').click(function () { | |||
var ind = $(this).index(); | |||
$(this).addClass('active').siblings().removeClass('active'); | |||
if (ind == 0) { | |||
qrCodeBox.css('display', 'none'); | |||
loginForm.stop().fadeIn(); | |||
} else { | |||
loginForm.css('display', 'none'); | |||
qrCodeBox.stop().fadeIn(); | |||
} | |||
}) | |||
function makeCode(urls) { | |||
qrcode.makeCode(urls); | |||
} | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/PageFour/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</html> |
@@ -62,12 +62,20 @@ | |||
<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> | |||
@if (ViewBag.TeachSwitch) | |||
{ | |||
<div class="bbh"> | |||
<div class="bbh"> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
@if (ViewBag.TeachSwitch) | |||
{ | |||
<a href="/EducationalAdministration/EmpInfoEnternal/FormAdd"><span class="bbh_span1">教师注册</span><img src="~/Content/images/LoginPage/pen.png" alt="" /></a> | |||
</div> | |||
} | |||
} | |||
</div> | |||
</form> | |||
<div class="qrCodeBox"> | |||
<div id="qrCode"></div> | |||
@@ -0,0 +1,202 @@ | |||
/*! | |||
* 版 本 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 () { | |||
$("#lr_verifycode_input").val(''); | |||
$("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random()); | |||
}); | |||
var errornum = $('#errornum').val(); | |||
if (errornum >= 3) { | |||
$(".codeInput").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) { | |||
$('#lr_verifycode_input').parent().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', '#268fe2'); | |||
} | |||
}, | |||
tip: function (msg) { | |||
var $tip = $('.error_info'); | |||
$tip.hide(); | |||
if (!!msg) { | |||
$tip.find('span').html(msg); | |||
$tip.show(); | |||
} | |||
} | |||
}; | |||
$(function () { | |||
lrPage.init(); | |||
}); | |||
})(window.jQuery) |
@@ -0,0 +1,155 @@ | |||
<!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/common.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/login2.css" rel="stylesheet" /> | |||
<link href="~/Content/css/process.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body id="" class="" style=""> | |||
<div class="loginBox commonClear"> | |||
<div class="loginL"> | |||
<div class="loginLimg"> | |||
<img src="@ViewBag.LoGo" /> | |||
</div> | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="loginR"> | |||
<form id="loginForm" role="form" action="/a/login" method="post" novalidate="novalidate"> | |||
@{ | |||
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" /> | |||
<div class="loginInput"> | |||
<input type="text" placeholder="用户名" id="lr_username" name="username" class="form-control required" /> | |||
<img src="~/Content/images/LoginPage/person2.png" alt="" /> | |||
</div> | |||
<div class="loginInput"> | |||
<input type="password" placeholder="密码" id="lr_password" name="password" class="form-control required" /> | |||
<img src="~/Content/images/LoginPage/lock.png" alt="" /> | |||
</div> | |||
<div class="loginInput codeInput" hidden="hidden"> | |||
<input type="code" placeholder="验证码" id="lr_verifycode_input" 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/LoginPage/variCode.png" alt="">*@ | |||
</div> | |||
<div class="error_info" hidden="hidden">* <span>密码不正确</span></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 loginBtn2"> | |||
<input type="button" onclick="javascript:location.href = 'Index'" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="返回登录" style="cursor: pointer" /> | |||
</div> | |||
</form> | |||
<div class="qrCodeBox"> | |||
<div id="qrCode"></div> | |||
<div>@ViewBag.QRCodeText</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips3.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
在线用户人数 : @ViewBag.OnlineUserNum 人 <br /> Copyright © 2019 数字化智慧校园 版权所有 | |||
</div> | |||
</body> | |||
<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> | |||
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') | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginType').show(); | |||
@*alert("@ViewBag.Title"); | |||
//$('.lCodeTxt').html("@ViewBag.Title");*@ | |||
} else { | |||
$('.loginType').hide(); | |||
} | |||
$('.loginType').click(function () { | |||
var flag = $(this).hasClass('active'); | |||
if (flag) { | |||
$(this).removeClass('active').find('img').attr('src', '/Content/images/LoginPage/iphoneLogin.png'); | |||
qrCodeBox.css('display', 'none'); | |||
loginForm.stop().fadeIn(); | |||
} else { | |||
$(this).addClass('active').find('img').attr('src', '/Content/images/LoginPage/login5.png'); | |||
loginForm.css('display', 'none'); | |||
qrCodeBox.stop().fadeIn(); | |||
} | |||
}) | |||
function makeCode(urls) { | |||
qrcode.makeCode(urls); | |||
} | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/PageOne/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</html> |
@@ -84,6 +84,12 @@ | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage//tips5.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
@@ -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) |
@@ -0,0 +1,154 @@ | |||
<!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" /> | |||
<link rel="shortcut icon" href="images/dzlogo.ico" /> | |||
<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/login8.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body> | |||
<div class="loginBox"> | |||
<div class="logo_box"> | |||
<img src="~/Content/images/Login/logo8.png" /> | |||
</div> | |||
<div class="login_box commonClear"> | |||
<div class="loginCon"> | |||
<div class="loginT"> | |||
<div><span></span> 欢迎登录</div> | |||
<div>智慧校园管理平台</div> | |||
</div> | |||
@{ | |||
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">* <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/login8-6.png" alt="" /> | |||
</div> | |||
<div class="loginInput"> | |||
<input type="password" placeholder="请输入登录密码" id="lr_password" name="password" class="form-control required" /> | |||
<img src="~/Content/images/Login/login8-7.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 src="~/Content/images/Login/verCode.png" alt="" /></div>*@ | |||
<div class="variCode"><img class="code" id="lr_verifycode_img" src="~/Login/VerifyCode" alt="点击切换验证码" title="点击切换验证码" /></div> | |||
<img src="~/Content/images/Login/login8-8.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 class="tips"> | |||
<img src="~/Content/images/LoginPage//tips5.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
<div> | |||
版本号 : @if (ViewBag.Version) | |||
{ | |||
@ViewBag.errornum | |||
} 在线用户人数 : @ViewBag.OnlineUserNum 人 | |||
</div> | |||
<div>北京金隅科技学校 智慧校园 版权所有</div> | |||
<!--京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> | |||
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/PageSix/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</body> | |||
</html> |
@@ -76,7 +76,7 @@ | |||
<div class="qrCodeBox"> | |||
<div id="qrCode"></div> | |||
</div> | |||
<div style="text-align: right"> | |||
<div style="text-align: right;margin-top: 10px;"> | |||
@if (ViewBag.SSOSystemSwitch) | |||
{ | |||
<a href="/SSOSystem/Index" class="down">网上办事大厅</a> | |||
@@ -92,6 +92,12 @@ | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips3.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
</div> | |||
</div> | |||
@@ -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) { | |||
$(".codeInput").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 ($("#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/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) { | |||
$(".codeInput").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', '#C02222'); | |||
} | |||
}, | |||
tip: function (msg) { | |||
var $tip = $('.error_info'); | |||
$tip.hide(); | |||
if (!!msg) { | |||
$tip.find('span').html(msg); | |||
$tip.show(); | |||
} | |||
} | |||
}; | |||
$(function () { | |||
lrPage.init(); | |||
}); | |||
})(window.jQuery) |
@@ -0,0 +1,156 @@ | |||
<!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/common.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/login4.css" rel="stylesheet" /> | |||
<link href="~/Content/css/process.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body id="" class="" style=""> | |||
<div class="loginBox"> | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;"><i>@ViewBag.VersionNum</i></div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="login commonClear"> | |||
<div class="loginL"> | |||
<img src="~/Content/images/LoginPage/login4-1.jpg" alt="" /> | |||
</div> | |||
<div class="loginR"> | |||
<div class="loginRBox"> | |||
@{ | |||
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" /> | |||
<form id="loginForm" role="form" action="/a/login" method="post" novalidate="novalidate"> | |||
<div class="error_info" hidden="hidden">* <span>密码不正确</span></div> | |||
<div class="loginInput"> | |||
<div class="loginInputTxt">用户名</div> | |||
<input type="text" placeholder="用户名" id="lr_username" name="username" class="form-control required" /> | |||
</div> | |||
<div class="loginInput"> | |||
<div class="loginInputTxt">用户名</div> | |||
<input type="password" placeholder="密码" id="lr_password" name="password" class="form-control required" /> | |||
</div> | |||
<div class="loginInput codeInput" hidden="hidden"> | |||
<div class="loginInputTxt">验证码</div> | |||
<div class="codeBox"> | |||
<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> | |||
</div> | |||
</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 loginBtn2"> | |||
<input type="button" onclick="javascript:location.href = 'Index'" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="返回登录" style="cursor: pointer" /> | |||
</div> | |||
</form> | |||
</div> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips3.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter">在线用户人数 : @ViewBag.OnlineUserNum 人 <br /> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
</body> | |||
<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> | |||
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') | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginType').show(); | |||
@*alert("@ViewBag.Title"); | |||
//$('.lCodeTxt').html("@ViewBag.Title");*@ | |||
} else { | |||
$('.loginType').hide(); | |||
} | |||
$('.loginTab > div').click(function () { | |||
var ind = $(this).index(); | |||
$(this).addClass('active').siblings().removeClass('active'); | |||
if (ind == 0) { | |||
qrCodeBox.css('display', 'none'); | |||
loginForm.stop().fadeIn(); | |||
} else { | |||
loginForm.css('display', 'none'); | |||
qrCodeBox.stop().fadeIn(); | |||
} | |||
}) | |||
function makeCode(urls) { | |||
qrcode.makeCode(urls); | |||
} | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/PageThree/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</html> |
@@ -64,6 +64,12 @@ | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips2.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
@if (ViewBag.WeixinLoginSwitch) | |||
{ | |||
<a href="LoginForWeixin?login=one" class="wxLogin" title="使用微信登录"> | |||
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录 | |||
</a> | |||
} | |||
<div style="text-align: right"> | |||
@if (ViewBag.SSOSystemSwitch) | |||
{ | |||
@@ -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) { | |||
$(".codeInput").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 ($("#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/CheckLoginBind", | |||
headers: { __RequestVerificationToken: $.lrToken }, | |||
data: { username: username, pwd: password, WeixinOpenId: WeixinOpenId, up: up }, | |||
type: "post", | |||
dataType: "json", | |||
success: function (res) { | |||
if (res.code == 200) { | |||
lrPage.logining(false); | |||
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) { | |||
$('#verifycode').parent().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', '#268fe2'); | |||
} | |||
}, | |||
tip: function (msg) { | |||
var $tip = $('.error_info'); | |||
$tip.hide(); | |||
if (!!msg) { | |||
$tip.find('span').html(msg); | |||
$tip.show(); | |||
} | |||
} | |||
}; | |||
$(function () { | |||
lrPage.init(); | |||
}); | |||
})(window.jQuery) |
@@ -0,0 +1,154 @@ | |||
<!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/common.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/loginPublic.css" rel="stylesheet" /> | |||
<link href="~/Content/css/LoginModel/login3.css" rel="stylesheet" /> | |||
<link href="~/Content/css/process.css" rel="stylesheet" /> | |||
<!--自适应--> | |||
<!--自适应--> | |||
</head> | |||
<body id="" class="" style=""> | |||
<div class="loginBox commonClear"> | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;">@ViewBag.VersionNum</div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="commonClear"> | |||
<div class="login" style="height: 440px;"> | |||
<form id="loginForm" role="form" action="/a/login" method="post" novalidate="novalidate"> | |||
@{ | |||
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" /> | |||
<div class="error_info" hidden="hidden">* <span>密码不正确</span></div> | |||
<div class="loginInput"> | |||
<input type="text" placeholder="用户名" id="lr_username" name="username" class="form-control required" /> | |||
</div> | |||
<div class="loginInput"> | |||
<input type="password" placeholder="密码" id="lr_password" name="password" class="form-control required" /> | |||
</div> | |||
<div class="loginInput codeInput" 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> | |||
</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 loginBtn2"> | |||
<input type="button" onclick="javascript:location.href = 'Index'" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="返回登录" style="cursor: pointer" /> | |||
</div> | |||
</form> | |||
<div class="qrCodeBox"> | |||
<div class="loginTitle">@ViewBag.QRCodeText</div> | |||
<div id="qrCode"></div> | |||
</div> | |||
<div class="tips"> | |||
<img src="~/Content/images/LoginPage/tips2.png" alt="" /> <span>建议使用360或谷歌浏览器</span> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="loginFooter">在线用户人数 : @ViewBag.OnlineUserNum 人 <br /> Copyright © 2019 数字化智慧校园 版权所有</div> | |||
</body> | |||
<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> | |||
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') | |||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | |||
if ("@ViewBag.HasQRCode" == "True") { | |||
$('.loginType').show(); | |||
@*alert("@ViewBag.Title"); | |||
//$('.lCodeTxt').html("@ViewBag.Title");*@ | |||
} else { | |||
$('.loginType').hide(); | |||
} | |||
$('.loginType').click(function () { | |||
var flag = $(this).hasClass('active'); | |||
if (flag) { | |||
$(this).removeClass('active').find('img').attr('src', '/Content/images/LoginPage/iphoneLogin3.png'); | |||
qrCodeBox.css('display', 'none'); | |||
loginForm.stop().fadeIn(); | |||
} else { | |||
$(this).addClass('active').find('img').attr('src', '/Content/images/LoginPage/pcLogin3.png'); | |||
loginForm.css('display', 'none'); | |||
qrCodeBox.stop().fadeIn(); | |||
} | |||
}) | |||
function makeCode(urls) { | |||
qrcode.makeCode(urls); | |||
} | |||
</script> | |||
@Html.AppendJsFile("/Views/Login/PageTwo/IndexWxLogin.js") | |||
@Html.AppendJsFile("/Views/Login/ACLogon.js") | |||
<script> | |||
//点击版本号,显示版本号历史进程 | |||
$('.loginEdition').click(function () { | |||
var html = '<div class="process"><div class="proTitle">历史进程</div><div class="pro_sec1">'; | |||
$.each(@(new HtmlString(ViewBag.VersionList)), function (i, item) { | |||
var index = i % 2 == 0 ? 1 : 2; | |||
html += '<div class="proBox proBox'+index+'">' + item.Content + '<div class="edition">' + item.VersionNum + '</div><div class="time">' + item.UpdateTime.slice(0,item.UpdateTime.indexOf("T"))+'</div></div>' ; | |||
}); | |||
html += '</div></div>'; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
title: "版本号", | |||
area: ['888px', '60%'], | |||
content: html | |||
}) | |||
}); | |||
</script> | |||
</html> |
@@ -11,25 +11,25 @@ | |||
@{ | |||
if (!string.IsNullOrEmpty(ViewBag.QQOpenId)) | |||
{ | |||
<h3> <img src="/Content/web/images/qq.png" alt=""/> 快捷登录帐号绑定</h3> | |||
<h3> <img src="/Content/web/images/qq.png" alt="" /> 快捷登录帐号绑定</h3> | |||
} | |||
else | |||
{ | |||
<h3> <img src="/Content/web/images/weixin.png" alt="" /> 快捷登录帐号绑定</h3> | |||
} | |||
} | |||
<input type="hidden" name="QQOpenId" id="QQOpenId" value="@ViewBag.QQOpenId"/> | |||
<input type="hidden" name="WeixinOpenId" id="WeixinOpenId" value="@ViewBag.WeixinOpenId"/> | |||
<input type="hidden" name="QQOpenId" id="QQOpenId" value="@ViewBag.QQOpenId" /> | |||
<input type="hidden" name="WeixinOpenId" id="WeixinOpenId" value="@ViewBag.WeixinOpenId" /> | |||
<div class="reg_input"> | |||
<img src="/Content/web/images/phone.png" alt=""/> | |||
<input type="text" id="mobile" name="mobile" maxlength="11" placeholder="请输入您的手机号码"/> | |||
<img src="/Content/web/images/phone.png" alt="" /> | |||
<input type="text" id="mobile" name="mobile" maxlength="11" placeholder="请输入您的手机号码" /> | |||
</div> | |||
<div class="reg_input"> | |||
<img src="/Content/web/images/unlock.png" alt=""/> | |||
<input type="password" id="pass" name="pass" placeholder="请输入您的密码"/> | |||
<img src="/Content/web/images/unlock.png" alt="" /> | |||
<input type="password" id="pass" name="pass" placeholder="请输入您的密码" /> | |||
</div> | |||
<div class="reg_input reg_input1"> | |||
<input type="text" placeholder="输入验证码" id="mcode" Name="mcode" maxlength="6"/> | |||
<input type="text" placeholder="输入验证码" id="mcode" Name="mcode" maxlength="6" /> | |||
<button id="btngcode" class="duanxin" onclick="return false;">获取短信验证码</button> | |||
</div> | |||
<div class="reg_btn" id="regbtn"> | |||
@@ -43,5 +43,6 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<link href="~/Content/dist/jquery.validator.css" rel="stylesheet" /> | |||
<script src="~/Content/dist/jquery.validator.js?local=zh-CN"></script> | |||
<link href="~/Content/paper/dist/jquery.validator.css" rel="stylesheet" /> | |||
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> | |||
<script src="~/Content/paper/dist/jquery.validator.js?local=zh-CN"></script> |