Parcourir la source

登录页面:优化极验验证码过期逻辑

Michael Wang il y a 4 ans
Parent
commit
49b7c0bce9
1 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 14 0
      src/features/Login/Login.vue

+ 14 - 0
src/features/Login/Login.vue

@@ -276,6 +276,20 @@ export default {
       return isThisOrgUndefined ? allOrg : thisOrg;
     },
   },
+  watch: {
+    "loginForm.accountValue": function () {
+      if (Date.now() - this.resetGeeTime > 60 * 1000) {
+        this.captchaObj.destroy();
+        this.resetGeeTime = Date.now();
+      }
+    },
+    "loginForm.password": function () {
+      if (Date.now() - this.resetGeeTime > 60 * 1000) {
+        this.captchaObj.destroy();
+        this.resetGeeTime = Date.now();
+      }
+    },
+  },
   async mounted() {
     // this.testServiceWorker();