feat: 重置密码倒计时机制修改

This commit is contained in:
zhangyahui
2025-10-31 14:54:42 +08:00
parent 8353e81a0f
commit d98bedd663
2 changed files with 105 additions and 19 deletions

View File

@@ -22,7 +22,6 @@
v-else-if="step === 'verify'"
:ct="emailCode"
@nextStep="handleCheckVerifyCode"
@resend="handleSendVerifyCode"
/>
<Password v-else-if="step === 'password'" @sucess="handleSuccess" />
</div>
@@ -42,7 +41,7 @@ import Mail from './components/Mail.vue'
import Verify from './components/Verify.vue'
import Password from './components/Password.vue'
import { showToast } from 'vant'
import { precheckEmail, resetPassword } from '@/api/login'
import { resetPassword } from '@/api/login'
import { encryptPassword } from '@/utils/tools'
const router = useRouter()
@@ -80,10 +79,8 @@ const handleSendVerifyCode = (data: any) => {
if (data?.email) {
fromData.value.email = data?.email
}
precheckEmail({ email: fromData.value.email }).then(() => {
showToast('the verification code has been sent to your email')
handleStep('verify')
})
// 只切换步骤,验证码的发送由 Verify 组件负责
handleStep('verify')
}
const handleCheckVerifyCode = (data: any) => {