File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,11 @@ const rules = ref<FormRules<CheckCodeRequest>>({
112
112
const loading = ref <boolean >(false )
113
113
const isDisabled = ref <boolean >(false )
114
114
const time = ref <number >(60 )
115
-
115
+ const sendLoading = ref < boolean >( false )
116
116
const checkCode = () => {
117
117
resetPasswordFormRef .value
118
118
?.validate ()
119
- .then (() => UserApi .checkCode (CheckEmailForm .value , loading ))
119
+ .then (() => UserApi .checkCode (CheckEmailForm .value , sendLoading ))
120
120
.then (() => router .push ({ name: ' reset_password' , params: CheckEmailForm .value }))
121
121
}
122
122
/**
@@ -125,7 +125,7 @@ const checkCode = () => {
125
125
const sendEmail = () => {
126
126
resetPasswordFormRef .value ?.validateField (' email' , (v : boolean ) => {
127
127
if (v ) {
128
- UserApi .sendEmit (CheckEmailForm .value .email , ' reset_password' , loading ).then (() => {
128
+ UserApi .sendEmit (CheckEmailForm .value .email , ' reset_password' , sendLoading ).then (() => {
129
129
MsgSuccess (t (' views.login.verificationCode.successMessage' ))
130
130
isDisabled .value = true
131
131
handleTimeChange ()
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ import type { FormInstance, FormRules } from 'element-plus'
66
66
import UserApi from ' @/api/user'
67
67
import { t } from ' @/locales'
68
68
import useStore from ' @/stores'
69
+
69
70
const { user } = useStore ()
70
71
const router = useRouter ()
71
72
const route = useRoute ()
@@ -133,10 +134,11 @@ const rules = ref<FormRules<ResetPasswordRequest>>({
133
134
})
134
135
const resetPasswordFormRef = ref <FormInstance >()
135
136
const loading = ref <boolean >(false )
137
+ const sendLoading = ref <boolean >(false )
136
138
const resetPassword = () => {
137
139
resetPasswordFormRef .value
138
140
?.validate ()
139
- .then (() => UserApi .resetPassword (resetPasswordForm .value , loading ))
141
+ .then (() => UserApi .resetPassword (resetPasswordForm .value , sendLoading ))
140
142
.then (() => {
141
143
MsgSuccess (t (' common.modifySuccess' ))
142
144
router .push ({ name: ' login' })
You can’t perform that action at this time.
0 commit comments