Преглед изворни кода

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

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();