fix: Optimize UserConfirmDialog to send code via email

This commit is contained in:
halo 2025-04-07 20:43:31 +08:00 committed by Bryan
parent a3a875bc28
commit 61bb8c07c4

View File

@ -67,13 +67,13 @@
style="width: 100%; height: 800px;border: none;" style="width: 100%; height: 800px;border: none;"
/> />
<span v-if="subTypeSelected === 'sms'" style="margin: -1px 0 0 20px;"> <span v-if="subTypeSelected === 'sms' || subTypeSelected === 'email'" style="margin: -1px 0 0 20px;">
<el-button <el-button
:disabled="smsBtnDisabled" :disabled="smsBtnDisabled"
size="mini" size="mini"
style="line-height: 14px; float: right;" style="line-height: 14px; float: right;"
type="primary" type="primary"
@click="sendSMSCode" @click="sendCode"
> >
{{ smsBtnText }} {{ smsBtnText }}
</el-button> </el-button>
@ -204,8 +204,8 @@ export default {
logout() { logout() {
window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}` window.location.href = `${process.env.VUE_APP_LOGOUT_PATH}?next=${this.$route.fullPath}`
}, },
sendSMSCode() { sendCode() {
this.$axios.post(`/api/v1/authentication/mfa/select/`, { type: 'sms' }).then(res => { this.$axios.post(`/api/v1/authentication/mfa/select/`, { type: this.subTypeSelected }).then(res => {
this.$message.success(this.$tc('VerificationCodeSent')) this.$message.success(this.$tc('VerificationCodeSent'))
let time = 60 let time = 60
this.smsBtnDisabled = true this.smsBtnDisabled = true