aaa
This commit is contained in:
@@ -71,9 +71,9 @@ export const Logout = () => {
|
||||
* @param data.verificationCode 验证码
|
||||
* @returns 忘记密码成功后的token
|
||||
*/
|
||||
export const ForgetPassword = (data) => {
|
||||
export const ForgotPassword = (data) => {
|
||||
return request({
|
||||
url: '/api/user/forget-password',
|
||||
url: '/api/user/forgot-password',
|
||||
method: 'post',
|
||||
loading: true,
|
||||
data
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
enterName: 'Enter your name',
|
||||
enterEmail: 'Enter your email',
|
||||
enterPassword: 'Enter your password',
|
||||
forgetPassword: 'Forget password?',
|
||||
forgotPassword: 'Forget password?',
|
||||
pleaseInputName: 'Please input the name',
|
||||
nameLengthError: 'Name length must be between {min} and {max} characters',
|
||||
pleaseInputEmail: 'Please input the email',
|
||||
|
||||
@@ -13,7 +13,7 @@ export default {
|
||||
enterName: '请输入姓名',
|
||||
enterEmail: '请输入邮箱',
|
||||
enterPassword: '请输入密码',
|
||||
forgetPassword: '忘记密码?',
|
||||
forgotPassword: '忘记密码?',
|
||||
pleaseInputName: '请输入姓名',
|
||||
nameLengthError: '姓名长度必须在 {min} 到 {max} 个字符之间',
|
||||
pleaseInputEmail: '请输入邮箱',
|
||||
|
||||
@@ -145,9 +145,9 @@
|
||||
--el-border-color: #dfdfdf;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.retrieve-password > .right > .box:deep(.el-form) .forgetPassword,
|
||||
.register > .right > .box:deep(.el-form) .forgetPassword,
|
||||
.login > .right > .box:deep(.el-form) .forgetPassword {
|
||||
.retrieve-password > .right > .box:deep(.el-form) .forgotPassword,
|
||||
.register > .right > .box:deep(.el-form) .forgotPassword,
|
||||
.login > .right > .box:deep(.el-form) .forgotPassword {
|
||||
margin-top: -1.2rem;
|
||||
margin-bottom: 2rem;
|
||||
font-size: 1.6rem;
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.forgetPassword {
|
||||
.forgotPassword {
|
||||
margin-top: -1.2rem;
|
||||
margin-bottom: 2rem;
|
||||
font-size: 1.6rem;
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
name="password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="forgetPassword">
|
||||
<span @click="onForgetPassword">{{ $t('Login.forgetPassword') }}</span>
|
||||
<div class="forgotPassword">
|
||||
<span @click="onForgotPassword">{{ $t('Login.forgotPassword') }}</span>
|
||||
</div>
|
||||
<el-form-item prop="privacy" class="privacy">
|
||||
<el-checkbox v-model="formData.privacy">
|
||||
@@ -92,7 +92,7 @@
|
||||
router.back()
|
||||
}
|
||||
}
|
||||
const onForgetPassword = () => {
|
||||
const onForgotPassword = () => {
|
||||
router.push({ name: 'retrievepass' })
|
||||
}
|
||||
const visibleCodeRef = ref(null)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import md5 from 'md5'
|
||||
import { ForgetPassword } from '@/api/login'
|
||||
import { ForgotPassword } from '@/api/login'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { validateEmail, validatePass } from './tools'
|
||||
@@ -68,7 +68,7 @@
|
||||
email: [{ validator: validateEmail, trigger: 'blur' }],
|
||||
password: [{ validator: validatePass, trigger: 'blur' }]
|
||||
})
|
||||
const isVisible = ref(false)
|
||||
const isVisible = ref(true)
|
||||
const formData = reactive({
|
||||
email: '',
|
||||
password: ''
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
const onVerifyCode = (code: string) => {
|
||||
// console.log(code)
|
||||
ForgetPassword({
|
||||
ForgotPassword({
|
||||
email: formData.email,
|
||||
newPassword: md5(formData.password),
|
||||
verificationCode: code
|
||||
|
||||
Reference in New Issue
Block a user