瀏覽代碼

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

Michael Wang 4 年之前
父節點
當前提交
49b7c0bce9
共有 1 個文件被更改,包括 14 次插入0 次删除
  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();