mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 20:57:17 +08:00
fix: 修复验证码长度限制错误
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
<GiForm ref="formRef" v-model="form" :options="options" :columns="columns">
|
<GiForm ref="formRef" v-model="form" :options="options" :columns="columns">
|
||||||
<template #captcha>
|
<template #captcha>
|
||||||
<a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="4" allow-clear style="flex: 1 1" />
|
<a-input v-model="form.captcha" placeholder="请输入验证码" :max-length="6" allow-clear style="flex: 1 1" />
|
||||||
<a-button
|
<a-button
|
||||||
class="captcha-btn"
|
class="captcha-btn"
|
||||||
:loading="captchaLoading"
|
:loading="captchaLoading"
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from '@vueuse/core'
|
||||||
import { Message } from '@arco-design/web-vue'
|
import { Message } from '@arco-design/web-vue'
|
||||||
// import { getSmsCaptcha, getEmailCaptcha, updateUserEmail, updateUserPhone } from '@/apis'
|
import { getEmailCaptcha, updateUserEmail, updateUserPassword } from '@/apis'
|
||||||
import { updateUserPassword } from '@/apis'
|
|
||||||
import { encryptByRsa } from '@/utils/encrypt'
|
import { encryptByRsa } from '@/utils/encrypt'
|
||||||
import { useUserStore } from '@/stores'
|
import { useUserStore } from '@/stores'
|
||||||
import { type Columns, GiForm } from '@/components/GiForm'
|
import { type Columns, GiForm } from '@/components/GiForm'
|
||||||
@@ -199,9 +199,9 @@ const getCaptcha = async () => {
|
|||||||
// phone: form.phone
|
// phone: form.phone
|
||||||
// })
|
// })
|
||||||
} else if (verifyType.value === 'email') {
|
} else if (verifyType.value === 'email') {
|
||||||
// await getEmailCaptcha({
|
await getEmailCaptcha({
|
||||||
// email: form.email
|
email: form.email
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
captchaLoading.value = false
|
captchaLoading.value = false
|
||||||
captchaDisable.value = true
|
captchaDisable.value = true
|
||||||
@@ -234,11 +234,11 @@ const save = async () => {
|
|||||||
// oldPassword: encryptByRsa(form.oldPassword) as string
|
// oldPassword: encryptByRsa(form.oldPassword) as string
|
||||||
// })
|
// })
|
||||||
} else if (verifyType.value === 'email') {
|
} else if (verifyType.value === 'email') {
|
||||||
// await updateUserEmail({
|
await updateUserEmail({
|
||||||
// email: form.email,
|
email: form.email,
|
||||||
// captcha: form.captcha,
|
captcha: form.captcha,
|
||||||
// oldPassword: encryptByRsa(form.oldPassword) as string
|
oldPassword: encryptByRsa(form.oldPassword) as string
|
||||||
// })
|
})
|
||||||
} else if (verifyType.value === 'password') {
|
} else if (verifyType.value === 'password') {
|
||||||
if (form.newPassword !== form.rePassword) {
|
if (form.newPassword !== form.rePassword) {
|
||||||
Message.error('两次新密码不一致')
|
Message.error('两次新密码不一致')
|
||||||
|
Reference in New Issue
Block a user