Commit fc0e1ef7 authored by 王李辉's avatar 王李辉

密码校验修改至少为二级

parent 860bb885
Pipeline #8858 passed with stage
in 5 minutes and 16 seconds
......@@ -30,9 +30,9 @@
:rules="[
{ required: true, message: '请填写密码' },
{
message: '密码必须大于6个字符小于20个字符',
message: '密码必须大于8个字符小于30个字符',
validator: (val) => {
return val['length'] >= 6 && val['length'] < 20;
return val['length'] >= 8 && val['length'] < 30;
},
},
]"
......@@ -40,7 +40,7 @@
<!-- 密码等级提示 -->
<van-cell-group>
<div class="intensity">
<div style="width: 8.2em; margin-right: 0.32rem;"></div>
<div style="width: 8.2em;"></div>
<div>
<div class="pass-level">
<span class="psdText">密码强度</span>
......@@ -61,9 +61,9 @@
:rules="[
{ validator, required: true, message: '二次密码输入不一致' },
{
message: '密码必须大于等于6个字符小于20个字符',
message: '密码必须大于等于8个字符小于30个字符',
validator: (val) => {
return val['length'] >= 6 && val['length'] < 20;
return val['length'] >= 8 && val['length'] < 30;
},
},
]"
......@@ -105,6 +105,12 @@ export default {
return this.form.newPassword == val;
},
onSubmit(val) {
// 判断level数组是否含有middle
let isMiddleLevel = this.level.includes('middle')
if(!isMiddleLevel){
this.$toast.fail("密码等级较低")
return
}
this.$toast.loading({
message: "请求中...",
forbidClick: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment