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

feat: 补充了新建题目后的提示消息

mjh пре 4 година
родитељ
комит
40839be38d
1 измењених фајлова са 8 додато и 2 уклоњено
  1. 8 2
      src/components/QuestionCreator/SingleQuestionCreator.vue

+ 8 - 2
src/components/QuestionCreator/SingleQuestionCreator.vue

@@ -130,7 +130,13 @@ export default {
       if (this.checkFormCompletion()) {
         let questionVO = this.formatQuestionVO2backend();
         let res = await this.$api.createQuestion(questionVO);
-        console.log(res);
+        if (res.status === 200) {
+          this.$message({
+            message: '新建题目成功!',
+            type: 'success'
+          });
+        }
+
       }
     },
 
@@ -234,7 +240,7 @@ export default {
 
     initSingleQuestionCreator() {
       this.form = {
-        content: "",
+        stem: "",
         type: 1,
         options: [
           {