flx:去除验证码缓存

This commit is contained in:
Rain_ 2025-09-10 15:47:36 +08:00
parent a83a8c89ea
commit 0a635a38c5
2 changed files with 14 additions and 13 deletions

View File

@ -47,7 +47,7 @@ export default {
// this.canuse = res.canuse
// if(res.canuse){
if (!this.imgCode) {
this.$message.error("请输入验证码!"); //,
this.$message.error("请输入验证码"); //,
return;
}
//

View File

@ -109,6 +109,7 @@
<el-form-item label="" prop="account">
<el-input
v-model="form.account"
@input="imageCodeFlag = ''"
style="height: 53px; font-size: 16px"
:placeholder="$t('message.login.account_placeholder')"
>
@ -779,9 +780,9 @@ export default {
this.getDetail(this.headquartersSnData);
this.getData();
this.getImgCodeLogin();
if (window.localStorage.getItem("imageCodeFlag")) {
this.imageCodeFlag = window.localStorage.getItem("imageCodeFlag");
}
// if (window.localStorage.getItem("imageCodeFlag")) {
// this.imageCodeFlag = window.localStorage.getItem("imageCodeFlag");
// }
}
},
mounted() {
@ -1186,19 +1187,19 @@ export default {
} else {
this.imageCodeFlag = res.code;
}
if (this.imageCodeFlag == 3006) {
localStorage.setItem(
"imageCodeFlag",
JSON.stringify(this.imageCodeFlag)
);
}
// if (this.imageCodeFlag == 3006) {
// localStorage.setItem(
// "imageCodeFlag",
// JSON.stringify(this.imageCodeFlag)
// );
// }
this.getImgCodeLogin();
this.$message.error(res.message);
return;
}
if (window.localStorage.getItem("imageCodeFlag")) {
window.localStorage.removeItem("imageCodeFlag");
}
// if (window.localStorage.getItem("imageCodeFlag")) {
// window.localStorage.removeItem("imageCodeFlag");
// }
//
if (res.result.expire) {
this.addPasswordDialog = true;