flx:防止连续点击登录

This commit is contained in:
X_Rian 2024-06-24 15:05:55 +08:00
parent 2f5f2f7c89
commit b37a486a1f

View File

@ -152,6 +152,7 @@
:disabled="pass"
class="logo_btn"
@click="loginFn"
:loading="isLoadingBtn"
>{{ $t("message.login.login") }}
</el-button>
</div>
@ -422,6 +423,7 @@ export default {
components: { getcode, LoginInfo },
data() {
return {
isLoadingBtn: false,
isShowContent: false,
addPasswordDialog: false,
passwordForm: {
@ -817,6 +819,7 @@ export default {
this.$refs["LoginInfo"].$refs["form"].validate((valid) => {
// console.log("this.$refs['LoginInfo']:", this.$refs["LoginInfo"]);
if (valid) {
this.isLoadingBtn = true;
if (LOGINTYPE == 1) {
loginApi(this.form).then((res) => {
console.log("--------------------么么儿们10");
@ -837,6 +840,8 @@ export default {
}
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}).finally(() => {
this.isLoadingBtn = false;
});
} else if (LOGINTYPE == 2) {
console.log(2222222222222);
@ -856,9 +861,12 @@ export default {
}
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}).finally(() => {
this.isLoadingBtn = false;
});
} else if (LOGINTYPE == 5) {
console.log("中建四局项目账号");
this.isLoadingBtn = false;
} else if (LOGINTYPE == 3) {
console.log(333333333);
@ -878,6 +886,8 @@ export default {
}
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}).finally(() => {
this.isLoadingBtn = false;
});
}
} else {
@ -888,6 +898,7 @@ export default {
} else if (this.projectType == "common") {
this.$refs["form"].validate((valid) => {
if (valid) {
this.isLoadingBtn = true;
if (LOGINTYPE == 1) {
let timestamp = Date.now();
let md5Password = MD5(
@ -922,6 +933,8 @@ export default {
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}
}).finally(() => {
this.isLoadingBtn = false;
});
} else if (LOGINTYPE == 2) {
console.log(2222222222222);
@ -942,6 +955,8 @@ export default {
}
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}).finally(() => {
this.isLoadingBtn = false;
});
} else if (LOGINTYPE == 3) {
console.log(333333333);
@ -962,6 +977,8 @@ export default {
}
this.parseLoginData(res.result);
this.getDetail(this.headquartersSnData);
}).finally(() => {
this.isLoadingBtn = false;
});
}
} else {
@ -974,6 +991,7 @@ export default {
} else {
this.$refs["form2"].validate((valid) => {
if (valid) {
this.isLoadingBtn = true;
loginPhoneApi(this.form2).then((res) => {
// ()
if (this.loginType == 1 && res.result.accountType == 11) {
@ -985,6 +1003,8 @@ export default {
return;
}
this.parseLoginData(res.result);
}).finally(() => {
this.isLoadingBtn = false;
});
} else {
console.log("error submit!!");