Browse Source

防止按钮重复点击

Michael Wang 5 years ago
parent
commit
408ad85178
2 changed files with 7 additions and 2 deletions
  1. 1 1
      src/features/Login/Login.vue
  2. 6 1
      src/features/OnlineExam/OnlineExamList.vue

+ 1 - 1
src/features/Login/Login.vue

@@ -346,8 +346,8 @@ export default {
       if (this.disableLoginBtn) {
         return;
       }
-      await this.checkNewVersion();
       this.disableLoginBtn = true;
+      await this.checkNewVersion();
       this.loginBtnLoading = true;
       this.loginTimeout = setTimeout(() => {
         this.disableLoginBtn = false;

+ 6 - 1
src/features/OnlineExam/OnlineExamList.vue

@@ -190,8 +190,13 @@ export default {
       }
     },
     async enterExam(course) {
+      this.spinShow = true;
+      this.processingMessage = "正在检测断点续考信息...";
       const alreadyInExam = await this.checkExamInProgress();
-      if (alreadyInExam) return;
+      if (alreadyInExam) {
+        this.spinShow = false;
+        return;
+      }
 
       this.spinShow = true;
       this.processingMessage = "正在检测IP合法性...";