diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/login9.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/login9.css new file mode 100644 index 000000000..1ce0efe5f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/login9.css @@ -0,0 +1,304 @@ +* { + box-sizing: border-box; +} + +.commonClear:after, +.commonClear:before { + content: ''; + display: block; + width: 100%; + clear: both; +} + +.login_box { + width: 84%; + min-width: 1100px; + margin: 0 auto; + position: relative; +} + +.loginHead { + line-height: 0; + padding: 30px 0; + position: relative; +} + +.loginHead img { + width: 48%; +} +.login_span{ + color: #a0a0a0; + font-size: 12px; + position: absolute; + left: 49%; + bottom: 43%; +} +.loginBox { + padding: 140px 0 0 0; + background-image: url(../../images/Login/loginBg9.jpg); + background-size: 100% 100%; + -moz-background-size: 100% 100%; + -webkit-background-size: 100% 100%; + -o-background-size: 100% 100%; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../images/Login/loginBg6.jpg', sizingMethod='scale'); + min-height: 444px; +} + +.loginCon { + float: right; + margin-right: 9%; + width: 320px; + background-color: #FBFCFC; +} + +.loginInput { + height: 38px; + position: relative; + margin-top: 25px; +} + +.loginInput img { + position: absolute; + top: 0; + bottom: 0; + left: 12px; + margin: auto; + height: 20px; +} + +.loginInput input { + padding: 5px 10px 5px 40px; + height: 100%; + width: 100%; + font-size: 14px; + color: #1a1a1a; + line-height: 28px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0); + border: 1px solid #EDEDEC; + /*border-radius: 3px;*/ + transition: border-color 0.3s; + -moz-transition: border-color 0.3s; + -ms-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; +} + +.loginInput input:focus { + /*background: transparent;*/ + border-color: #64B2F4; + box-shadow: 0 0 0 2px rgba(255, 255, 255, 0); +} + +.loginTabCon { + display: none; +} + +.loginTabCon:first-child { + display: block; +} + +.loginBtn { + background: #0094de; + overflow: hidden; + height: 38px; + line-height: 38px; + border-radius: 5px; + color: #fff; + margin-top: 35px; +} +.loginBtn_box{ + margin-top: 15px; + height: 26px; +} +.bbh_bs{ + border:1px solid #0073cc; + color: #0073cc; + font-size: 12px; + border-radius: 20px; + padding: 1px 8px ; + float: left; +} +.bbh_sdow{ + float: right; +} +.bbh_sdow img{ + width: 10px; + height: 10px; +} +.loginBtn input { + width: 100%; + height: 100%; + cursor: pointer; + border-radius: 5px; + background: #0073cc; + font-size: 16px; + color: #fff; + line-height: 28px; + border: 1px solid #0073cc; + box-shadow: 0 0 0 2px rgba(255, 255, 255, 0) inset !important; +} +.loginBtn2{ + margin-top:20px; +} +.loginBtn2 input{ + background: #fff; + color: #0073cc; +} +.bbh { + margin-top: 10px; + font-size: 12px; +} +.bbh img{ + width: 20px; + height: 20px; + float: left; + margin-right: 5px; +} +.bbh_span1 { + color: #0094de; + padding-top: 8px; +} + + +.bbh_span2 { + float: right; + /* color: #a0a0a0; */ + color: #0094de; +} + +.loginTab>li { + cursor: pointer; + width: 50%; + float: left; + text-align: center; + line-height: 48px; + height: 48px; + font-size: 16px; + color: #666666; + background-color: #DEE9F3; +} + +.loginTab .active { + background-color: #1189C9; + color: #fff; +} + +.loginTabBox { + margin: 30px 30px; + /*height: 264px;*/ +} + +#code { + width: 128px; +} + +.variCode { + position: absolute; + right: 0; + top: 1px; + bottom: 1px; + width: 90px; + line-height: 0; +} + +.variCode img { + width: 100%; + height: 100%; + left: 0; +} + +#qrCode { + margin: 30px auto 10px; + width: 200px; +} + +.qrCodeTxt { + text-align: center; + margin: 20px 0 30px; + +} + +.loginFooter { + height: 60px; + text-align: center; + line-height: 60px; + font-size: 12px; + color: #777777; +} + +@media(max-width:1600px) { + .loginHead { + padding: 20px 0; + } + + .loginHead img { + width: 28%; + } + .login_span{ + left: 29%; + } + + .loginInput { + margin-top: 20px; + } + + .loginBtn { + margin-top: 25px; + } + + .loginTabBox { + height: 274px; + } + + .loginCon { + width: 300px; + } +} + + +@media(max-width:1366px) { + .loginTab>li { + line-height: 40px; + height: 40px; + } + + .loginInput { + margin-top: 15px; + } + + .loginInput input { + line-height: 24px; + } + + .loginInput { + height: 34px; + } + + .loginTabBox { + margin: 20px 20px; + height: 264px; + } + + .loginCon { + width: 260px; + } + + .loginFooter { + height: 40px; + line-height: 40px; + } + + .loginHead { + padding: 15px 0; + } + + .loginHead img { + width: 25%; + } + + .login_span{ + left: 26%; + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/key.png b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/key.png new file mode 100644 index 000000000..fcd23d521 Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/key.png differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/loginBg9.jpg b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/loginBg9.jpg new file mode 100644 index 000000000..29ae5ca55 Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/loginBg9.jpg differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/logo9.png b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/logo9.png new file mode 100644 index 000000000..f97bbc4c0 Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/logo9.png differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/person.png b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/person.png new file mode 100644 index 000000000..2dd80af6e Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/person.png differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/variCode.png b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/variCode.png new file mode 100644 index 000000000..6a4b0059b Binary files /dev/null and b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/Login/variCode.png differ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 83b4c5338..07892e244 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1423,6 +1423,7 @@ + @@ -1986,6 +1987,7 @@ + @@ -1995,12 +1997,16 @@ + + + + @@ -3983,6 +3989,8 @@ + + @@ -7235,6 +7243,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml new file mode 100644 index 000000000..36198b579 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml @@ -0,0 +1,147 @@ + + + + + + + + + + 数字化智慧校园 + + + + + + + + + + + + +
+ +
+
+ +
+
+ 数字化智慧校园 版权所有 + +
+ + + + + + @Html.AppendJsFile("/Views/Login/PageSeven/Index.js") + @Html.AppendJsFile("/Views/Login/ACLogon.js") + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js new file mode 100644 index 000000000..feb2330c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js @@ -0,0 +1,215 @@ +/*! + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.03.08 + * 描 述:登录页面前端脚本 + */ +(function ($) { + "use strict"; + var source = request('source'); + var keyValue = request('keyValue'); + var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录 + var bindUserName = request('bindUserName');//绑定账号 + var bindUserPassword = request('bindUserPassword');//绑定账号密码 + var lrPage = { + init: function () { + //切换账号登录时:登录页赋值,触发登录事件; + if (isBindAccountLogin == 1) { + $("#lr_username").val(bindUserName); + $("#lr_password").val(bindUserPassword); + lrPage.login(); + } + + $('#psw_change').css({ + 'background': 'url(' + $.rootUrl + '/Content/images/Login/psw0.png) no-repeat center center' + }); + + var error = request('error'); + if (error == "ip") { + lrPage.tip("登录IP限制"); + } + else if (error == "time") { + lrPage.tip("登录时间限制"); + } + + if (!keyValue) { + + if (window.location.href != top.window.location.href) { + top.window.location.href = window.location.href; + } + } + var isIE = !!window.ActiveXObject; + var isIE6 = isIE && !window.XMLHttpRequest; + if (isIE6) { + window.location.href = $.rootUrl + "/Error/ErrorBrowser"; + } + lrPage.bind(); + }, + bind: function () { + // 回车键 + document.onkeydown = function (e) { + e = e || window.event; + if ((e.keyCode || e.which) == 13) { + $('#lr_login_btn').trigger('click'); + } + } + //输入框获取焦点 + $('.lr-login-input input').on('focus', function () { + var src = $(this).prev().attr('src'); + $(this).prev().attr('src', src.replace(/0.png$/, '1.png')); + }).on('blur', function () { + var src = $(this).prev().attr('src'); + $(this).prev().attr('src', src.replace(/1.png$/, '0.png')); + }); + + // 点击切换验证码 + $("#lr_verifycode_img").click(function () { + $("#verifycode").val(''); + $("#lr_verifycode_img").attr("src", $.rootUrl + "/Login/VerifyCode?time=" + Math.random()); + }); + var errornum = $('#errornum').val(); + if (errornum >= 3) { + + $(".loginInputCode").show(); + $("#lr_verifycode_img").trigger('click'); + } + + //点击密码icon 显示/隐藏 + $('#psw_change').click(function (event) { + var event = event || window.event; + event.stopPropagation(); + var $this = $(this); + $this.toggleClass('psw_show'); + //如果当前隐藏 变显示 + if ($this.hasClass('psw_show')) { + $this.css({ + 'background': 'url(' + $.rootUrl + '/Content/images/Login/psw1.png) no-repeat center center' + }); + $this.prev().attr('type', 'text'); + } else { + $this.css( + 'background', 'url(/Content/images/Login/psw0.png) no-repeat center center' + ); + $this.prev().attr('type', 'password'); + } + }); + + //登录方式点击 + $('.lr-login-toCode').click(function () { + var _this = $(this); + if (_this.attr('login-access') == 'psw') { + $('.lr-login-bycode').show(); + $('.lr-login-bypsw').hide(); + + } else { + $('.lr-login-bypsw').show(); + $('.lr-login-bycode').hide(); + + } + }) + + // 登录按钮事件 + $("#lr_login_btn").on('click', function () { + lrPage.login(); + }); + //java的统一身份认证 + var javaName = request("u"); + if (javaName) { + $("#lr_username").val(javaName); + $("#lr_password").val('123456'); + lrPage.login(); + } + }, + login: function () { + lrPage.tip(); + + var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#verifycode"); + var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val()); + + if (username == "") { + lrPage.tip('请输入账户'); + $username.focus(); + return false; + } + if (password == "") { + lrPage.tip('请输入密码'); + $password.focus(); + return false; + } + + if ($("#verifycode").is(":visible") && verifycode == "") { + lrPage.tip('请输入验证码'); + $verifycode.focus(); + return false; + } + if (ACIp != null && ACIp != "") { + //Ip上网 + sendToAc(ACIp, 'logon', Ip, username, ''); + } + if (ACIp2 != null && ACIp2 != "") { + //Ip上网 + sendToAc(ACIp2, 'logon', Ip, username, ''); + } + password = $.md5(password); + lrPage.logining(true); + $.ajax({ + url: $.rootUrl + "/Login/CheckLogin", + headers: { __RequestVerificationToken: $.lrToken }, + data: { username: username, password: password, verifycode: verifycode }, + type: "post", + dataType: "json", + success: function (res) { + if (res.code == 200) { + if (source == "noLogin") { + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index"; + } else if (source == "DragNoLogin") { + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; + } else { + + window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index"; + } + } + else if (res.code == 400) { + lrPage.logining(false); + lrPage.tip(res.info, true); + $('#errornum').val(res.data); + if (res.data >= 3) { + $(".loginInputCode").show(); + $("#lr_verifycode_img").trigger('click'); + } + } + else if (res.code == 500) { + lrPage.logining(false); + lrPage.tip('服务端异常,请联系管理员', true); + } + } + }); + }, + logining: function (isShow) { + if (isShow) { + $('input').attr('disabled', 'disabled'); + $("#lr_login_btn").addClass('active').attr('disabled', 'disabled').find('span').hide(); + $("#lr_login_btn").css('background', '#eeecec url(/Content/images/Login/loading.gif) no-repeat center 10px'); + + } + else { + $('input').removeAttr('disabled'); + $("#lr_login_btn").removeClass('active').removeAttr('disabled').find('span').show(); + $("#lr_login_btn").css('background', '#0094de'); + + } + }, + tip: function (msg) { + var $tip = $('.error_info'); + $tip.hide(); + if (!!msg) { + $tip.find('span').html(msg); + $tip.show(); + } + } + }; + $(function () { + lrPage.init(); + }); +})(window.jQuery) \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js new file mode 100644 index 000000000..691d69264 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js @@ -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) \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSevenWxLogin.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSevenWxLogin.cshtml new file mode 100644 index 000000000..345a71f36 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSevenWxLogin.cshtml @@ -0,0 +1,137 @@ + + + + + + + + + + 数字化智慧校园 + + + + + + + + + + + +
+ +
+
+ +
+
+ 数字化智慧校园 版权所有 + +
+ + + + + + @Html.AppendJsFile("/Views/Login/PageSeven/IndexWxLogin.js") + @Html.AppendJsFile("/Views/Login/ACLogon.js") + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml index 7eab133c8..3358d16f0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSixWxLogin.cshtml @@ -108,7 +108,7 @@ width: 200, height: 200 }); - makeCode('@ViewBag.QRCodeUrl') + makeCode('@ViewBag.QRCodeUrl'); $('.loginTab li').click(function() { var flag = $(this).hasClass('active'); if (!flag) { @@ -116,9 +116,9 @@ $(this).addClass('active').siblings().removeClass('active'); $('.loginTabCon').css('display', 'none').eq(ind).fadeIn(); } else { - return + return; } - }) + }); function makeCode(urls) { qrcode.makeCode(urls);