From 11d90d4a527e16c642618f1e8a332ddf9cd47c9b Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Wed, 21 Oct 2020 17:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=8F=B3=E4=B8=8A=E8=A7=92=E5=A2=9E=E5=8A=A0=E8=A7=A3?= =?UTF-8?q?=E7=BB=91=E5=BE=AE=E4=BF=A1=EF=BC=9B=E7=BB=9F=E4=B8=80=E8=AE=A4?= =?UTF-8?q?=E8=AF=81-=E5=AD=A6=E7=94=9F/=E6=95=99=E5=B8=88=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=EF=BC=9A=E6=9B=B4=E5=A4=9A=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=A3=E7=BB=91=E5=BE=AE=E4=BF=A1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/User/Index.cshtml | 1 + .../LR_OrganizationModule/Views/User/Index.js | 15 ++++++++ .../Views/User/StudentIndex.cshtml | 1 + .../Views/User/StudentIndex.js | 20 ++++++++-- .../Controllers/HomeController.cs | 21 +++++++++++ .../Controllers/LoginController.cs | 37 +------------------ .../Views/LR_Content/script/lr-admin.js | 19 +++++++++- .../Views/LR_Content/script/lr-adminForDC.js | 17 +++++++++ 8 files changed, 92 insertions(+), 39 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml index 7f3765bcc..41155f532 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml @@ -48,6 +48,7 @@
  •  数据授权
  •  移动功能授权
  •  查看角色
  • +
  •  解绑微信
  • diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js index 783d78dd7..5067e8d74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js @@ -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过滤 $('#lr_ipfilter').on('click', function () { var keyValue = $('#gridtable').jfGridValue('F_UserId'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml index 3549f373a..b9e38b54f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml @@ -48,6 +48,7 @@
  •  数据授权
  •  移动功能授权
  •  学生角色批量添加
  • +
  •  解绑微信
  •  一键禁用从未登录用户
  •  一键禁用未修改过密码用户
  •  一键禁用半年内未登录用户
  • diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.js index 81ed675c1..6f52cf414 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.js @@ -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('禁用成功'); }) - $("#lr_closeuser2").on('click', function() { + $("#lr_closeuser2").on('click', function () { learun.alert.success('禁用成功'); }) - $("#lr_closeuser3").on('click', function() { + $("#lr_closeuser3").on('click', function () { learun.alert.success('禁用成功'); }) }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 1ef696906..575d67748 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -610,6 +610,27 @@ namespace Learun.Application.Web.Controllers } #endregion + #region 解绑微信 + /// + /// 解绑微信 + /// + /// + [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 + /// /// 访问功能 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index 4e76852c7..ab0632e8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -802,44 +802,11 @@ namespace Learun.Application.Web.Controllers string WeixinOpenId = Request["WeixinOpenId"]; ViewBag.WeixinOpenId = WeixinOpenId; ViewBag.QQOpenId = QQOpenId; - - //获取错误次数 - ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum(); + //获取高职版跳转地址 ViewBag.DigitalschoolMisLoginurl = ConfigurationManager.AppSettings["DigitalschoolMisLoginurl"]; 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; var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js index 12467a8fa..647ddd355 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js @@ -71,6 +71,7 @@ var loaddfimg; _html += ''; _html += '