Kaynağa Gözat

【修改】首次登录:强制改密弹框修改;

西昌分支
dyy 4 ay önce
ebeveyn
işleme
5670250526
12 değiştirilmiş dosya ile 143 ekleme ve 11 silme
  1. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  2. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  4. +35
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js
  5. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwdOfFirstLogin.cshtml
  6. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwdOfFirstLogin.js
  7. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js
  8. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js
  9. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/ForgotPassword.cshtml
  10. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  11. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/forgotPassword.vue
  12. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Dosyayı Görüntüle

@@ -73,6 +73,11 @@ namespace Learun.Application.Web.Controllers
{
return View();
}
public ActionResult ChangePwdOfFirstLogin()
{
return View();
}

#region 统一身份认证2.0
public ActionResult SSOApplication()


+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UserCenterController.cs Dosyayı Görüntüle

@@ -353,6 +353,20 @@ namespace Learun.Application.Web.Controllers
OperatorHelper.Instance.EmptyCurrent();
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]
[AjaxOnly]


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -4230,6 +4230,7 @@
<Content Include="Views\Home\AdminTop\Index.js" />
<Content Include="Views\Home\AdminWindos\Index.css" />
<Content Include="Views\Home\AdminWindos\Index.js" />
<Content Include="Views\Home\ChangePwdOfFirstLogin.js" />
<Content Include="Views\Home\FirstChangePwd.js" />
<Content Include="Views\Home\DataBaseInit.js" />
<Content Include="Views\Home\ChangePwd.js" />
@@ -8130,6 +8131,7 @@
<Content Include="Views\Home\FirstChangePwd.cshtml" />
<Content Include="Views\Login\ForgotPassword.cshtml" />
<Content Include="Views\Home\CancelWeiXinBindForm.cshtml" />
<Content Include="Views\Home\ChangePwdOfFirstLogin.cshtml" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />


+ 35
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js Dosyayı Görüntüle

@@ -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({
id: 'pwdform',
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({
id: 'pwdform',
title: '密码修改',


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwdOfFirstLogin.cshtml Dosyayı Görüntüle

@@ -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")

+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/ChangePwdOfFirstLogin.js Dosyayı Görüntüle

@@ -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();
}

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/FirstIndexWxLogin.js Dosyayı Görüntüle

@@ -155,7 +155,7 @@
if (res.data.pwd == true) {
//存储seesion
sessionStorage.setItem("pase_29d", "fs");
window.location.href = "/Home/Index?pwd=first";
window.location.href = "/Home/Index";
}
else {
window.location.href = "/Home/Index";


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/Default/Index.js Dosyayı Görüntüle

@@ -320,7 +320,7 @@
if (res.code == 200) {
if (res.data.pwd == true) {
//存储seesion
sessionStorage.setItem("pase_29d", "hm");
sessionStorage.setItem("pase_29d", "hmfl");
window.location.href = "/Home/Index";
}
} else {


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/ForgotPassword.cshtml Dosyayı Görüntüle

@@ -117,7 +117,7 @@
<div class="lr-login-bypsw">
<div class="error_info">*&nbsp;<span></span></div>
<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 class="lr-login-input">
<img class="inp_icon" src="~/Content/images/Login/default_psw0.png" alt=""><input id="newpassword" type="password" placeholder="请输入新密码">


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Dosyayı Görüntüle

@@ -156,7 +156,7 @@
<add key="ACIp" value="192.168.90.2"/>
<add key="ACIp2" value="192.168.200.252"/>
<!-- 是否强制验证强密码 -->
<add key="verifypwd" value="false"/>
<add key="verifypwd" value="true"/>
<!--疫情防控组角色Id-->
<add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" />
<!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc-->


+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/forgotPassword.vue Dosyayı Görüntüle

@@ -1,13 +1,13 @@
<template>
<view class="page">
<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-input>
<view class="btn" @click="sendCode">发送验证码</view>
</view>
<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-input>
<l-input v-model="verifycode" placeholder="请输入验证码" left password>
@@ -20,7 +20,7 @@
<view class="btn" @click="checkverifycode">下一步</view>
</view>
<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-input>
<l-input v-model="form.newpassword" placeholder="请输入新密码" left password>


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue Dosyayı Görüntüle

@@ -42,7 +42,7 @@
// newPwd,
// confirmPwd
// } = this
if (this.oldPwd.length < 6) {
if (this.oldPwd.length != 8) {
this.CONFIRM('操作失败', '旧密码输入不正确,请重新确认')
return
}


Yükleniyor…
İptal
Kaydet