@@ -73,6 +73,11 @@ namespace Learun.Application.Web.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
public ActionResult ChangePwdOfFirstLogin() | |||||
{ | |||||
return View(); | |||||
} | |||||
#region 统一身份认证2.0 | #region 统一身份认证2.0 | ||||
public ActionResult SSOApplication() | public ActionResult SSOApplication() | ||||
@@ -353,6 +353,20 @@ namespace Learun.Application.Web.Controllers | |||||
OperatorHelper.Instance.EmptyCurrent(); | OperatorHelper.Instance.EmptyCurrent(); | ||||
return Success("密码修改成功,请牢记新密码。\r 将会自动安全退出。"); | return Success("密码修改成功,请牢记新密码。\r 将会自动安全退出。"); | ||||
} | } | ||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult SubmitResetPasswordidenNoCode(string password, string oldPassword) | |||||
{ | |||||
bool res = userIBLL.RevisePasswordiden(password, oldPassword); | |||||
if (!res) | |||||
{ | |||||
return Fail("原密码错误,请重新输入"); | |||||
} | |||||
Session.Abandon(); | |||||
Session.Clear(); | |||||
OperatorHelper.Instance.EmptyCurrent(); | |||||
return Success("密码修改成功,请牢记新密码。\r 将会自动安全退出。"); | |||||
} | |||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
@@ -4230,6 +4230,7 @@ | |||||
<Content Include="Views\Home\AdminTop\Index.js" /> | <Content Include="Views\Home\AdminTop\Index.js" /> | ||||
<Content Include="Views\Home\AdminWindos\Index.css" /> | <Content Include="Views\Home\AdminWindos\Index.css" /> | ||||
<Content Include="Views\Home\AdminWindos\Index.js" /> | <Content Include="Views\Home\AdminWindos\Index.js" /> | ||||
<Content Include="Views\Home\ChangePwdOfFirstLogin.js" /> | |||||
<Content Include="Views\Home\FirstChangePwd.js" /> | <Content Include="Views\Home\FirstChangePwd.js" /> | ||||
<Content Include="Views\Home\DataBaseInit.js" /> | <Content Include="Views\Home\DataBaseInit.js" /> | ||||
<Content Include="Views\Home\ChangePwd.js" /> | <Content Include="Views\Home\ChangePwd.js" /> | ||||
@@ -8130,6 +8131,7 @@ | |||||
<Content Include="Views\Home\FirstChangePwd.cshtml" /> | <Content Include="Views\Home\FirstChangePwd.cshtml" /> | ||||
<Content Include="Views\Login\ForgotPassword.cshtml" /> | <Content Include="Views\Login\ForgotPassword.cshtml" /> | ||||
<Content Include="Views\Home\CancelWeiXinBindForm.cshtml" /> | <Content Include="Views\Home\CancelWeiXinBindForm.cshtml" /> | ||||
<Content Include="Views\Home\ChangePwdOfFirstLogin.cshtml" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<WCFMetadata Include="Connected Services\" /> | <WCFMetadata Include="Connected Services\" /> | ||||
@@ -199,8 +199,8 @@ var bootstrap = function ($, learun) { | |||||
// }); | // }); | ||||
//} | //} | ||||
if (pwd == "true" || sessionStorage.getItem("pase_29d") == "hm") { | |||||
//弱密码/初始密码登录,强制修改弹框 | |||||
if (sessionStorage.getItem("pase_29d") == "hm") { | |||||
top.layer.open({ | top.layer.open({ | ||||
id: 'pwdform', | id: 'pwdform', | ||||
title: '密码修改', | title: '密码修改', | ||||
@@ -230,7 +230,39 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
if (pwd == "first" || sessionStorage.getItem("pase_29d") == "fs") { | |||||
//登录页-(新生手机号)首次登录,强制修改弹框 | |||||
if (sessionStorage.getItem("pase_29d") == "hmfl") { | |||||
top.layer.open({ | |||||
id: 'pwdform', | |||||
title: '密码修改', | |||||
closeBtn: 0, | |||||
resize: false, | |||||
type: 2, | |||||
skin: 'lr-layer', | |||||
btn: ['确定'], | |||||
content: top.$.rootUrl + '/Home/ChangePwdOfFirstLogin', | |||||
area: ['500px', '300px'], | |||||
success: function (layero, index) { | |||||
top['layer_pwdform'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); | |||||
layero[0].learun_layerid = 'layer_pwdform'; | |||||
}, | |||||
yes: function (index, layero) { | |||||
var flag = top['layer_pwdform'].acceptClick(function () { | |||||
//删除seesion | |||||
sessionStorage.removeItem("pase_29d"); | |||||
top.location.href = "/Login/Index"; | |||||
}); | |||||
if (!!flag) { | |||||
learun.layerClose('', index); | |||||
} | |||||
}, | |||||
end: function () { | |||||
top['layer_pwdform'] = null; | |||||
} | |||||
}); | |||||
} | |||||
//首次登录微信绑定,强制修改弹框 | |||||
if (sessionStorage.getItem("pase_29d") == "fs") { | |||||
top.layer.open({ | top.layer.open({ | ||||
id: 'pwdform', | id: 'pwdform', | ||||
title: '密码修改', | title: '密码修改', | ||||
@@ -0,0 +1,23 @@ | |||||
@{ | |||||
ViewBag.Title = "首次登录强制改密"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-12 lr-form-item" data-table="ChangePwdOfFirstLogin"> | |||||
<div class="lr-form-item-title">身份证后八位<font face="宋体">*</font></div> | |||||
<input id="OldPwd" type="password" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ChangePwdOfFirstLogin"> | |||||
<div class="lr-form-item-title">新密码<font face="宋体">*</font></div> | |||||
<input id="NewPwd" type="password" class="form-control" isvalid="yes" checkexpession="StrongPwd" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ChangePwdOfFirstLogin"> | |||||
<div class="lr-form-item-title">确认密码<font face="宋体">*</font></div> | |||||
<input id="NewPwd2" type="password" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ChangePwdOfFirstLogin"> | |||||
<div class="lr-form-item-title"></div> | |||||
新密码必须8-20位同时包含1.[大小写字母]、2[数字]、3[特殊符号!@@#$%^&*] | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Views/Home/ChangePwdOfFirstLogin.js") |
@@ -0,0 +1,56 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2019-07-18 15:18 | |||||
* 描 述:首次登录强制改密 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$("#NewPwd2").blur(function () { | |||||
var $this = $(this); | |||||
if ($this.val() == "") { | |||||
return false; | |||||
} | |||||
if ($this.val() != $('#NewPwd').val()) { | |||||
learun.alert.error("两次密码输入不一样"); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
if ($("#OldPwd").val().length != 8) { | |||||
learun.alert.error("旧密码输入不正确,请重新确认"); | |||||
return false; | |||||
} | |||||
if ($("#NewPwd2").val() != $('#NewPwd').val()) { | |||||
learun.alert.error("新密码和确认密码输入不一致,请修改"); | |||||
return false; | |||||
} | |||||
var formData = $('body').lrGetFormData(); | |||||
var postData = { | |||||
password: $.md5(formData.NewPwd), | |||||
oldPassword: formData.OldPwd | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/UserCenter/SubmitResetPasswordidenNoCode', postData, function (res) { | |||||
if (res.code == 200) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -155,7 +155,7 @@ | |||||
if (res.data.pwd == true) { | if (res.data.pwd == true) { | ||||
//存储seesion | //存储seesion | ||||
sessionStorage.setItem("pase_29d", "fs"); | sessionStorage.setItem("pase_29d", "fs"); | ||||
window.location.href = "/Home/Index?pwd=first"; | |||||
window.location.href = "/Home/Index"; | |||||
} | } | ||||
else { | else { | ||||
window.location.href = "/Home/Index"; | window.location.href = "/Home/Index"; | ||||
@@ -320,7 +320,7 @@ | |||||
if (res.code == 200) { | if (res.code == 200) { | ||||
if (res.data.pwd == true) { | if (res.data.pwd == true) { | ||||
//存储seesion | //存储seesion | ||||
sessionStorage.setItem("pase_29d", "hm"); | |||||
sessionStorage.setItem("pase_29d", "hmfl"); | |||||
window.location.href = "/Home/Index"; | window.location.href = "/Home/Index"; | ||||
} | } | ||||
} else { | } else { | ||||
@@ -117,7 +117,7 @@ | |||||
<div class="lr-login-bypsw"> | <div class="lr-login-bypsw"> | ||||
<div class="error_info">* <span></span></div> | <div class="error_info">* <span></span></div> | ||||
<div class="lr-login-input"> | <div class="lr-login-input"> | ||||
<img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="phone" type="text" placeholder="请输入手机号"> | |||||
<img class="inp_icon" src="~/Content/images/Login/default_account0.png" alt=""> <input id="phone" type="text" placeholder="请输入用户绑定的手机号"> | |||||
</div> | </div> | ||||
<div class="lr-login-input"> | <div class="lr-login-input"> | ||||
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="newpassword" type="password" placeholder="请输入新密码"> | <img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="newpassword" type="password" placeholder="请输入新密码"> | ||||
@@ -156,7 +156,7 @@ | |||||
<add key="ACIp" value="192.168.90.2"/> | <add key="ACIp" value="192.168.90.2"/> | ||||
<add key="ACIp2" value="192.168.200.252"/> | <add key="ACIp2" value="192.168.200.252"/> | ||||
<!-- 是否强制验证强密码 --> | <!-- 是否强制验证强密码 --> | ||||
<add key="verifypwd" value="false"/> | |||||
<add key="verifypwd" value="true"/> | |||||
<!--疫情防控组角色Id--> | <!--疫情防控组角色Id--> | ||||
<add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" /> | <add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" /> | ||||
<!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc--> | <!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc--> | ||||
@@ -1,13 +1,13 @@ | |||||
<template> | <template> | ||||
<view class="page"> | <view class="page"> | ||||
<view class="content" v-if="type == 'sendCode'"> | <view class="content" v-if="type == 'sendCode'"> | ||||
<l-input v-model="phone" placeholder="请输入手机号" left> | |||||
<l-input v-model="phone" placeholder="请输入用户绑定的手机号" left> | |||||
<l-icon slot="title" type="phone" /> | <l-icon slot="title" type="phone" /> | ||||
</l-input> | </l-input> | ||||
<view class="btn" @click="sendCode">发送验证码</view> | <view class="btn" @click="sendCode">发送验证码</view> | ||||
</view> | </view> | ||||
<view class="content" v-if="type == 'checkCode'"> | <view class="content" v-if="type == 'checkCode'"> | ||||
<l-input v-model="phone" placeholder="请输入手机号" left disabled> | |||||
<l-input v-model="phone" placeholder="请输入用户绑定的手机号" left disabled> | |||||
<l-icon slot="title" type="phone" /> | <l-icon slot="title" type="phone" /> | ||||
</l-input> | </l-input> | ||||
<l-input v-model="verifycode" placeholder="请输入验证码" left password> | <l-input v-model="verifycode" placeholder="请输入验证码" left password> | ||||
@@ -20,7 +20,7 @@ | |||||
<view class="btn" @click="checkverifycode">下一步</view> | <view class="btn" @click="checkverifycode">下一步</view> | ||||
</view> | </view> | ||||
<view class="content" v-if="type == 'setPassword'"> | <view class="content" v-if="type == 'setPassword'"> | ||||
<l-input v-model="phone" placeholder="请输入手机号" left disabled> | |||||
<l-input v-model="phone" placeholder="请输入用户绑定的手机号" left disabled> | |||||
<l-icon slot="title" type="phone" /> | <l-icon slot="title" type="phone" /> | ||||
</l-input> | </l-input> | ||||
<l-input v-model="form.newpassword" placeholder="请输入新密码" left password> | <l-input v-model="form.newpassword" placeholder="请输入新密码" left password> | ||||
@@ -42,7 +42,7 @@ | |||||
// newPwd, | // newPwd, | ||||
// confirmPwd | // confirmPwd | ||||
// } = this | // } = this | ||||
if (this.oldPwd.length < 6) { | |||||
if (this.oldPwd.length != 8) { | |||||
this.CONFIRM('操作失败', '旧密码输入不正确,请重新确认') | this.CONFIRM('操作失败', '旧密码输入不正确,请重新确认') | ||||
return | return | ||||
} | } | ||||