ソースを参照

【增加】首页右上角增加解绑微信;统一认证-学生/教师用户管理:更多中增加解绑微信;

大厂分支
dyy 4年前
コミット
11d90d4a52
8個のファイルの変更92行の追加39行の削除
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml
  2. +15
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml
  4. +17
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.js
  5. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  6. +2
    -35
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
  7. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js
  8. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-adminForDC.js

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/Index.cshtml ファイルの表示

@@ -48,6 +48,7 @@
<li id="lr_dataauthorize"><a><i></i>&nbsp;<span class="lrlt">数据授权</span></a></li>
<li id="lr_appauthorize"><a><i></i>&nbsp;<span class="lrlt">移动功能授权</span></a></li>
<li id="lr_roleinfo"><a><i></i>&nbsp;<span class="lrlt">查看角色</span></a></li>
<li id="lr_cancelweixinbind"><a><i></i>&nbsp;<span class="lrlt">解绑微信</span></a></li>
</ul>
</div>
<div class="btn-group btn-group-sm" learun-authorize="yes">


+ 15
- 0
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');


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/StudentIndex.cshtml ファイルの表示

@@ -48,6 +48,7 @@
<li id="lr_dataauthorize"><a><i></i>&nbsp;<span class="lrlt">数据授权</span></a></li>
<li id="lr_appauthorize"><a><i></i>&nbsp;<span class="lrlt">移动功能授权</span></a></li>
<li id="lr_addRelation"><a><i></i>&nbsp;<span class="lrlt">学生角色批量添加</span></a></li>
<li id="lr_cancelweixinbind"><a><i></i>&nbsp;<span class="lrlt">解绑微信</span></a></li>
<li id="lr_closeuser1"><a><i></i>&nbsp;<span class="lrlt">一键禁用从未登录用户</span></a></li>
<li id="lr_closeuser2"><a><i></i>&nbsp;<span class="lrlt">一键禁用未修改过密码用户</span></a></li>
<li id="lr_closeuser3"><a><i></i>&nbsp;<span class="lrlt">一键禁用半年内未登录用户</span></a></li>


+ 17
- 3
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('禁用成功');
})
},


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs ファイルの表示

@@ -610,6 +610,27 @@ namespace Learun.Application.Web.Controllers
}
#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>


+ 2
- 35
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();


+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-admin.js ファイルの表示

@@ -71,6 +71,7 @@ var loaddfimg;
_html += '</a>';
_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_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_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>';
if (loginInfo.isSystem) {
@@ -84,6 +85,7 @@ var loaddfimg;
$('#lr_userinfo_btn').on('click', page.openUserCenter);
$('#lr_clearredis_btn').on('click', page.clearredis);
$('#lr_onlineuser_btn').on('click', page.openOnlineUser);
$('#lr_cancelweixinbind_btn').on('click', page.cancelWeiXinBind);
},
loginout: function () { // 安全退出
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 () {
// 打开个人中心
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 () {
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';
});



+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-adminForDC.js ファイルの表示

@@ -71,6 +71,7 @@ var loaddfimg;
_html += '</a>';
_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_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_onlineuser_btn"><i class="fa fa-user"></i>在线人员</a></li>';
if (loginInfo.isSystem) {
@@ -84,6 +85,7 @@ var loaddfimg;
$('#lr_userinfo_btn').on('click', page.openUserCenter);
$('#lr_clearredis_btn').on('click', page.clearredis);
$('#lr_onlineuser_btn').on('click', page.openOnlineUser);
$('#lr_cancelweixinbind_btn').on('click', page.cancelWeiXinBind);
},
loginout: function () { // 安全退出
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 () {
// 打开个人中心
learun.frameTab.open({ F_ModuleId: '1', F_Icon: 'fa fa-user', F_FullName: '个人中心', F_UrlAddress: '/UserCenter/IndexForDC' });


読み込み中…
キャンセル
保存