Browse Source

1、登录密码到期提示明确到期时间

2、修复密码策略重置错误
hella_online_20240913
bjang03 2 months ago
parent
commit
f9eaa8acd5
  1. 18
      src/views/login/components/LoginForm.vue
  2. 16
      src/views/system/passwordRule/index.vue

18
src/views/login/components/LoginForm.vue

@ -260,14 +260,7 @@
console.log('登陆res',res)
const differenceDays = await PassWordApi.validateResetTime(res.userId)
switch (differenceDays){
case -1:
await ElMessageBox.alert(
'<strong>密码即将到期,请尽快修改。</strong>',
'重要提示',
{
dangerouslyUseHTMLString: true,
}
)
case null:
break
case 0:
await ElMessageBox.alert(
@ -288,6 +281,15 @@
}
)
return
default:
await ElMessageBox.alert(
'密码'+differenceDays+'到期,请尽快修改。',
'重要提示',
{
dangerouslyUseHTMLString: true,
}
)
break
}
if (!res) {
console.log('登录-195')

16
src/views/system/passwordRule/index.vue

@ -29,7 +29,7 @@
<el-form-item label="试错次数" prop="tryCount">
<el-input-number
v-model="passwordConfig.tryCount"
:min="0"
:min="3"
:precision="0"
style="margin-right: 10px"
/>
@ -39,7 +39,7 @@
<el-form-item label="锁定时长" prop="lockMinutes">
<el-input-number
v-model="passwordConfig.lockMinutes"
:min="0"
:min="1"
:precision="0"
style="margin-right: 10px"
/>
@ -49,7 +49,7 @@
<el-form-item label="试错次数" prop="tryCount">
<el-input-number
v-model="passwordConfig.dayTryCount"
:min="0"
:min="3"
:precision="0"
style="margin-right: 10px"
/>
@ -59,7 +59,7 @@
<el-form-item label="更新周期" prop="updatePeriod">
<el-input-number
v-model="passwordConfig.updatePeriod"
:min="0"
:min="3"
:precision="0"
style="margin-right: 10px"
/>
@ -69,7 +69,7 @@
<el-form-item label="更新预警期" prop="updateRemind">
<el-input-number
v-model="passwordConfig.updateRemind"
:min="0"
:min="1"
:precision="0"
style="margin-right: 10px"
/>
@ -109,8 +109,9 @@ const reset = () => {
ruleDesc: "",
tryCount: 3,
lockMinutes: 1,
updatePeriod: 1,
updatePeriod: 30,
dayTryCount: 3,
updateRemind: 7,
}
}
const passwordConfig = ref({
@ -119,8 +120,9 @@ const passwordConfig = ref({
ruleDesc: "",
tryCount: 3,
lockMinutes: 1,
updatePeriod: 1,
updatePeriod: 30,
dayTryCount: 3,
updateRemind: 7,
})
/** 查询配置 */
const getConfig = async () => {

Loading…
Cancel
Save