Commit c97ea5b3 by 姜雷

添加注册密码校验

parent d2566cb5
...@@ -119,14 +119,14 @@ class Register extends Component { ...@@ -119,14 +119,14 @@ class Register extends Component {
}); });
return false; return false;
} }
if (!pwd) { if (!pwd || pwd.length < 6) {
Taro.showToast({ Taro.showToast({
title: '请输入密码', title: '请输入密码',
icon: 'none', icon: 'none',
}); });
return false; return false;
} }
if (!checkPwd) { if (!checkPwd || checkPwd.length < 6) {
Taro.showToast({ Taro.showToast({
title: '请输入确认密码', title: '请输入确认密码',
icon: 'none', icon: 'none',
...@@ -135,7 +135,7 @@ class Register extends Component { ...@@ -135,7 +135,7 @@ class Register extends Component {
} }
if (pwd != checkPwd) { if (pwd != checkPwd) {
Taro.showToast({ Taro.showToast({
title: '请输入确认密码', title: '两次密码不一致',
icon: 'none', icon: 'none',
}); });
return false; return false;
......
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