Browse Source

首次登录

西昌分支
yxq 4 months ago
parent
commit
4d415c1a72
3 changed files with 358 additions and 27 deletions
  1. +36
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml
  2. +76
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js
  3. +246
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/FirstLoginByMobile.cshtml

+ 36
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default.cshtml View File

@@ -79,6 +79,21 @@
color: #fff !important;
border: 1px solid #fff
}

.codeBtn {
border: 1px solid #DCDFE6;
padding: 6px 10px;
color: #606266;
font-size:12px;
cursor:pointer;
border-radius:2px;
position:absolute;
left:270px;
top:10px;
}
.codeBtn:hover {
border-color: #CBCFD5;
}
</style>
</head>

@@ -102,16 +117,16 @@
</a>
//首次登录-微信
@*<a href="/Login/FirstLoginForWeixin?login=one" class="down titleImg" title="新生首次登录">
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> 新生首次登录
</a>*@
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> 新生首次登录
</a>*@
//首次登录-手机号
<a href="/Login/FirstLoginByMobile" class="down titleImg" title="首次登录">
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> 首次登录
<a href="Javascript:void(0)" id="firstLogin" class="down titleImg" title="首次登录">
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> <span>首次登录</span>
</a>
}
<img src="~/Content/images/logins/login2.png" />
<!--登录框 正常登录-->
<div class="lr-login-main lr-login-normal">
<div class="lr-login-main lr-login-normal" id="loginBox">
<div class="loginImg" style="display:none;">
<img class="loginImg1" src="~/Content/images/logins/login3.png" alt="">
<img class="loginImg2" src="~/Content/images/logins/login5.png" alt="">
@@ -139,7 +154,7 @@

@if (ViewBag.TeachSwitch)
{
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;" href="/EducationalAdministration/EmpInfoEnternal/FormAdd">教师注册</a>
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;" href="/EducationalAdministration/EmpInfoEnternal/FormAdd">教师注册</a>
}
@if (ViewBag.Version)
{
@@ -154,8 +169,21 @@
</div>
<div class="lCodeTxt"></div>
</div>


</div>
<!--登录框 首次登录-->
<div class="lr-login-main lr-login-normal" id="firstLoginBox" style="display:none">
<!--密码登录-->
<div class="lr-login-bypsw">
<div class="error_info">*&nbsp;<span></span></div>
<div class="lr-login-input">
<img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="phone" type="text" placeholder="手机号">
</div>
<div class="lr-login-input">
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="verifycode" type="text" placeholder="验证码">
<span id="sendCode" class="codeBtn">发送验证码</span>
</div>
<div class="lr-login-btn" id="firstLogin_btn"><span>首次登录</span></div>
</div>
</div>
</div>



+ 76
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js View File

@@ -12,6 +12,7 @@
var isBindAccountLogin = request('isBindAccountLogin');//切换账号登录
var bindUserName = request('bindUserName');//绑定账号
var bindUserPassword = request('bindUserPassword');//绑定账号密码
var codeType = 'firstlogin'
var lrPage = {
init: function () {
//切换账号登录时:登录页赋值,触发登录事件;
@@ -101,11 +102,11 @@
var _this = $(this);
if (_this.attr('login-access') == 'psw') {
$('.lr-login-bycode').show();
$('.lr-login-bypsw').hide();
$('#loginBox .lr-login-bypsw').hide();

} else {
$('.lr-login-bypsw').show();
$('.lr-login-bycode').hide();
$('#loginBox .lr-login-bycode').hide();

}
})
@@ -114,6 +115,29 @@
$("#lr_login_btn").on('click', function () {
lrPage.login();
});

// 点击首次登录按钮
$('#firstLogin').click(function () {
if ($('#firstLoginBox').css('display') == 'none') {
$('#firstLoginBox').show()
$('#loginBox').hide()
$(this).find('span').text('常规登录')
} else {
$('#firstLoginBox').hide()
$('#loginBox').show()
$(this).find('span').text('首次登录')
}
})

// 首次登录按钮事件
$("#firstLogin_btn").on('click', function () {
lrPage.firstLogin();
});

// 发送验证码事件
$("#sendCode").on('click', function () {
lrPage.sendCode();
});
},
login: function () {
lrPage.tip();
@@ -190,25 +214,72 @@
},
logining: function (isShow) {
if (isShow) {
$('input').attr('disabled', 'disabled');
$('#loginBox 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');
$('#loginBox input').removeAttr('disabled');
$("#lr_login_btn").removeClass('active').removeAttr('disabled').find('span').show();
$("#lr_login_btn").css('background', '#268fe2');

}
},
firstLogining: function (isShow) {
if (isShow) {
$('#firstLoginBox input').attr('disabled', 'disabled');
$("#firstLogin_btn").addClass('active').attr('disabled', 'disabled').find('span').hide();
$("#firstLogin_btn").css('background', '#eeecec url(/Content/images/Login/loading.gif) no-repeat center 10px');

}
else {
$('#firstLoginBox input').removeAttr('disabled');
$("#firstLogin_btn").removeClass('active').removeAttr('disabled').find('span').show();
$("#firstLogin_btn").css('background', '#268fe2');
}
},
tip: function (msg) {
var $tip = $('.error_info');
var $tip = $('#loginBox .error_info');
$tip.hide();
if (!!msg) {
$tip.find('span').html(msg);
$tip.show();
}
},
sendCode: function () {
let phone = $('#phone').val()
if (!phone) {
$('#firstLoginBox .error_info span').text('请输入手机号')
$('#firstLoginBox .error_info').show()
return
} else if (!/^1[0-9]{10}$/.test(phone)) {
$('#firstLoginBox .error_info span').text('手机号格式不正确')
$('#firstLoginBox .error_info').show()
return
}
$('#firstLoginBox .error_info').hide()
lrPage.firstLogining(true);
$.ajax({
url: $.rootUrl + "/Login/Sendcode",
data: { phone, codeType },
dataType:'json',
type: "post",
success: function (res) {
lrPage.firstLogining(false);
if (res.code == 200) {
$('#firstLoginBox .error_info span').text('短信已发送')
$('#firstLoginBox .error_info').show()
}else {
$('#firstLoginBox .error_info span').text(res.info)
$('#firstLoginBox .error_info').show()
}
}
});
},
firstLogin: function () {
let username = $('#username').val()
let verifycode = $('#verifycode').val()
}
};
$(function () {


+ 246
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/FirstLoginByMobile.cshtml View File

@@ -1,18 +1,250 @@

@{
Layout = null;
}

<!DOCTYPE html>
<html>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>FirstLoginByMobile</title>
<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
}

.titleImg {
border: none !important;
}

.titleImg img {
width: 35px !important;
}

.wxLogin {
color: #53b947 !important;
}

.titleImg {
color: #da9835 !important;
}

.wxLogin img {
width: 35px !important;
top: -2px;
}

.downBox {
width: 100%;
height: 60px;
/*background: red;*/
position: absolute;
bottom: -40px;
right: 0 color:#fff !important;
}

.downBox a {
color: #fff !important;
border: 1px solid #fff
}
</style>
</head>

<body>
FirstLoginByMobile
</body>
</html>
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
@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">
@if (ViewBag.WeixinLoginSwitch)
{
<a href="/Login/LoginForWeixin?login=one" class="wxLogin down" title="使用微信登录">
<img src="~/Content/images/LoginPage/icon.png" alt="" /> 使用微信登录
</a>
//首次登录-微信
@*<a href="/Login/FirstLoginForWeixin?login=one" class="down titleImg" title="新生首次登录">
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> 新生首次登录
</a>*@
//首次登录-手机号
<a href="/Login/FirstLoginByMobile" class="down titleImg" title="首次登录">
<img src="~/Content/images/LoginPage/title.jpg" alt="" /> 首次登录
</a>
}
<img src="~/Content/images/logins/login2.png" />
<!--登录框 正常登录-->
<div class="lr-login-main lr-login-normal">
<div class="loginImg" style="display:none;">
<img class="loginImg1" src="~/Content/images/logins/login3.png" alt="">
<img class="loginImg2" src="~/Content/images/logins/login5.png" alt="">
</div>
<!--密码登录-->
<div class="lr-login-bypsw noreg">
<div class="error_info">*&nbsp;<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 class="lr-login-weixin" style="font-size: 12px;margin-top: 15px;text-align: right;padding-right: 71px;"><a href="https://open.weixin.qq.com/connect/qrconnect?appid=wxd75b6651c86f816b&redirect_uri=http%3a%2f%2fwww.learun.cn&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect">微信登录</a></div> -->
<div class="lr-login-version">
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;margin-right:20px;" href="/Login/ForgotPassword">忘记密码?</a>

@if (ViewBag.TeachSwitch)
{
<a style="float: left;font-family: PingFangSC-Regular;font-size: 12px;color: #3298DC;" href="/EducationalAdministration/EmpInfoEnternal/FormAdd">教师注册</a>
}
@if (ViewBag.Version)
{
<span class="versionBtn" style="cursor:pointer;">版本号:<span>@ViewBag.VersionNum</span></span>
}
</div>
</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>

</script>
<div class="downBox">

@if (ViewBag.FeixinSwitch)
{
<a href="/feixin.exe" class="down">
<img src="~/Content/images/LoginPage/download2.jpg" alt="" /> 飞星下载
</a>
}
@if (ViewBag.SSOSystemSwitch)
{
<a href="/SSOSystem/DragModelOne" class="down downsso">
<img src="~/Content/images/LoginPage/wq.jpg" alt="" />
网上办事大厅
</a>
}
</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/Index.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>

Loading…
Cancel
Save