zengyicheng 2 years ago
parent
commit
3c7c390910
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/components/pages/addCourse.vue

+ 6 - 1
src/components/pages/addCourse.vue

@@ -1075,6 +1075,7 @@ export default {
       courseTypeId: [],
       courseTypeSon: [],
       clearArray: [],
+      loading:false,
     };
   },
   computed: {
@@ -1867,6 +1868,7 @@ export default {
         this.ajax
           .get(this.$store.state.api + "select_course_detail", params)
           .then((res) => {
+            this.loading = true;
             this.unitJson = JSON.parse(res.data[0][0].chapters);
             // this.unitJson[0].chapterInfo = JSON.parse(res.data[0][0].chapters);
             for (var j in this.unitJson) {
@@ -1932,10 +1934,13 @@ export default {
     },
   },
   created() {
-    this.selectCourseDetail();
     this.getStudent();
     this.getTemplate();
     this.selectType();
+    this.loading = false;
+    setTimeout(() => {
+      this.selectCourseDetail();
+    }, 500);
   },
 };
 </script>