Browse Source

ZhuRui 完成题目审核

Leonezhurui 4 năm trước cách đây
mục cha
commit
0e22a09c8a
1 tập tin đã thay đổi với 3 bổ sung và 2 xóa
  1. 3 2
      src/components/checkQuestionCard.vue

+ 3 - 2
src/components/checkQuestionCard.vue

@@ -254,7 +254,8 @@ export default {
         },
 
         approve() { // 通过审核
-
+          const originalState = this.questionvo.state;
+          this.questionvo.state = "APPROVED";
             let record = {
                 userId: store.state.user.id,
                 operationType: "Approve",
@@ -267,7 +268,6 @@ export default {
                     });
                     console.log("checkQuestionCard-approve");
                     console.log(res);
-                    this.questionvo.state = "APPROVED";
                     record.questionId = res.data.result.id;
                     record.time = new Date();
                     // 审核通过,添加操作记录
@@ -284,6 +284,7 @@ export default {
                         title: '错误',
                         message: '通过失败'
                     });
+                    this.questionvo.state = originalState;
                     console.log(err);
                 })
             this.$emit("approved")