diff --git a/ui/src/layout/components/top-bar/avatar/ResetPassword.vue b/ui/src/layout/components/top-bar/avatar/ResetPassword.vue index 4782f0b4c..02e332b67 100644 --- a/ui/src/layout/components/top-bar/avatar/ResetPassword.vue +++ b/ui/src/layout/components/top-bar/avatar/ResetPassword.vue @@ -6,10 +6,10 @@ :close-on-press-escape="false" >

{{ $t('layout.topbar.avatar.dialog.newPassword') }}

@@ -32,6 +32,13 @@ > +
+

{{ $t('layout.topbar.avatar.dialog.useEmail') }}

({ re_password: '' }) -const resetPasswordFormRef = ref() +const resetPasswordFormRef1 = ref() +const resetPasswordFormRef2 = ref() const loading = ref(false) const isDisabled = ref(false) const time = ref(60) -const rules = ref>({ - // @ts-ignore - code: [ - { - required: true, - message: t('layout.topbar.avatar.dialog.enterVerificationCode'), - trigger: 'blur' - } - ], +const rules1 = ref>({ password: [ { required: true, @@ -149,14 +149,26 @@ const rules = ref>({ } ] }) +const rules2 = ref>({ + // @ts-ignore + code: [ + { + required: true, + message: t('layout.topbar.avatar.dialog.enterVerificationCode'), + trigger: 'blur' + } + ] +}) /** * 发送验证码 */ const sendEmail = () => { - UserApi.sendEmailToCurrent(loading).then(() => { - MsgSuccess(t('layout.topbar.avatar.dialog.verificationCodeSentSuccess')) - isDisabled.value = true - handleTimeChange() + resetPasswordFormRef1.value?.validate().then(() => { + UserApi.sendEmailToCurrent(loading).then(() => { + MsgSuccess(t('layout.topbar.avatar.dialog.verificationCodeSentSuccess')) + isDisabled.value = true + handleTimeChange() + }) }) } @@ -179,20 +191,23 @@ const open = () => { re_password: '' } resetPasswordDialog.value = true - resetPasswordFormRef.value?.resetFields() + resetPasswordFormRef1.value?.resetFields() + resetPasswordFormRef2.value?.resetFields() } const resetPassword = () => { - resetPasswordFormRef.value - ?.validate() - .then(() => { - return UserApi.resetCurrentUserPassword(resetPasswordForm.value) - }) - .then(() => { - return user.logout() - }) - .then(() => { - router.push({ name: 'login' }) - }) + resetPasswordFormRef1.value?.validate().then(() => { + resetPasswordFormRef2.value + ?.validate() + .then(() => { + return UserApi.resetCurrentUserPassword(resetPasswordForm.value) + }) + .then(() => { + return user.logout() + }) + .then(() => { + router.push({ name: 'login' }) + }) + }) } const close = () => { resetPasswordDialog.value = false diff --git a/ui/src/views/application-workflow/component/PublishHistory.vue b/ui/src/views/application-workflow/component/PublishHistory.vue index 3f3f0cf57..d66d7fb94 100644 --- a/ui/src/views/application-workflow/component/PublishHistory.vue +++ b/ui/src/views/application-workflow/component/PublishHistory.vue @@ -1,7 +1,7 @@