Ver Fonte

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

mjh há 4 anos atrás
pai
commit
40839be38d

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

@@ -130,7 +130,13 @@ export default {
       if (this.checkFormCompletion()) {
       if (this.checkFormCompletion()) {
         let questionVO = this.formatQuestionVO2backend();
         let questionVO = this.formatQuestionVO2backend();
         let res = await this.$api.createQuestion(questionVO);
         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() {
     initSingleQuestionCreator() {
       this.form = {
       this.form = {
-        content: "",
+        stem: "",
         type: 1,
         type: 1,
         options: [
         options: [
           {
           {