소스 검색

fixed #122

ali 3 년 전
부모
커밋
98bd654e74
1개의 변경된 파일과 11개의 추가작업 그리고 1개의 파일을 삭제
  1. 11 1
      src/components/Widgets/Other/ShowClassroomInfo/ShowClassroomInfo.vue

+ 11 - 1
src/components/Widgets/Other/ShowClassroomInfo/ShowClassroomInfo.vue

@@ -332,6 +332,16 @@ export default {
       this.loading = false
     },
 
+    reloadClassroom () {
+      this.getClassroom()
+        .then((classroom) => {
+          this.prefetchServerDataPromiseThen(classroom)
+        })
+        .catch(() => {
+          this.prefetchServerDataPromiseCatch()
+        })
+    },
+
     getTitledDateTime (dateTime) {
       return ShamsiDate.getTitledDateTime(dateTime)
     },
@@ -355,7 +365,7 @@ export default {
         APIGateway.classroom.dropByUser(classroomId)
           .then(() => {
             this.dropLoading = false
-            this.getClassroom()
+            this.reloadClassroom()
           })
           .catch(() => {
             this.dropLoading = false