@@ -927,6 +927,7 @@ namespace Learun.Application.Web.Controllers | |||||
//微信appid | //微信appid | ||||
string appid = weichatdevelop.APPId; | string appid = weichatdevelop.APPId; | ||||
string secret = weichatdevelop.secret; | string secret = weichatdevelop.secret; | ||||
ViewBag.source = Request.QueryString["source"]; | |||||
ViewBag.login = Request.QueryString["login"]; | ViewBag.login = Request.QueryString["login"]; | ||||
ViewBag.CODE = Request.QueryString["CODE"]; | ViewBag.CODE = Request.QueryString["CODE"]; | ||||
if (!string.IsNullOrEmpty(ViewBag.login)) | if (!string.IsNullOrEmpty(ViewBag.login)) | ||||
@@ -69,15 +69,15 @@ namespace Learun.Application.Web.Controllers | |||||
string appkey = Request.QueryString["appkey"]; | string appkey = Request.QueryString["appkey"]; | ||||
if (string.IsNullOrEmpty(appid)) | if (string.IsNullOrEmpty(appid)) | ||||
{ | { | ||||
return Fail("参数:appid不能为空"); | |||||
return Fail("参数:appid 不能为空"); | |||||
} | } | ||||
if (string.IsNullOrEmpty(secret)) | if (string.IsNullOrEmpty(secret)) | ||||
{ | { | ||||
return Fail("参数:secret不能为空"); | |||||
return Fail("参数:secret 不能为空"); | |||||
} | } | ||||
if (string.IsNullOrEmpty(appkey)) | if (string.IsNullOrEmpty(appkey)) | ||||
{ | { | ||||
return Fail("参数:appkey不能为空"); | |||||
return Fail("参数:appkey 不能为空"); | |||||
} | } | ||||
var application = perm_FunctionIBLL.GetPerm_FunctionEntity(appid); | var application = perm_FunctionIBLL.GetPerm_FunctionEntity(appid); | ||||
if (application != null) | if (application != null) | ||||
@@ -2398,6 +2398,7 @@ | |||||
<Content Include="Content\images\SsoSystem\noLogin.png" /> | <Content Include="Content\images\SsoSystem\noLogin.png" /> | ||||
<Content Include="Content\images\SsoSystem\search.png" /> | <Content Include="Content\images\SsoSystem\search.png" /> | ||||
<Content Include="Content\images\SsoSystem\user.jpg" /> | <Content Include="Content\images\SsoSystem\user.jpg" /> | ||||
<Content Include="Content\images\wsbsdt.png" /> | |||||
<Content Include="Content\jquery\plugin\jqprint\jqprint.css" /> | <Content Include="Content\jquery\plugin\jqprint\jqprint.css" /> | ||||
<Content Include="Content\jquery\plugin\jqprint\jQuery.print.js" /> | <Content Include="Content\jquery\plugin\jqprint\jQuery.print.js" /> | ||||
<Content Include="Content\jquery\plugin\jSignature.min.js" /> | <Content Include="Content\jquery\plugin\jSignature.min.js" /> | ||||
@@ -3,6 +3,20 @@ | |||||
Layout = "~/Views/Shared/_Admin.cshtml"; | Layout = "~/Views/Shared/_Admin.cshtml"; | ||||
} | } | ||||
@Html.AppendCssFile("/Views/Home/AdminDefault/index.css") | @Html.AppendCssFile("/Views/Home/AdminDefault/index.css") | ||||
<style> | |||||
.lr-im-bell2 { | |||||
width: 80px; | |||||
right: 123px; | |||||
display: flex; | |||||
justify-content: space-around; | |||||
align-items: center; | |||||
} | |||||
.lr-im-bell2 .point { | |||||
left: 23px; | |||||
right: auto; | |||||
} | |||||
</style> | |||||
<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 "" }; | 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 "" }; | ||||
</script> | </script> | ||||
@@ -43,6 +57,9 @@ | |||||
<li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@ | <li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@ | ||||
<li> 共 @ViewBag.UnreadNum 条</li> | <li> 共 @ViewBag.UnreadNum 条</li> | ||||
</ul> | </ul> | ||||
<div style="display: inline-block; line-height: 18px; position: relative; top: -3px;" title="网上办事大厅"> | |||||
<a href="/SSOSystem/DragModelOne" class="down downsso"><img src="~/Content/images/wsbsdt.png" /></a> | |||||
</div> | |||||
</div> | </div> | ||||
@* 即时通讯窗体 *@ | @* 即时通讯窗体 *@ | ||||
@@ -15,6 +15,7 @@ | |||||
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> | <script src="~/Content/jquery/jquery-1.10.2.min.js"></script> | ||||
<script type="text/javascript"> | <script type="text/javascript"> | ||||
var code = "@ViewBag.CODE"; | var code = "@ViewBag.CODE"; | ||||
var source = "@ViewBag.source"; | |||||
$(document).ready(function () { | $(document).ready(function () { | ||||
@if(string.IsNullOrEmpty(ViewBag.login)) | @if(string.IsNullOrEmpty(ViewBag.login)) | ||||
{ | { | ||||
@@ -31,15 +32,27 @@ | |||||
location.href = result.data.returnurl; | location.href = result.data.returnurl; | ||||
} | } | ||||
else { | else { | ||||
if (source) { | |||||
location.href = "/SSOSystem/DragModelOne"; | |||||
return; | |||||
} | |||||
location.href = "/Home/Index"; | location.href = "/Home/Index"; | ||||
} | } | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (source) { | |||||
location.href = "/SSOSystem/DragModelOne"; | |||||
return; | |||||
} | |||||
location.href = "/Home/Index"; | location.href = "/Home/Index"; | ||||
} | } | ||||
} | } | ||||
else { | else { | ||||
if (source) { | |||||
location.href = "/SSOSystem/NoLogin"; | |||||
return; | |||||
} | |||||
location.href = "/Login/Index"; | location.href = "/Login/Index"; | ||||
} | } | ||||
}, | }, | ||||
@@ -1062,7 +1062,6 @@ | |||||
<script src="~/Content/jquery/jquery.md5.min.js"></script> | <script src="~/Content/jquery/jquery.md5.min.js"></script> | ||||
<script> | <script> | ||||
$.lrToken = $('@Html.AntiForgeryToken()').val(); | $.lrToken = $('@Html.AntiForgeryToken()').val(); | ||||
var DigitalschoolMisLoginurl = "@ViewBag.DigitalschoolMisLoginurl"; | |||||
var Returnurl = "@ViewBag.Returnurl"; | var Returnurl = "@ViewBag.Returnurl"; | ||||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | //判断是否有登录二维码:有,显示扫码登录;否,不显示; | ||||
if ("@ViewBag.HasQRCode" == "True") { | if ("@ViewBag.HasQRCode" == "True") { | ||||
@@ -1112,10 +1111,7 @@ | |||||
} | } | ||||
// 登录按钮事件 | // 登录按钮事件 | ||||
$("#lr_login_btn").on('click', function () { | $("#lr_login_btn").on('click', function () { | ||||
layer.msg('登录中...', { | |||||
icon: 16 | |||||
, shade: 0.01 | |||||
}); | |||||
var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#lr_verifycode_input"); | var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#lr_verifycode_input"); | ||||
var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val()); | var username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val()); | ||||
if (username == "") { | if (username == "") { | ||||
@@ -1134,6 +1130,11 @@ | |||||
return false; | return false; | ||||
} | } | ||||
password = $.md5(password); | password = $.md5(password); | ||||
layer.msg('登录中...', { | |||||
icon: 16 | |||||
, shade: 0.01 | |||||
,time:-1 | |||||
}); | |||||
$.ajax({ | $.ajax({ | ||||
url: "/Login/CheckLogin", | url: "/Login/CheckLogin", | ||||
headers: { __RequestVerificationToken: $.lrToken }, | headers: { __RequestVerificationToken: $.lrToken }, | ||||
@@ -1142,7 +1143,7 @@ | |||||
dataType: "json", | dataType: "json", | ||||
success: function (res) { | success: function (res) { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; | |||||
window.location.href ="/SSOSystem/DragModelOne"; | |||||
} | } | ||||
else if (res.code == 400) { | else if (res.code == 400) { | ||||
tip(res.info, true); | tip(res.info, true); | ||||
@@ -1151,8 +1152,10 @@ | |||||
$('.lr-login-reg').show(); | $('.lr-login-reg').show(); | ||||
$("#lr_verifycode_img").trigger('click'); | $("#lr_verifycode_img").trigger('click'); | ||||
} | } | ||||
layer.closeAll(); | |||||
} | } | ||||
else if (res.code == 500) { | else if (res.code == 500) { | ||||
layer.closeAll(); | |||||
tip('服务端异常,请联系管理员', true); | tip('服务端异常,请联系管理员', true); | ||||
} | } | ||||
} | } | ||||
@@ -1069,7 +1069,6 @@ | |||||
<script src="~/Content/jquery/jquery.md5.min.js"></script> | <script src="~/Content/jquery/jquery.md5.min.js"></script> | ||||
<script> | <script> | ||||
$.lrToken = $('@Html.AntiForgeryToken()').val(); | $.lrToken = $('@Html.AntiForgeryToken()').val(); | ||||
var DigitalschoolMisLoginurl = "@ViewBag.DigitalschoolMisLoginurl"; | |||||
var Returnurl = "@ViewBag.Returnurl"; | var Returnurl = "@ViewBag.Returnurl"; | ||||
//判断是否有登录二维码:有,显示扫码登录;否,不显示; | //判断是否有登录二维码:有,显示扫码登录;否,不显示; | ||||
if ("@ViewBag.HasQRCode" == "True") { | if ("@ViewBag.HasQRCode" == "True") { | ||||
@@ -1119,10 +1118,7 @@ | |||||
} | } | ||||
// 登录按钮事件 | // 登录按钮事件 | ||||
$("#lr_login_btn").on('click', function () { | $("#lr_login_btn").on('click', function () { | ||||
layer.msg('绑定中...', { | |||||
icon: 16 | |||||
, shade: 0.01 | |||||
}); | |||||
var $username = $("#lr_username"), $password = $("#lr_password"), $verifycode = $("#lr_verifycode_input"), $WeixinOpenId = $("#WeixinOpenId"); | 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 username = $.trim($username.val()), password = $.trim($password.val()), verifycode = $.trim($verifycode.val()), WeixinOpenId = $.trim($WeixinOpenId.val()); | ||||
if (username == "") { | if (username == "") { | ||||
@@ -1141,6 +1137,11 @@ | |||||
return false; | return false; | ||||
} | } | ||||
password = $.md5(password); | password = $.md5(password); | ||||
layer.msg('绑定中...', { | |||||
icon: 16 | |||||
, shade: 0.01 | |||||
, time: -1 | |||||
}); | |||||
$.ajax({ | $.ajax({ | ||||
url: "/Login/CheckLoginBind", | url: "/Login/CheckLoginBind", | ||||
headers: { __RequestVerificationToken: $.lrToken }, | headers: { __RequestVerificationToken: $.lrToken }, | ||||
@@ -1149,7 +1150,7 @@ | |||||
dataType: "json", | dataType: "json", | ||||
success: function (res) { | success: function (res) { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
window.location.href = DigitalschoolMisLoginurl + "?F_Account=" + username + "&returnurl=" + Returnurl + "/SSOSystem/DragModelOne"; | |||||
window.location.href = "/SSOSystem/DragModelOne"; | |||||
} | } | ||||
else if (res.code == 400) { | else if (res.code == 400) { | ||||
tip(res.info, true); | tip(res.info, true); | ||||
@@ -1158,8 +1159,10 @@ | |||||
$('.lr-login-reg').show(); | $('.lr-login-reg').show(); | ||||
$("#lr_verifycode_img").trigger('click'); | $("#lr_verifycode_img").trigger('click'); | ||||
} | } | ||||
layer.closeAll(); | |||||
} | } | ||||
else if (res.code == 500) { | else if (res.code == 500) { | ||||
layer.closeAll(); | |||||
tip('服务端异常,请联系管理员', true); | tip('服务端异常,请联系管理员', true); | ||||
} | } | ||||
} | } | ||||