diff --git a/pages/start/login/login.vue b/pages/start/login/login.vue index d205242..5556e35 100644 --- a/pages/start/login/login.vue +++ b/pages/start/login/login.vue @@ -431,6 +431,15 @@ function basicVerification() { }); return false; } + + if (password.value.length < 8) { + uni.showToast({ + title: "密码长度不能少于8位", + icon: "none", + }); + return false; + } + } if (switchType.value === "Phone") { diff --git a/pages/start/recoverPassword/recoverPassword.vue b/pages/start/recoverPassword/recoverPassword.vue index ec97d90..4fff637 100644 --- a/pages/start/recoverPassword/recoverPassword.vue +++ b/pages/start/recoverPassword/recoverPassword.vue @@ -335,6 +335,14 @@ async function register() { return; } + if (newPasswordFirst.value.length < 8) { + uni.showToast({ + title: "密码长度不能少于8位", + icon: "none", + }); + return false; + } + const account = changeAccount(); const res = await forgetApi({