Browse Source

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

Michael Wang 4 năm trước cách đây
mục cha
commit
49b7c0bce9
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  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();