Просмотр исходного кода

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

Michael Wang 4 лет назад
Родитель
Сommit
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();