Selaa lähdekoodia

选项数量超过26个校验

xiatian 3 vuotta sitten
vanhempi
commit
11473c0ec9
1 muutettua tiedostoa jossa 11 lisäystä ja 11 poistoa
  1. 11 11
      src/modules/questions/views/EditSelectQuestion.vue

+ 11 - 11
src/modules/questions/views/EditSelectQuestion.vue

@@ -415,13 +415,15 @@ export default {
           .catch(() => {});
       } else {
         this.fullscreenLoading = true;
-        this.$http.put(QUESTION_API + "/question", this.quesModel).then(() => {
-          this.$notify({
-            message: "保存成功",
-            type: "success",
-          });
-          this.fullscreenLoading = false;
-        });
+        this.$httpWithMsg
+          .put(QUESTION_API + "/question", this.quesModel)
+          .then(() => {
+            this.$notify({
+              message: "保存成功",
+              type: "success",
+            });
+          })
+          .finally(() => (this.fullscreenLoading = false));
       }
     },
     //新增试题
@@ -434,7 +436,7 @@ export default {
         return false;
       }
       this.fullscreenLoading = true;
-      this.$http
+      this.$httpWithMsg
         .post(
           QUESTION_API +
             "/paper/addQuestion/" +
@@ -451,9 +453,7 @@ export default {
           });
           this.$router.push({ path: "/questions/question_list/0" });
         })
-        .catch(() => {
-          this.fullscreenLoading = false;
-        });
+        .finally(() => (this.fullscreenLoading = false));
     },
     //新增选项
     addQuesOption() {