@@ -48,6 +48,7 @@ | |||||
<li id="lr_dataauthorize"><a><i></i> <span class="lrlt">数据授权</span></a></li> | <li id="lr_dataauthorize"><a><i></i> <span class="lrlt">数据授权</span></a></li> | ||||
<li id="lr_appauthorize"><a><i></i> <span class="lrlt">移动功能授权</span></a></li> | <li id="lr_appauthorize"><a><i></i> <span class="lrlt">移动功能授权</span></a></li> | ||||
<li id="lr_roleinfo"><a><i></i> <span class="lrlt">查看角色</span></a></li> | <li id="lr_roleinfo"><a><i></i> <span class="lrlt">查看角色</span></a></li> | ||||
<li id="lr_cancelweixinbind"><a><i></i> <span class="lrlt">解绑微信</span></a></li> | |||||
</ul> | </ul> | ||||
</div> | </div> | ||||
<div class="btn-group btn-group-sm" learun-authorize="yes"> | <div class="btn-group btn-group-sm" learun-authorize="yes"> | ||||
@@ -241,6 +241,21 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 解绑微信 | |||||
$('#lr_cancelweixinbind').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('F_UserId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认要【解绑微信】!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Home/CancelWeiXinBind', { keyValue: keyValue }, function (data) { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 设置Ip过滤 | // 设置Ip过滤 | ||||
$('#lr_ipfilter').on('click', function () { | $('#lr_ipfilter').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('F_UserId'); | var keyValue = $('#gridtable').jfGridValue('F_UserId'); | ||||
@@ -48,6 +48,7 @@ | |||||
<li id="lr_dataauthorize"><a><i></i> <span class="lrlt">数据授权</span></a></li> | <li id="lr_dataauthorize"><a><i></i> <span class="lrlt">数据授权</span></a></li> | ||||
<li id="lr_appauthorize"><a><i></i> <span class="lrlt">移动功能授权</span></a></li> | <li id="lr_appauthorize"><a><i></i> <span class="lrlt">移动功能授权</span></a></li> | ||||
<li id="lr_addRelation"><a><i></i> <span class="lrlt">学生角色批量添加</span></a></li> | <li id="lr_addRelation"><a><i></i> <span class="lrlt">学生角色批量添加</span></a></li> | ||||
<li id="lr_cancelweixinbind"><a><i></i> <span class="lrlt">解绑微信</span></a></li> | |||||
<li id="lr_closeuser1"><a><i></i> <span class="lrlt">一键禁用从未登录用户</span></a></li> | <li id="lr_closeuser1"><a><i></i> <span class="lrlt">一键禁用从未登录用户</span></a></li> | ||||
<li id="lr_closeuser2"><a><i></i> <span class="lrlt">一键禁用未修改过密码用户</span></a></li> | <li id="lr_closeuser2"><a><i></i> <span class="lrlt">一键禁用未修改过密码用户</span></a></li> | ||||
<li id="lr_closeuser3"><a><i></i> <span class="lrlt">一键禁用半年内未登录用户</span></a></li> | <li id="lr_closeuser3"><a><i></i> <span class="lrlt">一键禁用半年内未登录用户</span></a></li> | ||||
@@ -224,13 +224,27 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
$("#lr_closeuser1").on('click', function() { | |||||
// 解绑微信 | |||||
$('#lr_cancelweixinbind').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('F_UserId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认要【解绑微信】!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/Home/CancelWeiXinBind', { keyValue: keyValue }, function (data) { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$("#lr_closeuser1").on('click', function () { | |||||
learun.alert.success('禁用成功'); | learun.alert.success('禁用成功'); | ||||
}) | }) | ||||
$("#lr_closeuser2").on('click', function() { | |||||
$("#lr_closeuser2").on('click', function () { | |||||
learun.alert.success('禁用成功'); | learun.alert.success('禁用成功'); | ||||
}) | }) | ||||
$("#lr_closeuser3").on('click', function() { | |||||
$("#lr_closeuser3").on('click', function () { | |||||
learun.alert.success('禁用成功'); | learun.alert.success('禁用成功'); | ||||
}) | }) | ||||
}, | }, | ||||
@@ -610,6 +610,27 @@ namespace Learun.Application.Web.Controllers | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 解绑微信 | |||||
/// <summary> | |||||
/// 解绑微信 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CancelWeiXinBind(string keyValue) | |||||
{ | |||||
var userId = LoginUserInfo.Get().userId; | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
userId = keyValue; | |||||
} | |||||
//更新openid | |||||
userIBLL.UpdateWeixinOpenIdPC(userId, ""); | |||||
return Success("解绑成功"); | |||||
} | |||||
#endregion | |||||
/// <summary> | /// <summary> | ||||
/// 访问功能 | /// 访问功能 | ||||
/// </summary> | /// </summary> | ||||
@@ -802,44 +802,11 @@ namespace Learun.Application.Web.Controllers | |||||
string WeixinOpenId = Request["WeixinOpenId"]; | string WeixinOpenId = Request["WeixinOpenId"]; | ||||
ViewBag.WeixinOpenId = WeixinOpenId; | ViewBag.WeixinOpenId = WeixinOpenId; | ||||
ViewBag.QQOpenId = QQOpenId; | ViewBag.QQOpenId = QQOpenId; | ||||
//获取错误次数 | |||||
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); | |||||
//获取高职版跳转地址 | //获取高职版跳转地址 | ||||
ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"]; | ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"]; | ||||
ViewBag.Returnurl = "http://" + Request.Url.Host + ":" + Request.Url.Port; | 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; | ViewBag.OnlineUserNum = 0; | ||||
var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); | ||||
@@ -71,6 +71,7 @@ var loaddfimg; | |||||
_html += '</a>'; | _html += '</a>'; | ||||
_html += '<ul class="dropdown-menu pull-right">'; | _html += '<ul class="dropdown-menu pull-right">'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_userinfo_btn"><i class="fa fa-user"></i>个人信息</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_userinfo_btn"><i class="fa fa-user"></i>个人信息</a></li>'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_cancelweixinbind_btn"><i class="fa fa-unlock"></i>解绑微信</a></li>'; | |||||
_html += '<li><a href="javascript:void(0);" id="lr_schedule_btn"><i class="fa fa-calendar"></i>我的日程</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_schedule_btn"><i class="fa fa-calendar"></i>我的日程</a></li>'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>'; | ||||
if (loginInfo.isSystem) { | if (loginInfo.isSystem) { | ||||
@@ -84,6 +85,7 @@ var loaddfimg; | |||||
$('#lr_userinfo_btn').on('click', page.openUserCenter); | $('#lr_userinfo_btn').on('click', page.openUserCenter); | ||||
$('#lr_clearredis_btn').on('click', page.clearredis); | $('#lr_clearredis_btn').on('click', page.clearredis); | ||||
$('#lr_onlineuser_btn').on('click', page.openOnlineUser); | $('#lr_onlineuser_btn').on('click', page.openOnlineUser); | ||||
$('#lr_cancelweixinbind_btn').on('click', page.cancelWeiXinBind); | |||||
}, | }, | ||||
loginout: function () { // 安全退出 | loginout: function () { // 安全退出 | ||||
learun.layerConfirm("注:您确定要安全退出本次登录吗?", function (r) { | learun.layerConfirm("注:您确定要安全退出本次登录吗?", function (r) { | ||||
@@ -113,6 +115,21 @@ var loaddfimg; | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
cancelWeiXinBind: function () { | |||||
learun.layerConfirm("注:您确定要解绑微信吗?", function (r) { | |||||
if (r) { | |||||
learun.loading(true, '解除绑定中...'); | |||||
learun.httpAsyncPost($.rootUrl + '/Home/CancelWeiXinBind', {}, function (data) { | |||||
if (data.code == 200) { | |||||
learun.alert.success(data.info); | |||||
} else { | |||||
learun.alert.error("异常,请刷新!"); | |||||
} | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
openUserCenter: function () { | openUserCenter: function () { | ||||
// 打开个人中心 | // 打开个人中心 | ||||
learun.frameTab.open({ F_ModuleId: '1', F_Icon: 'fa fa-user', F_FullName: '个人中心', F_UrlAddress: '/UserCenter/Index' }); | learun.frameTab.open({ F_ModuleId: '1', F_Icon: 'fa fa-user', F_FullName: '个人中心', F_UrlAddress: '/UserCenter/Index' }); | ||||
@@ -270,7 +287,7 @@ var loaddfimg; | |||||
}); | }); | ||||
$setting.find('input').click(function () { | $setting.find('input').click(function () { | ||||
var value = $(this).val(); | var value = $(this).val(); | ||||
top.$.cookie('Learn_ADMS_V6.1_UItheme', value, { path: "/", expires: 30}); | |||||
top.$.cookie('Learn_ADMS_V6.1_UItheme', value, { path: "/", expires: 30 }); | |||||
window.location.href = $.rootUrl + '/Home/Index'; | window.location.href = $.rootUrl + '/Home/Index'; | ||||
}); | }); | ||||
@@ -71,6 +71,7 @@ var loaddfimg; | |||||
_html += '</a>'; | _html += '</a>'; | ||||
_html += '<ul class="dropdown-menu pull-right">'; | _html += '<ul class="dropdown-menu pull-right">'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_userinfo_btn"><i class="fa fa-user"></i>个人信息</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_userinfo_btn"><i class="fa fa-user"></i>个人信息</a></li>'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_cancelweixinbind_btn"><i class="fa fa-unlock"></i>解绑微信</a></li>'; | |||||
_html += '<li><a href="javascript:void(0);" id="lr_schedule_btn"><i class="fa fa-calendar"></i>我的日程</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_schedule_btn"><i class="fa fa-calendar"></i>我的日程</a></li>'; | ||||
_html += '<li><a href="javascript:void(0);" id="lr_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>'; | _html += '<li><a href="javascript:void(0);" id="lr_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>'; | ||||
if (loginInfo.isSystem) { | if (loginInfo.isSystem) { | ||||
@@ -84,6 +85,7 @@ var loaddfimg; | |||||
$('#lr_userinfo_btn').on('click', page.openUserCenter); | $('#lr_userinfo_btn').on('click', page.openUserCenter); | ||||
$('#lr_clearredis_btn').on('click', page.clearredis); | $('#lr_clearredis_btn').on('click', page.clearredis); | ||||
$('#lr_onlineuser_btn').on('click', page.openOnlineUser); | $('#lr_onlineuser_btn').on('click', page.openOnlineUser); | ||||
$('#lr_cancelweixinbind_btn').on('click', page.cancelWeiXinBind); | |||||
}, | }, | ||||
loginout: function () { // 安全退出 | loginout: function () { // 安全退出 | ||||
learun.layerConfirm("注:您确定要安全退出本次登录吗?", function (r) { | learun.layerConfirm("注:您确定要安全退出本次登录吗?", function (r) { | ||||
@@ -113,6 +115,21 @@ var loaddfimg; | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
cancelWeiXinBind: function () { | |||||
learun.layerConfirm("注:您确定要解绑微信吗?", function (r) { | |||||
if (r) { | |||||
learun.loading(true, '解除绑定中...'); | |||||
learun.httpAsyncPost($.rootUrl + '/Home/CancelWeiXinBind', {}, function (data) { | |||||
if (data.code == 200) { | |||||
learun.alert.success(data.info); | |||||
} else { | |||||
learun.alert.error("异常,请刷新!"); | |||||
} | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
openUserCenter: function () { | openUserCenter: function () { | ||||
// 打开个人中心 | // 打开个人中心 | ||||
learun.frameTab.open({ F_ModuleId: '1', F_Icon: 'fa fa-user', F_FullName: '个人中心', F_UrlAddress: '/UserCenter/IndexForDC' }); | learun.frameTab.open({ F_ModuleId: '1', F_Icon: 'fa fa-user', F_FullName: '个人中心', F_UrlAddress: '/UserCenter/IndexForDC' }); | ||||