|
|
|
@ -139,10 +139,15 @@ const onCopy = async () => {
|
|
|
|
|
|
|
|
|
|
const loadMfaCodeBefore = async (formEl: FormInstance | undefined) => {
|
|
|
|
|
if (!formEl) return;
|
|
|
|
|
formEl.validate(async (valid) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
const result = await formEl.validateField('interval', callback);
|
|
|
|
|
if (!result) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const result2 = await formEl.validateField('title', callback);
|
|
|
|
|
if (!result2) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
loadMfaCode();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const loadMfaCode = async () => {
|
|
|
|
|
let param = {
|
|
|
|
@ -154,6 +159,14 @@ const loadMfaCode = async () => {
|
|
|
|
|
qrImage.value = res.data.qrImage;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function callback(error: any) {
|
|
|
|
|
if (error) {
|
|
|
|
|
return error.message;
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const onBind = async (formEl: FormInstance | undefined) => {
|
|
|
|
|
if (!formEl) return;
|
|
|
|
|
formEl.validate(async (valid) => {
|
|
|
|
|