xiatian 2 vuotta sitten
vanhempi
commit
3111fdcc88
1 muutettua tiedostoa jossa 6 lisäystä ja 14 poistoa
  1. 6 14
      src/modules/questions/views/GenPaperDetail.vue

+ 6 - 14
src/modules/questions/views/GenPaperDetail.vue

@@ -988,27 +988,19 @@ export default {
       var url = QUESTION_API + "/genPaper/manual";
 
       this.fullscreenLoading = true;
-      this.$http.post(url, this.genPaper).then(
-        (res) => {
+      this.$httpWithMsg
+        .post(url, this.genPaper)
+        .then((res) => {
           this.$notify({
             message: "组卷成功",
             type: "success",
           });
           this.fullscreenLoading = false;
-          // let paperId = response.data.paper.id;
-          // this.$router.push({
-          //   path: "/edit_paper/" + paperId + "/gen_paper",
-          // });
           this.back(res.data.status);
-        },
-        (error) => {
-          this.$notify({
-            message: error.response.data.msg,
-            type: "error",
-          });
+        })
+        .finally(() => {
           this.fullscreenLoading = false;
-        }
-      );
+        });
     },
     confirmGenPaper() {
       if (!this.checkGenPaper()) {