xiatian 2 vuotta sitten
vanhempi
commit
a7bee49e7b
1 muutettua tiedostoa jossa 6 lisäystä ja 9 poistoa
  1. 6 9
      src/modules/questions/views/EditPaper.vue

+ 6 - 9
src/modules/questions/views/EditPaper.vue

@@ -1514,7 +1514,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetailUnit/sub/" +
@@ -1531,9 +1531,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }
@@ -1570,7 +1569,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetailUnit/" +
@@ -1587,9 +1586,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }
@@ -1625,7 +1623,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetail/" +
@@ -1642,9 +1640,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }