This commit is contained in:
李志鹏
2026-05-22 13:36:51 +08:00
parent 2d95c3c976
commit c8fa11aa25
3 changed files with 35 additions and 39 deletions

View File

@@ -19,9 +19,9 @@
</el-form>
<div class="verify-box" v-if="index === 1">
<email-verify
type="FORGOT_PWD"
:email="formData.email"
@submit-email-code="onVerifyCode"
@resend-email-code="SendVerifyCode"
:is-show-other-login="false"
/>
</div>
@@ -104,10 +104,7 @@
const onSubmit1 = () => {
form1Ref.value?.validate?.((valid) => {
if (valid) {
AccountSendVerifyCode({
email: formData.email,
operationType: 'FORGOT_PWD'
}).then(() => {
SendVerifyCode().then(() => {
index.value = 1
})
} else {
@@ -115,12 +112,18 @@
}
})
}
const SendVerifyCode = async () => {
await AccountSendVerifyCode({
email: formData.email,
operationType: 'FORGET_PWD'
})
}
const onVerifyCode = (code: string) => {
if (!code) return
AccountVerifyCode({
email: formData.email,
emailVerifyCode: code,
operationType: 'FORGOT_PWD'
operationType: 'FORGET_PWD'
}).then(() => {
formData.code = code
index.value = 2