jichoi / lms_front star
PsHooN7979 2024-08-22
240822 박세훈 문제 타입 별 페이지 연결 수정
@d451f76e544845643db43b83e3614c9ef1531e87
client/views/pages/main/Dashboard.vue
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
@@ -79,8 +79,7 @@
                         </button>
                         <p>{{ labeledItems[4].label }}</p>
                     </div>
-                    <div class="race-btn"
-                        @click="[goToPage('Chapter2_7'), storeLearningId(labeledItems[3].learning_id)]">
+                    <div class="race-btn" @click="[storeLearningId(labeledItems[3])]">
                         <div class="rabbit-running"><img src="../../../resources/img/img09_s.png" alt=""
                                 :style="{ display: rabbitPos[4] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
@@ -92,8 +91,7 @@
                         </button>
                         <p>{{ labeledItems[3].label }}</p>
                     </div>
-                    <div class="race-btn"
-                        @click="[goToPage('Chapter2_8'), storeLearningId(labeledItems[2].learning_id)]">
+                    <div class="race-btn" @click="[storeLearningId(labeledItems[2])]">
                         <div class="rabbit-running"><img src="../../../resources/img/img09_s.png" alt=""
                                 :style="{ display: rabbitPos[3] ? 'block' : 'none' }"></div>
                         <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)"
@@ -591,7 +589,7 @@
         },
         storeLearningId(labeledItems) {
             this.$store.dispatch('updateLearningData', labeledItems)
-            if (labeledItems.label === "문제3") {
+            if (labeledItems.label.startsWith('문제')) {
                 this.handleProblemDetail(this.$store.getters.currentLearningId)
                 this.goToPage(this.problemType)
             }
Add a comment
List