jichoi / lms_front star
구자현 구자현 08-20
240820 구자현 학습완료 로직 수정
@483e01d509e86eed1349d71a6b51a3687169af05
client/views/pages/main/Chapter/Chapter1.vue
--- client/views/pages/main/Chapter/Chapter1.vue
+++ client/views/pages/main/Chapter/Chapter1.vue
@@ -43,7 +43,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 1 } });
+        const { unit_id, book_id } = this.$route.query;
+        this.$router.push({ name: 'Dashboard', query: { value: 1, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter1_2.vue
--- client/views/pages/main/Chapter/Chapter1_2.vue
+++ client/views/pages/main/Chapter/Chapter1_2.vue
@@ -72,7 +72,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 1 } });
+        const { unit_id, book_id } = this.$route.query;
+        this.$router.push({ name: 'Dashboard', query: { value: 1, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter1_3.vue
--- client/views/pages/main/Chapter/Chapter1_3.vue
+++ client/views/pages/main/Chapter/Chapter1_3.vue
@@ -15,7 +15,7 @@
             <button class="completeBtn" @click="complete"> 학습 종료 </button>
         </div>
         <div class="flex justify-between align-center">
-            <div class="pre-btn" @click="goToPage('Dashboard')"><img src="../../../../resources/img/left.png" alt="">
+            <div class="pre-btn" @click="goToPage('Chapter1_2')"><img src="../../../../resources/img/left.png" alt="">
             </div>
             <div class="content title-box">
                 <div class="listenGroup">
@@ -47,7 +47,8 @@
     },
     methods: {
         complete() {
-            this.$router.push({ name: 'Dashboard', query: { value: 1 } });
+            const { unit_id, book_id } = this.$route.query;
+            this.$router.push({ name: 'Dashboard', query: { value: 1, unit_id, book_id } });
         },
         goToPage(page) {
             this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2.vue
--- client/views/pages/main/Chapter/Chapter2.vue
+++ client/views/pages/main/Chapter/Chapter2.vue
@@ -190,7 +190,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: "Dashboard", query: { value: 2 } });
+        const { unit_id, book_id } = this.$route.query;
+        this.$router.push({ name: 'Dashboard', query: { value: 2, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_10.vue
--- client/views/pages/main/Chapter/Chapter2_10.vue
+++ client/views/pages/main/Chapter/Chapter2_10.vue
@@ -113,7 +113,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 3 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 3, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_11.vue
--- client/views/pages/main/Chapter/Chapter2_11.vue
+++ client/views/pages/main/Chapter/Chapter2_11.vue
@@ -95,7 +95,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 3 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 3, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_13.vue
--- client/views/pages/main/Chapter/Chapter2_13.vue
+++ client/views/pages/main/Chapter/Chapter2_13.vue
@@ -126,7 +126,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 3 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 3, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_2.vue
--- client/views/pages/main/Chapter/Chapter2_2.vue
+++ client/views/pages/main/Chapter/Chapter2_2.vue
@@ -108,7 +108,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: "Dashboard", query: { value: 2 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 2, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_3.vue
--- client/views/pages/main/Chapter/Chapter2_3.vue
+++ client/views/pages/main/Chapter/Chapter2_3.vue
@@ -164,7 +164,8 @@
     },
     methods: {
         complete() {
-            this.$router.push({ name: 'Dashboard', query: { value: 2 } });
+            const { unit_id, book_id } = this.$route.query;
+            this.$router.push({ name: 'Dashboard', query: { value: 2, unit_id, book_id } });
         },
         goToPage(page) {
             this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_4.vue
--- client/views/pages/main/Chapter/Chapter2_4.vue
+++ client/views/pages/main/Chapter/Chapter2_4.vue
@@ -111,7 +111,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: "Dashboard", query: { value: 2 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 2, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_5.vue
--- client/views/pages/main/Chapter/Chapter2_5.vue
+++ client/views/pages/main/Chapter/Chapter2_5.vue
@@ -100,7 +100,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 3 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 3, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_6.vue
--- client/views/pages/main/Chapter/Chapter2_6.vue
+++ client/views/pages/main/Chapter/Chapter2_6.vue
@@ -93,7 +93,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 3 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 3, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_7.vue
--- client/views/pages/main/Chapter/Chapter2_7.vue
+++ client/views/pages/main/Chapter/Chapter2_7.vue
@@ -72,7 +72,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 4 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 4, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_8.vue
--- client/views/pages/main/Chapter/Chapter2_8.vue
+++ client/views/pages/main/Chapter/Chapter2_8.vue
@@ -83,7 +83,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: 'Dashboard', query: { value: 11 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 11, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter2_9.vue
--- client/views/pages/main/Chapter/Chapter2_9.vue
+++ client/views/pages/main/Chapter/Chapter2_9.vue
@@ -180,7 +180,8 @@
   },
   methods: {
     complete() {
-      this.$router.push({ name: "Dashboard", query: { value: 2 } });
+      const { unit_id, book_id } = this.$route.query;
+      this.$router.push({ name: 'Dashboard', query: { value: 2, unit_id, book_id } });
     },
     goToPage(page) {
       this.$router.push({ name: page });
client/views/pages/main/Chapter/Chapter3.vue
--- client/views/pages/main/Chapter/Chapter3.vue
+++ client/views/pages/main/Chapter/Chapter3.vue
@@ -91,7 +91,8 @@
     },
     methods: {
         complete() {
-            this.$router.push({ name: "Dashboard", query: { value: 8 } });
+            const { unit_id, book_id } = this.$route.query;
+            this.$router.push({ name: 'Dashboard', query: { value: 8, unit_id, book_id } });
         },
         goToPage(page) {
             this.$router.push({ name: page });
client/views/pages/main/Dashboard.vue
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
@@ -530,7 +530,8 @@
             }
         },
         goToPage(page) {
-            this.$router.push({ name: page });
+            const { unit_id, book_id } = this.$route.query;
+            this.$router.push({ name: page, query: { unit_id, book_id } });
         },
         openCameraModal() {
             this.closeModal();
@@ -905,9 +906,10 @@
         SvgIcon,
     },
     mounted() {
-        const { schdl_id, book_id, unit_id } = this.$route.query;
+        const { book_id, unit_id } = this.$route.query;
         console.log('main mounted');
         this.fetchSchedule(unit_id, book_id);
+        this.fetchRoadmapData(unit_id, book_id);
         this.fetchRabbit();
     },
     computed: {
Add a comment
List