Browse Source

新增怀来学校登录

怀来职教中心中职
liangkun 1 year ago
parent
commit
d3dbe06fb0
18 changed files with 915 additions and 4 deletions
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/element-ui.css
  2. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/bg.jpg
  3. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/dt.png
  4. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/password.png
  5. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/user.png
  6. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/ver.png
  7. BIN
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/vx.png
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/element-ui.js
  9. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/jquery.min.js
  10. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/vue.min.js
  11. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  12. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  13. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml
  14. +440
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml
  15. +234
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js
  16. +203
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/IndexWxLogin.js
  17. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config
  18. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/LoginModel/element-ui.css
File diff suppressed because it is too large
View File


BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/bg.jpg View File

Before After
Width: 2560  |  Height: 1153  |  Size: 3.0 MiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/dt.png View File

Before After
Width: 41  |  Height: 41  |  Size: 976 B

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/password.png View File

Before After
Width: 22  |  Height: 22  |  Size: 1.2 KiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/user.png View File

Before After
Width: 22  |  Height: 22  |  Size: 1.2 KiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/ver.png View File

Before After
Width: 22  |  Height: 22  |  Size: 1.1 KiB

BIN
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/images/LoginPage/loginseven/vx.png View File

Before After
Width: 41  |  Height: 41  |  Size: 1.7 KiB

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/element-ui.js
File diff suppressed because it is too large
View File


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/jquery.min.js
File diff suppressed because it is too large
View File


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/js/loginseven/vue.min.js
File diff suppressed because it is too large
View File


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs View File

@@ -456,6 +456,11 @@ namespace Learun.Application.Web.Controllers
{
return View();
}

public ActionResult PageSeven()
{
return View();
}
public ActionResult PageSixForgetPwd()
{
return View();


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1900,6 +1900,7 @@
<Content Include="Content\css\DragSSO\index3.css" />
<Content Include="Content\css\DragSSO\login5.css" />
<Content Include="Content\css\DragSSO\red.css" />
<Content Include="Content\css\LoginModel\element-ui.css" />
<Content Include="Content\css\LoginModel\login8.css" />
<Content Include="Content\css\OnlineRegistrate\Footer.html" />
<Content Include="Content\css\OnlineRegistrate\Header.html" />
@@ -2442,6 +2443,12 @@
<Content Include="Content\images\LoginPage\loginBg3.jpg" />
<Content Include="Content\images\LoginPage\loginBg4.jpg" />
<Content Include="Content\images\LoginPage\loginBg5.jpg" />
<Content Include="Content\images\LoginPage\loginseven\bg.jpg" />
<Content Include="Content\images\LoginPage\loginseven\dt.png" />
<Content Include="Content\images\LoginPage\loginseven\password.png" />
<Content Include="Content\images\LoginPage\loginseven\user.png" />
<Content Include="Content\images\LoginPage\loginseven\ver.png" />
<Content Include="Content\images\LoginPage\loginseven\vx.png" />
<Content Include="Content\images\LoginPage\logo_4_2.png" />
<Content Include="Content\images\LoginPage\logo_5_2.png" />
<Content Include="Content\images\LoginPage\logo_6_2.png" />
@@ -3516,6 +3523,9 @@
<Content Include="Content\js\jquery-ui.min.js" />
<Content Include="Content\js\jquery.js" />
<Content Include="Content\js\jquery.min.js" />
<Content Include="Content\js\loginseven\element-ui.js" />
<Content Include="Content\js\loginseven\jquery.min.js" />
<Content Include="Content\js\loginseven\vue.min.js" />
<Content Include="Content\js\mainTwo.js" />
<Content Include="Content\js\map.js" />
<Content Include="Content\js\mapJs\anhui.js" />
@@ -4517,6 +4527,8 @@
<Content Include="Views\Login\PageFive\IndexWxLogin.js" />
<Content Include="Views\Login\PageFour\IndexWxLogin.js" />
<Content Include="Views\Login\PageOne\IndexWxLogin.js" />
<Content Include="Views\Login\PageSeven\Index.js" />
<Content Include="Views\Login\PageSeven\IndexWxLogin.js" />
<Content Include="Views\Login\PageSix\IndexWxLogin.js" />
<Content Include="Views\Login\PageSix\Index.js" />
<Content Include="Views\Login\PageFive\Index.js" />
@@ -7094,6 +7106,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwoTran\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwoTran\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwoTran\Form.js" />
<Content Include="Views\Login\PageSeven.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml View File

@@ -1,5 +1,5 @@
@{
ViewBag.Title = "长阳职教中心数字化校园";
ViewBag.Title = "数字化智慧校园";
Layout = "~/Views/Shared/_Admin.cshtml";
}
@Html.AppendCssFile("/Views/Home/AdminDefault/index.css")


+ 440
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven.cshtml View File

@@ -0,0 +1,440 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>数字化智慧校园</title>
<link href="~/Content/css/LoginModel/element-ui.css" rel="stylesheet" />
<script src="~/Content/js/loginseven/vue.min.js"></script>
<script src="~/Content/js/loginseven/element-ui.js"></script>
<script src="~/Content/js/loginseven/jquery.min.js"></script>
<script src="~/Content/jquery/qrcode.min.js"></script>
<script src="~/Content/jquery/jquery.md5.min.js"></script>
</head>

<body>
<div id="app">
<header>
<div class="section header-content">
<img src="@ViewBag.LoGo" style="height: 60px;" />
</div>
</header>
<main>
<div class="loginBox">
<div class="login-tab">
<div :class="{active:active==1}" v-on:click="active = 1">PC端登录</div>
<div :class="{active:active==2}" v-on:click="active = 2">移动端登录</div>
</div>
<el-form v-show="active==1" ref="form" :model="form" :rules="rules">
<el-form-item prop="username">
<el-input v-model="form.username" placeholder="请输入用户名">
<template slot="prepend">
<img src="~/Content/images/LoginPage/loginseven/user.png" /> 用户名
</template>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="form.password" type="password">
<template slot="prepend">
<img src="~/Content/images/LoginPage/loginseven/password.png" /> 密 &nbsp; 码
</template>
</el-input>
</el-form-item>
<el-form-item prop="verifycode" v-if="verifyshow">
<el-input v-model="form.verifycode">
<template slot="prepend">
<img src="~/Content/images/LoginPage/loginseven/ver.png" /> 验证码
</template>
<template slot="append">
<img :src="verifyimgurl"
style="cursor: pointer;position: relative;top: 2px;" v-on:click="codeChange" />
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button :class="{'login-btn':true,isLogining:isLogining}" v-on:click="submit">
<span v-if="!isLogining">登 &nbsp;录&nbsp;</span>
<span v-else>正在登录...</span>
</el-button>
</el-form-item>
<el-form-item>
<div class="loginWay">
<a href="/Login/LoginForWeixin?login=one" class="left"><img src="~/Content/images/LoginPage/loginseven/vx.png" /> <span> &nbsp;使用微信登录</span></a>
<a href="/SSOSystem/DragModelOne" class="right"><img src="~/Content/images/LoginPage/loginseven/dt.png" /> <span> &nbsp;网上办事大厅</span></a>
</div>
<div class="loginBox-bottom">
<div>在线用户:<span class="value">@ViewBag.OnlineUserNum</span></div>
<div>版 本 号 :<span class="value">@ViewBag.VersionNum</span></div>
</div>
</el-form-item>
</el-form>
<div v-show="active==2">
<div id="qrcodediv" class="qrcode">
</div>
<p class="qrcodeDes">数字化校园移动端</p>
</div>
</div>
</main>
<footer>
<div class="section footer-content">Copyright © 2023 数字化智慧校园</div>
</footer>
</div>
@Html.AppendJsFile("/Views/Login/ACLogon.js")
<script>
// 提示
function showMessage(message, type = 0) {
let messageJQ = $("<div class='showMessage'>" + message + "</div>");
if (type == 0) {
messageJQ.addClass("showMessageError");
} else if (type == 1) {
messageJQ.addClass("showMessageSuccess");
}
// 先将原始隐藏,然后添加到页面,最后以400毫秒的速度下拉显示出来
messageJQ.hide().appendTo("body").slideDown(400);
// 4秒之后自动删除生成的元素
window.setTimeout(function () {
messageJQ.show().slideUp(400, function () {
messageJQ.remove();
});
}, 2500);
}
</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 source = request('source');
var keyValue = request('keyValue');
$(document).ready(function(){
var qrcode = new QRCode(document.getElementById("qrcodediv"), {
width : 260,
height: 260
});
qrcode.makeCode("@ViewBag.QRCodeUrl");
});

new Vue({
el: '#app',
data() {
return {
errornum:@ViewBag.errornum,
active: 1,
isLogining: true,
form: {
username: '',
password: '',
verifycode: ''
},
rules: {
username: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' }
],
verifycode: [
{ required: true, message: '请输入验证码', trigger: 'blur' }
]
},
verifyshow: false,
verifyimgurl: '/Login/VerifyCode'
}
},
mounted() {
this.init();
},
methods: {
init() {
this.isLogining = false;
if (this.errornum >= 3) {
this.verifyshow = true;
this.codeChange();
}
},
codeChange() {
this.verifyimgurl = "/Login/VerifyCode?time=" + Math.random();
},
submit() {
if (this.isLogining) return;
this.$refs['form'].validate(valid => {
if (!valid) {
return;
}
if (ACIp != null && ACIp != "") {
//Ip上网
sendToAc(ACIp, 'logon', Ip, username, '');
}
if (ACIp2 != null && ACIp2 != "") {
//Ip上网
sendToAc(ACIp2, 'logon', Ip, username, '');
}
var username = $.trim(this.form.username), password = $.trim(this.form.password), verifycode = $.trim(this.form.verifycode);
password = $.md5(password);
this.isLogining = true;
let that = this;
$.ajax({
headers: { __RequestVerificationToken: $.lrToken },
data: { username: username, password: password, verifycode: verifycode },
type: "post",
dataType: "json",
url: $.rootUrl+"/Login/CheckLogin",
success: function (res) {
if (res.code == 200) {
if (source == "noLogin") {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/Index";
window.location.href = "/SSOSystem/Index";
} else if (source == "NoLogin") {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne";
window.location.href = "/SSOSystem/DragModelOne";
} else {
if (res.data.pwd == true) {
if (res.data.pwdtip == true) {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true";
window.location.href = "/Home/Index?pwdpwdtip=true";
} else {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true";
window.location.href = "/Home/Index?pwd=true";
}
}
else {
if (res.data.pwdtip == true) {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true";
window.location.href = "/Home/Index?pwdtip=true";
} else {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
window.location.href = "/Home/Index";
}
//window.location.href = "/Home/Index";
}
}
}
else if (res.code == 400) {
that.isLogining = false;
showMessage(res.info);
that.errornum=res.data;
if (res.data >= 3) {
that.verifyshow = true;
that.codeChange();
}
}
else if (res.code == 500) {
that.isLogining = false;
showMessage('服务端异常,请联系管理员');
}
},
error: function (error) {
that.isLogining = false;
showMessage("服务器异常!");
},
});
});
}
}
});
</script>
<style>
body {
margin: 0;
}

.section {
width: 1200px;
margin: 0 auto;
box-sizing: border-box;
}

.header-content {
padding: 32px 0;
}

main {
background-image: url('/Content/images/LoginPage/loginseven/bg.jpg');
background-repeat: no-repeat;
background-position: center;
/* background-size: auto 100%; */
/* object-fit: fill; */
background-size: cover;
height: calc(100vh - 129px - 58px);
position: relative;
}

main .loginBox {
box-sizing: border-box;
width: 420px;
background-color: #fff;
position: absolute;
top: calc(50% - 280px);
right: calc(12%);
height: 505px;
}

main .loginBox .login-tab {
display: flex;
}

main .loginBox .login-tab > div {
width: 50%;
line-height: 60px;
color: #666;
font-size: 16px;
background-color: #DEEBF3;
text-align: center;
cursor: pointer;
}

main .loginBox .login-tab > div.active {
background-color: #2E6289;
color: #fff;
}

main .loginBox .el-form {
padding: 26px 48px 10px;
}

main .loginBox .el-form .el-form-item {
margin-top: 26px;
}

main .loginBox .el-form .login-btn {
width: 100px;
color: #fff;
width: 100%;
background-color: #2E6289;
margin-top: 12px;
height: 50px;
font-size: 18px;
}

main .loginBox .el-form .login-btn.isLogining {
opacity: 0.9;
color: #EBEEF5;
}

main .loginBox .el-form .loginBox-bottom {
color: #999;
line-height: 24px;
font-size: 12px;
text-align: right;
display: flex;
justify-content: space-between;
}

main .loginBox .el-form .loginBox-bottom .value {
display: inline-block;
/* width: 40px; */
text-align: left;
}

.loginWay {
display: flex;
justify-content: space-between;
padding-bottom: 4px;
}

.loginWay .left {
color: #65C15D;
text-decoration: none;
}

.loginWay .right {
color: #82B6DD;
text-decoration: none;
}

.loginWay img {
width: 32px;
height: 32px;
}

.loginWay span {
position: relative;
bottom: 12px;
font-size: 12px;
}

.el-input-group__prepend {
background: #fff;
border-right: 0;
}

.el-input-group__prepend img {
width: 14px;
position: relative;
top: 2px;
}

.el-input-group__append {
background-color: #fff;
padding-left: 8px;
padding-right: 8px;
}

.el-input-group__append img {
height: 34px;
}

.el-form-item__error {
padding-left: 100px;
}

.qrcode {
width: 260px;
height: 260px;
display: block;
margin: 0 auto;
margin-top: 50px;
}

.qrcodeDes {
font-size: 14px;
color: #666;
text-align: center;
}

.footer-content {
background-color: #fff;
text-align: center;
font-size: 14px;
line-height: 58px;
color: #666;
}
</style>
<style>
/* 消息提示 start */
.showMessage {
padding: 10px 20px;
border-radius: 5px;
position: fixed;
top: 30%;
left: 50%;
color: #ffffff;
z-index: 9999;
transform: translate(-50%, 0);
}

.showMessageSuccess {
background-color: #f0f9eb;
border: 1px solid #e1f3d8;
color: #67c23a;
}

.showMessageError {
/* background-color: #fef0f0; */
background-color: #fdf6ec;
border: 1px solid #fde2e2;
/* color: #F76C6C; */
color: #e6a23c;
}

/* 消息提示 end */
</style>
</body>

</html>

+ 234
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSeven/Index.js View File

@@ -0,0 +1,234 @@
/*!
* 版 本 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";
window.location.href = "/SSOSystem/Index";
} else if (source == "NoLogin") {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne";
window.location.href = "/SSOSystem/DragModelOne";
} else {
if (res.data.pwd == true) {
if (res.data.pwdtip == true) {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdpwdtip=true";
window.location.href = "/Home/Index?pwdpwdtip=true";
} else {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwd=true";
window.location.href = "/Home/Index?pwd=true";
}
}
else {
if (res.data.pwdtip == true) {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index?pwdtip=true";
window.location.href = "/Home/Index?pwdtip=true";
} else {
//window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/Home/Index";
window.location.href = "/Home/Index";
}
//window.location.href = "/Home/Index";
}
}
}
else if (res.code == 400) {
lrPage.logining(false);
lrPage.tip(res.info, true);
$('#errornum').val(res.data);
if (res.data >= 3) {
$(".loginInputCode").show();
$("#lr_verifycode_img").trigger('click');
}
}
else if (res.code == 500) {
lrPage.logining(false);
lrPage.tip('服务端异常,请联系管理员', true);
}
}
});
},
logining: function (isShow) {
if (isShow) {
$('input').attr('disabled', 'disabled');
$("#lr_login_btn").addClass('active').attr('disabled', 'disabled').find('span').hide();
$("#lr_login_btn").css('background', '#eeecec url(/Content/images/Login/loading.gif) no-repeat center 10px');

}
else {
$('input').removeAttr('disabled');
$("#lr_login_btn").removeClass('active').removeAttr('disabled').find('span').show();
$("#lr_login_btn").css('background', '#0094de');

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

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

@@ -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 ="/SSOSystem/Index";
} else {

window.location.href = "/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)

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config View File

@@ -16,8 +16,8 @@
<!--<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />-->
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_长阳;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_长阳;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_怀来;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_怀来;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />

<!--<add name="BaseDb" connectionString="Server=39.97.168.125;Initial Catalog=adms7ultimate2;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config View File

@@ -65,7 +65,7 @@

<add key="userKey" value="14B417B0-463D-4F2B-8075-0A20EEDB773A" />
<!-- ==================注意附件上传地址 修改到部署目录下的Resource要不然飞星会报错================== -->
<add key="AnnexesFile" value="D:\Job\DigitalScholl\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource" />
<add key="AnnexesFile" value="E:\西昌程序单校区版2019_09_16\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource" />
<!-- ================== 8:流程服务地址 ================== -->
<add key="workflowapi" value="http://localhost:8013" />
<!--Redis 缓存前缀 -->


Loading…
Cancel
Save